The pyramids have fascinated people as far back as we can trace, and even Herodotus was told some odd tales about them by the locals when he was in Egypt around 460BC. Medieval European writers, who have never been to Egypt, believed that the pyramids were hollow granaries for storing the pharaohs wheat.
In 1638, John Greaves of Oxford made the first reasonably accurate surveys, but it was not until 19th-century linguists and archaeological research in Egypt that the ingenuity of Egyptian astronomy, and its link to agriculture, emerged.
From these relatively recent researches, we now know that the Great Pyramid of Giza, near Cairo, was built around 2700 BC by Pharaoh Khufu, and forms one of a group of three pyramids on the site. Each pyramid has an exact astronomical orientation, its flat sides by the compass points.
By 1870 translations of excavated Egyptian papyri enabled scholars to gain a very precise understanding of their culture, and central to that culture was the fate of the soul of the dead Pharaoh.
To maintain peace in the land, it was necessary for the Pharaoh soul to journey between the mummy, entombed in the pyramid, and the heavens. And very important to the Egyptians were the north polar circumpolar stars, named ikhemu-sek or the immortals because they never 'died' by setting below the horizon. In fact, these Old Kingdom pyramids of the fourth dynasty had corridors that led from the interior to the northern face and were inclined so exactly that when one looked up them one would see the pole star and the immortals.
In 2700 BC our own pole star, Polaris, would not have occupied the north polar point. At the time the pole the pole star would have been Thuban (Alpha Draconis). A glance at the angle between Thuban and Polaris on a modern star chart will give some idea of how far the precession of the equinoxes has turned the sky in 5000 years. The translation of the hieroglyphics and the Dendera Zodiac in the early Victorian age taught us about Egypt's 365-day calendar, constellations, and the first division of the day and night into 12 hours each, as archaeology and modern scholarship replaced mystery with sound knowledge.