Malaysia has its origins in the Malay kingdoms which, from the 18th century, became subject to the British Empire when the Straits Settlements became British protectorates. Peninsular Malaysia was unified as the Malayan Union in 1946. Malaya was restructured as the Federation of Malaya in 1948, and achieved independence on 31 August 1957. Malaya united with North Borneo, Sarawak, and Singapore on 16 September 1963 to become Malaysia. In 1965, Singapore was expelled from the federation. The country is multi-ethnic and multi-cultural, which plays a large role in its politics. About half the population is ethnically Malay, with large minorities of Malaysian Chinese (the second largest community of Overseas Chinese in the world), Malaysian Indians, and indigenous peoples. The constitution grants freedom of religion but recognises Islam as the established religion of the state. The government system is closely modelled on the Westminster parliamentary system and the legal system is based on common law. The head of state is the king, known as the Yang di-Pertuan Agong. He is an elected monarch chosen from the hereditary rulers of the nine Malay states every five years. The head of government is the Prime Minister. The country's official language is Bahasa Melayu, commonly known as the Malay language. English remains an active second language. In 2017 English proficiency in Malaysia was ranked the 2nd best in Asia (after Singapore) and the 13th best in the world.
Since its independence, Malaysia has had one of the best economic records in Asia, with its GDP growing at an average of 6.5% per annum for almost 50 years. The economy has traditionally been fuelled by its natural resources, but is expanding in the sectors of science, tourism, commerce and medical tourism. It is also one of the few developing countries to heavily subsidise education and healthcare. Malaysian citizens are entitled to free public education up to secondary level and public tertiary education fees are subsidised by up to 90%. Basic healthcare services at government run clinics with prescription cost RM1. Disabled, senior citizens and public school students are entitled to free healthcare. Malaysian healthcare services have been regarded as among the best in the world and the UN Development Program called the Malaysian healthcare system "a model to other developing countries".
Malaysia's recent rapid development has attracted millions of migrant workers from across Asia. The majority of these migrants are undocumented, a situation which the Malaysian government is struggling to combat, with its treatment and crackdown on migrant workers often criticised by international human rights watchdogs. Malaysia has a newly industrialised market economy, ranked 4th largest in Southeast Asia and 38th largest in the world. With a GDP per capita of $10,430 and an HDI of 0.789, Malaysia is classified as an emerging economy by the World Bank. The International Monetary Fund (IMF) also classifies Malaysia as an emerging and developing country. Malaysia is a founding member of the Association of Southeast Asian Nations, the East Asia Summit, and the Organisation of Islamic Cooperation and a member of the Asia-Pacific Economic Cooperation, the Commonwealth of Nations, and the Non-Aligned Movement. In 2017, Malaysian citizens had visa-free or visa-on-arrival access to 164 countries and territories, ranking the Malaysian passport the 5th most accepted in the world.
The name "Malaysia" is a combination of the word "Malay" and the Latin-Greek suffix "-sia"/-σία. The word "melayu" in Malay may derive from the Tamil words "malai" and "ur" meaning "mountain" and "city, land", respectively. "Malayadvipa" was the word used by ancient Indian traders when referring to the Malay Peninsula. Whether or not it originated from these roots, the word "melayu" or "mlayu" may have been used in early Malay/Javanese to mean to steadily accelerate or run. This term was applied to describe the strong current of the river Melayu in Sumatra. The name was later adopted by the Melayu Kingdom that existed in the seventh century on Sumatra.