The pyramid is said to be a focus of spiritual energy, so it if appears in your dream, your unconscious is drawing your attention to the power within. Dreams about old or ancient buildings refer to the past and experiences that have been lived through, such as a former life with another person. Ruins suggest a now irrelevant way of life or approach to life. The ruins may belong to a castle, and this suggests that the defenses you once built up are no longer necessary.
Mansions and palaces in dreams have a similar interpretation as houses, but with the emphasis on those possibilities within us that have yet to be developed and explored. There is a sense of something special or wonderful happening within yourself, as palaces are places of enchantment and treasure in fairy tales. However, palaces may also represent a warning against adopting a pretentious façade and living beyond your means.
[1]