A pyramid was usually built within a complete funerary complex, which contained several other structures. The enclosure wall was mostly built of mud brick and enclosed the whole complex.
The valley temple was considered to be the main entrance to the complex and was a reception area for the living king when he came to inspect the work. The first funerary rites for the deceased king would also be conducted here, and possibly the embalming.
The causeway connected the valley temple and the mortuary temple. In earlier pyramids, the causeway was open, but later it was frequently covered with a slanting cut in the ceiling to let a little light penetrate.
The mortuary temple and cult shrines were where the final cult services for the deceased king were conducted before his body was moved to its burial place in the pyramid.
The boat pits were holes in the ground that contained the ships that were used to transport the royal body and the funerary furniture. These boats were then taken apart and placed in boat pits, ready to be reused in the hereafter when the king wandered in the realms of the dead or accompanied the sun god.
The pyramid or royal tomb was where the deceased king was buried, either inside or beneath it.
It was built as a royal tomb and a monument and had no other function.