The pyramids were constructed as tombs for kings and queens, as parts of funerary complexes, where there would also be shrines and temples. The priests would summon the spirits of the deceased royalty and make offerings to ensure their immortality would be realized.
Many pyramids were built between 2700 and 1640 BC and there are still plenty surviving today, although many were reduced to rubble.
An architect with the name of Imhotep was the first master pyramid builder. He began by making a tomb in the shape of a mastaba, which is a long, flat, rectangular building, made of sun-baked mud bricks. The walls stood about 12 feet high.
Imhotep used stone to build with and kept adding to the tomb until he had made a six layered, stepped pyramid, which stood 200 feet high. This was the Step Pyramid and Saggara, the first Egyptian monument to be made completely from hewn stone.
Imhotep was greatly respected and worshipped, after his death, as a god. His incredible achievement is still standing today at Memphis, south of Cairo.