Okay, so let's start with what "demographic history" means. Demographic history means looking at how many people lived in a certain place (in this case, Scotland) over time, and how the population changed.
So a long, long time ago, around 4000 BC, Scotland was mostly covered in forests. A lot of people lived there, but we don't know exactly how many. These people were hunters and gatherers, which means they hunted animals for food and gathered plants and berries.
Over time, more people came to Scotland and they started farming the land instead of just hunting and gathering. This started happening around 2500 BC, and we know this because we've found some of their old settlements.
In the 6th century AD, a group of people called the Picts lived in Scotland. They were known for their art, especially their stone carvings. But around the 9th century, the Vikings came from Scandinavia and started invading Scotland. They fought with the Picts and eventually took over.
In the 11th century, the Normans (people from France) came to Scotland and started taking over as well. They built castles and other big buildings.
Between the 16th and 19th centuries, a lot of people in Scotland were forced to move from their homes to make room for sheep farming. This is called the "Clearances," and it was a very sad time for a lot of people.
Starting in the 19th century, more and more people started moving to the cities in Scotland, like Glasgow and Edinburgh. These cities grew very quickly as more people moved in.
Today, Scotland has a population of around 5 million people. People still live in rural areas, but most people in Scotland live in the cities. And that's a brief summary of Scotland's demographic history!