Stone can be stacked very high without breaking, but if the stone is stretched across a gap it is vulnerable to break under its own weight in the middle of the gap. So pyramids are basically the only huge structure you can build with stone using basic architectural construction. https://youtu.be/f5gjbC9AuEo
The ancient Egyptians were great at math and geometry! They understood that pyramids are sturdy and their center of gravity doesn’t let them topple easily (in most cases). The larger the base of the pyramid to its height, the sturdier it is in theory. In fact, the world’s tallest building in Dubai, Burj Khalifa follows the same principle and can be looked at as a very slim pyramid. The same can be said for the iconic Eifel tower.
Take this with a grain of salt as it may be outdated or simplistic.
Early Egyptians began building rectangular buildings above the buried body. Someone had the idea of stacking smaller rectangular buildings on top of each other, making a step pyramid. Then, they filled in the steps, resulting in the pyramids we know today. The whole process spanned hundreds of years and involved a lot of trial and error.
Small note on top of what everyone added: Because pyramids are the easiest way for a bronze era civilization to build high and sturdy, we see pyramids all over the ancient world not just Egypt. They’re not all built out of stone, though most Central/South American ones are. After enough trial and error, a pyramid is what primitive civilizations will end up using just because it’s so easy and efficient.
If you want a more detailed answer this might be a question for /r/askhistorians.
Most human cultures (and some non-human animal groups) have some sort of process for dealing with their dead.
Early Ancient Egyptians buried their dead in the ground.
Around 3,000 BCE the rich, powerful Egyptians got a big stone slab-like-thing, [now called a mastaba](https://en.wikipedia.org/wiki/Mastaba), built over their grave, to mark it and help secure/preserve it.
At some point in the next few hundred years the really important people started to get extra layers added on top of their mastabas. In particular, around the 2660s BCE there was an Old Kingdom ruler called Djoser and his mastaba ended up with 6 steps to it, and is [the oldest complete stone building complex known in history](https://en.wikipedia.org/wiki/Pyramid_of_Djoser). There are debates as to why Djoser (or his heirs) decided to build a multi-tiered mastaba – some suggestions about wanting to see it from Memphis (his capital), or maybe as a giant stairway to heaven – and questions as to whether it was always intended to be stepped, or if they started out with a normal mastaba and later decided to build up.
Whatever their motivation it isn’t hard to see how you could get from building a giant stone slab on top of people’s tombs to building a series of giant stone slabs, each on top of the other, making the higher ones smaller so they don’t fall down.
Egyptian rulers and builders seem to have experimented a bit with the designs. A few generations after Djoser the pharaoh Sneferu seems to have developed smoothed-sided pyramids, having three different pyramids constructed, the most interesting of which is the “[Bent Pyramid](https://en.wikipedia.org/wiki/Bent_Pyramid)” at Dahshur (built around 2600 BCE). As the name implies, this pyramid is bent. About halfway up the slope gets quite a bit shallower. The thinking at the moment is that this was due to it being experimental; they got part of the way up before realising it wasn’t stable enough to keep going, so they made it less steep from then up. The next pyramid Sneferu built started at the shallower angle.
Sneferu’s son and heir, Khufu, took pyramid-building to the next level, building what is now known as the [Great Pyramid](https://en.wikipedia.org/wiki/Great_Pyramid_of_Giza) (in the 2570s BCE), the largest of the ancient pyramids, and the tallest building for nearly 4,000 years (until Lincoln Cathedral was completed in 1311 – fun fact, had Lincoln Cathedral’s spire not been knocked down in 1549 it would have remained the tallest man-made structure until the Washington Monument in 1884).
Two other large pyramids were build alongside Khufu’s, one for his son Khafre, and one for Khafre’s son Menkaure (in the 2530s BCE). These three pyramids are [the famous ones at the Giza pyramid complex](https://en.wikipedia.org/wiki/File:Pyramids_of_the_Giza_Necropolis.jpg) (although as that photo shows, there are smaller ones as well).
For some reason Menkaure’s successor, Shepseskaf, didn’t get a pyramid. It isn’t clear if he never wanted one, or if one was started by abandoned. And at that point pyramids started to fall out of fashion in Ancient Egypt. A few were build in the 25th century BCE, and then there were some local pyramid revivals over the next couple of thousand years, but nothing close to the scale of Khufu’s or Khafre’s. In total there are around 120 Egyptian pyramids.
—-
To answer your questions, then, they built them to mark their burial sites, as a form of prestige and legacy. They learnt how to build them with practice (experiment and failure), starting with single-layered things, then step-pyramids, then smooth-sided pyramids.
Who knows how they got the idea for them… there are plenty of options. A pyramid is a pretty simple and stable design when you are working with basic materials.
The Egyptians didn’t just start building perfectly sloped pyramids. There are quite a few early pyramids that are interim phases, and some that, for various reason…didn’t work. They began with the mud brick Mastaba tomb, which is flat-topped with sloped sides, and there’s a lot of them.
The early pyramids (3rd Dynasty) are stepped pyramids, that is they have sides with very little slope, but with several layers that are significantly smaller as they go up, like stacked boxes, or rather several Mastabas stacked one upon the other. The Egyptians may have gotten the idea from Mesopotamian Ziggurats, as well. Over time, they toyed with how much to slope the side walls could take. The best example is Djoser’s Pyramid.
Then they tried some smaller smooth “provincial” pyramids with varying slopes. Probably built in the 3rd or 4th Dynasty, maybe working up to larger pyramids.
The first smooth-sided large pyramid (4th Dynasty) would have been the Sneferu or Meidum stepped Pyramid, which apparently was intended to be constructed first as a stepped pyramid and then was to be clad in a sloped casing to make it smooth sided. It partially collapsed during construction.
Then there’s the bent pyramid of Sneferu, which likely was intended to be a single smooth slope, but became unstable at the original angle, so there’s a noticeable ‘bend’ in the slope where the top bits are much more sloped, and so weighted less.
So, Senferu was intent on building a proper smooth-sided giant pyramid, and finally managed it with the Red Pyramid of Snefrou. It’s not as steep-sided as later pyramids, but at least it stayed up. Then his son, Khufu, managed to build a proper pyramid, and the 4th Dynasty built most of the well-preserved pyramids. Even then, they had a failure or two.
Then the Middle Kingdom tried mud bricks again, and while they might have been completed, didn’t last. Most barely resemble a pyramid.
So how did they know how to build them? Trial and error.
Latest Answers