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 supreme courts of Scotland. The city's Palace of Holyroodhouse is the official residence of the Monarchy in Scotland. The city has long been a centre of education, particularly in the fields of medicine, Scots law, literature, the sciences and engineering. It is the second largest financial centre in the United Kingdom (after London) and the city's historical and cultural attractions have made it the United Kingdom's second most popular tourist destination, attracting over one million overseas visitors each year.
Edinburgh is Scotland's second most populous city and the seventh most populous in the United Kingdom. The official population estimates are 464,990 (2012) for the Locality of Edinburgh (Edinburgh pre 1975 regionalisation plus Currie and Balerno), 507,170 (2016) for the City of Edinburgh, and 1,339,380 (2014) for the city region. Edinburgh lies at the heart of the Edinburgh and South East Scotland city region comprising East Lothian, Edinburgh, Fife, Midlothian, Scottish Borders and West Lothian.
The city is the annual venue of the General Assembly of the Church of Scotland. It is home to national institutions such as the National Museum of Scotland, the National Library of Scotland and the Scottish National Gallery. The University of Edinburgh, founded in 1582 and now one of four in the city, was placed 23rd in the QS World University Rankings in 2018. The city is also famous for the Edinburgh International Festival and the Fringe, the latter being the world's largest annual international arts festival. Historic sites in Edinburgh include Edinburgh Castle, the Palace of Holyroodhouse, the churches of St. Giles, Greyfriars and the Canongate, and the extensive Georgian New Town, built in the 18th century. Edinburgh's Old Town and New Town together are listed as a UNESCO World Heritage Site, which has been managed by Edinburgh World Heritage since 1999.
"Edin", the root of the city's name, is most likely of Brittonic Celtic origin, from the Cumbric language or a variation of it that would have been spoken by the earliest known people of the area, an Iron Age tribe known to the Romans as the Votadini, and latterly in sub-Roman history as the Gododdin. It appears to derive from the place name Eidyn mentioned in the Old Welsh epic poem Y Gododdin.
The poem names Din Eidyn as a hill fort (Din meaning "dun") in the territory of the Gododdin. The change in nomenclature, from Din Eidyn to Edinburgh, reflects changes in the local language from Cumbric to Old English, the Germanic language of the Anglian kingdom of Bernicia that permeated the area from the mid-7th century and is regarded as the ancestor of modern Scots. The Celtic element din was dropped and replaced by the Old English burh. The first documentary evidence of the medieval burgh is a royal charter, c. 1124–1127, by King David I granting a toft in burgo meo de Edenesburg to the Priory of Dunfermline.