Edinburgh is the capital city of Scotland and one of its 32 council areas. Historically part of the county of Midlothian, it is located in Lothian on the southern shore of the Firth of Forth. Edinburgh is Scotland's second-most populous city and the seventh-most populous city in the United Kingdom.
Recognised as the capital of Scotland since at least the 15th century, Edinburgh is the seat of the Scottish Government, the Scottish Parliament and the highest courts in Scotland. The city's Palace of Holyroodhouse is the official residence of the monarch in Scotland. The city has long been a centre of education, particularly in the fields of medicine, Scots law, literature, philosophy, the sciences and engineering. It is the second-largest financial centre in the United Kingdom, and the city's historical and cultural attractions have made it the UK's second-most visited tourist destination attracting 4.9 million visits, including 2.4 million from overseas in 2018.
Edinburgh's official population estimates are
488,050 for the Edinburgh locality, 518,500 for the City of Edinburgh council area, and 1,339,380 for the wider city region.