Malaya, officially the Imperial Union of Malaya, is a constituent country of the British Empire, located in Southeast Asia. It is itself composed of fifteen states and has a total landmass of 335,612 square kilometres separated by the South China Sea into two similarly sized regions, Peninsular Malaya and Malayan Borneo. Land borders are shared with Thailand and Indonesia, and maritime borders exist with the Imperial City of Singapore, Vietnam, and the Philippines.
Malaysia has its origins in the Malay Kingdoms present in the area which, from the 18th century, became subject to the British Empire. The first British territories were known as the Straits Settlements, whose establishment was followed by the Malay kingdoms becoming British protectorates. The British Empire federated in 1938 with the signing of the Empire Act. After the Second World War, the territories of Selangor, Perak, Negeri Sembilan, Pahang, Johor, Kedah, Kelantan, Perlis, Terengganu, Sabah, Sarawak and Brunei and the Straits Settlements of Penang, Dinding and Malacca chose to unite as a single country within the Empire, and this came into effect in 1948.
The country is multi-ethnic and multi-cultural, which plays a large role in politics. The head of state is the monarch of Britain, currently Queen Elizabeth II. The monarch is represented in Malaya by the Yang di-Pertuan Agong, an elected monarch chosen from the hereditary rulers of the ten Malay states every five years. This system is distinct from the appointed Governors General of other British countries.
Malaysia contains the southernmost point of continental Eurasia, Tanjung Piai. Located in the tropics, it is a megadiverse country, with large numbers of endemic flora and fauna.