South Korea ( listen), officially the Republic of Korea (Korean: 대한민국; Hanja: 大韓民國; Daehan Minguk listen; lit. "The Great Republic of Han"), is a country in East Asia, constituting the southern part of the Korean Peninsula. The name Korea is derived from Goryeo, a dynasty which ruled in the Middle Ages. It shares land borders with North Korea to the north, and oversea borders with China to the west and Japan to the east. South Korea lies in the north temperate zone with a predominantly mountainous terrain. Roughly half of the country's 50 million people reside in the metropolitan area surrounding its capital, the Seoul Capital Area, which is the second largest in the world with over 25 million residents.