# Square pyramid

In geometry, a square pyramid is a pyramid with a square base and four triangles, having a total of five faces. If the apex of the pyramid is directly above the center of the square, it is a right square pyramid with four isosceles triangles; otherwise, it is an oblique square pyramid. When all of the pyramid's edges are equal in length, its triangles are all equilateral. It is called an equilateral square pyramid, an example of a Johnson solid.
Square pyramids have appeared throughout the history of architecture, with examples being Egyptian pyramids and many other similar buildings. They also occur in chemistry in square pyramidal molecular structures. Square pyramids are often used in the construction of other polyhedra. Many mathematicians in ancient times discovered the formula for the volume of a square pyramid with different approaches.

## Special cases
### Right square pyramid

A square pyramid has five vertices, eight edges, and five faces. One face, called the base of the pyramid, is a square; the four other faces are triangles. Four of the edges make up the square by connecting its four vertices. The other four edges are known as the lateral edges of the pyramid; they meet at the fifth vertex, called the apex. If the pyramid's apex lies on a line erected perpendicularly from the center of the square, it is called a right square pyramid, and the four triangular faces are isosceles triangles. Otherwise, the pyramid has two or more non-isosceles triangular faces and is called an oblique square pyramid.
The slant height $s$ of a right square pyramid is defined as the height of one of its isosceles triangles. It can be obtained via the Pythagorean theorem: $s={\sqrt {b^{2}-{\frac {l^{2}}{4}}}},$ where $l$ is the length of the triangle's base, also one of the square's edges, and $b$ is the length of the triangle's legs, which are lateral edges of the pyramid. The height $h$ of a right square pyramid can be similarly obtained, with a substitution of the slant height formula giving: $h={\sqrt {s^{2}-{\frac {l^{2}}{4}}}}={\sqrt {b^{2}-{\frac {l^{2}}{2}}}}.$ A polyhedron's surface area is the sum of the areas of its faces. The surface area $A$ of a right square pyramid can be expressed as $A=4T+S$, where $T$ and $S$ are the areas of one of its triangles and its base, respectively. The area of a triangle is half of the product of its base and side, with the area of a square being the length of the side squared. This gives the expression: $A=4\left({\frac {1}{2}}ls\right)+l^{2}=2ls+l^{2}.$ In general, the volume $V$ of a pyramid is equal to one-third of the area of its base multiplied by its height. Expressed in a formula for a square pyramid, this is: $V={\frac {1}{3}}l^{2}h.$
Many mathematicians have discovered the formula for calculating the volume of a square pyramid in ancient times. In the Moscow Mathematical Papyrus, Egyptian mathematicians demonstrated knowledge of the formula for calculating the volume of a truncated square pyramid, suggesting that they were also acquainted with the volume of a square pyramid, but it is unknown how the formula was derived. Beyond the discovery of the volume of a square pyramid, the problem of finding the slope and height of a square pyramid can be found in the Rhind Mathematical Papyrus. The Babylonian mathematicians also considered the volume of a frustum, but gave an incorrect formula for it. One Chinese mathematician Liu Hui also discovered the volume by the method of dissecting a rectangular solid into pieces.

### Equilateral square pyramid

If all triangular edges are of equal length, the four triangles are equilateral, and the pyramid's faces are all regular polygons, it is an equilateral square pyramid. The dihedral angles between adjacent triangular faces are arccos⁡(−1/3)≈109.47$^∘${\textstyle \arccos \left(-1/3\right)\approx 109.47^{\circ }}, and that between the base and each triangular face being half of that, arctan⁡(√2)≈54.74$^∘${\textstyle \arctan \left({\sqrt {2}}\right)\approx 54.74^{\circ }}. A convex polyhedron in which all of the faces are regular polygons is called a Johnson solid. The equilateral square pyramid is among them, enumerated as the first Johnson solid $J_{1}$.
Because its edges are all equal in length (that is, $b=l$), its slant, height, surface area, and volume can be derived by substituting the formulas of a right square pyramid: ${\begin{aligned}s={\frac {\sqrt {3}}{2}}l\approx 0.866l,&\qquad h={\frac {1}{\sqrt {2}}}l\approx 0.707l,\\A=(1+{\sqrt {3}})l^{2}\approx 2.732l^{2},&\qquad V={\frac {\sqrt {2}}{6}}l^{3}\approx 0.236l^{3}.\end{aligned}}$
Like other right pyramids with a regular polygon as a base, a right square pyramid has pyramidal symmetry. For the square pyramid, this is the symmetry of cyclic group $C_{4\mathrm {v} }$: the pyramid is left invariant by rotations of one-, two-, and three-quarters of a full turn around its axis of symmetry, the line connecting the apex to the center of the base; and is also mirror symmetric relative to any perpendicular plane passing through a bisector of the base. It can be represented as the wheel graph $W_{4}$, meaning its skeleton can be interpreted as a square in which its four vertices connects a vertex in the center called the universal vertex. It is self-dual, meaning its dual polyhedron is the square pyramid itself.
An equilateral square pyramid is an elementary polyhedron. This means it cannot be separated by a plane to create two small convex polyhedrons with regular faces.

## Applications

In architecture, the pyramids built in ancient Egypt are examples of buildings shaped like square pyramids. Pyramidologists have put forward various suggestions for the design of the Great Pyramid of Giza, including a theory based on the Kepler triangle and the golden ratio. However, modern scholars favor descriptions using integer ratios, as being more consistent with the knowledge of Egyptian mathematics and proportion. The Mesoamerican pyramids are also ancient pyramidal buildings similar to the Egyptian; they differ in having flat tops and stairs ascending their faces. Modern buildings whose designs imitate the Egyptian pyramids include the Louvre Pyramid and the casino hotel Luxor Las Vegas.
In stereochemistry, an atom cluster can have a square pyramidal geometry. A square pyramidal molecule has a main-group element with one active lone pair, which can be described by a model that predicts the geometry of molecules known as VSEPR theory. Examples of molecules with this structure include chlorine pentafluoride, bromine pentafluoride, and iodine pentafluoride.
The base of a square pyramid can be attached to a square face of another polyhedron to construct new polyhedra, an example of augmentation. For example, a tetrakis hexahedron can be constructed by attaching the base of an equilateral square pyramid onto each face of a cube. Attaching prisms or antiprisms to pyramids is known as elongation or gyroelongation, respectively. Some of the other Johnson solids can be constructed by either augmenting square pyramids or augmenting other shapes with square pyramids: elongated square pyramid $J_{8}$, gyroelongated square pyramid $J_{10}$, elongated square bipyramid $J_{15}$, gyroelongated square bipyramid $J_{17}$, augmented triangular prism $J_{49}$, biaugmented triangular prism $J_{50}$, triaugmented triangular prism $J_{51}$, augmented pentagonal prism $J_{52}$, biaugmented pentagonal prism $J_{53}$, augmented hexagonal prism $J_{54}$, parabiaugmented hexagonal prism $J_{55}$, metabiaugmented hexagonal prism $J_{56}$, triaugmented hexagonal prism $J_{57}$, and augmented sphenocorona $J_{87}$.