# Trigonometry of a tetrahedron

The trigonometry of a tetrahedron explains the relationships between the lengths and various types of angles of a general tetrahedron.

## Trigonometric quantities
### Classical trigonometric quantities

The following are trigonometric quantities generally associated to a general tetrahedron:
* The 6 edge lengths - associated to the six edges of the tetrahedron.
* The 12 face angles - there are three of them for each of the four faces of the tetrahedron.
* The 6 dihedral angles - associated to the six edges of the tetrahedron, since any two faces of the tetrahedron are connected by an edge.
* The 4 solid angles - associated to each point of the tetrahedron.
Let $X={\overline {P_{1}P_{2}P_{3}P_{4}}}$ be a general tetrahedron, where $P_{1},P_{2},P_{3},P_{4}$ are arbitrary points in three-dimensional space.
Furthermore, let $e_{ij}$ be the edge that joins $P_{i}$ and $P_{j}$ and let $F_{i}$ be the face of the tetrahedron opposite the point $P_{i}$; in other words:
* $e_{ij}={\overline {P_{i}P_{j}}}$
* $F_{i}={\overline {P_{j}P_{k}P_{l}}}$
where $i,j,k,l\in \{1,2,3,4\}$ and $i\neq j\neq k\neq l$.
Define the following quantities:
* $d_{ij}$ = the length of the edge $e_{ij}$
* $\alpha _{i,j}$ = the face angle at the point $P_{i}$ on the face $F_{j}$
* $\theta _{ij}$ = the dihedral angle between two faces adjacent to the edge $e_{ij}$
* $\Omega _{i}$ = the solid angle at the point $P_{i}$

### Area and volume

Let $\Delta _{i}$ be the area of the face $F_{i}$. Such area may be calculated by Heron's formula (if all three edge lengths are known):
    $\Delta _{i}={\sqrt {\frac {(d_{jk}+d_{jl}+d_{kl})(-d_{jk}+d_{jl}+d_{kl})(d_{jk}-d_{jl}+d_{kl})(d_{jk}+d_{jl}-d_{kl})}{16}}}$
or by the following formula (if an angle and two corresponding edges are known):
    $\Delta _{i}={\frac {1}{2}}d_{jk}d_{jl}\sin \alpha _{j,i}$
Let $h_{i}$ be the altitude from the point $P_{i}$ to the face $F_{i}$. The volume $V$ of the tetrahedron $X$ is given by the following formula: $V={\frac {1}{3}}\Delta _{i}h_{i}$It satisfies the following relation:
    $288V^{2}={\begin{vmatrix}2Q_{12}&Q_{12}+Q_{13}-Q_{23}&Q_{12}+Q_{14}-Q_{24}\\Q_{12}+Q_{13}-Q_{23}&2Q_{13}&Q_{13}+Q_{14}-Q_{34}\\Q_{12}+Q_{14}-Q_{24}&Q_{13}+Q_{14}-Q_{34}&2Q_{14}\end{vmatrix}}$
where $Q_{ij}=d_{ij}^{2}$ are the quadrances (length squared) of the edges.

## Basic statements of trigonometry
### Affine triangle

Take the face $F_{i}$; the edges will have lengths $d_{jk},d_{jl},d_{kl}$ and the respective opposite angles are given by $\alpha _{l,i},\alpha _{k,i},\alpha _{j,i}$.
The usual laws for planar trigonometry of a triangle hold for this triangle.

### Projective triangle

Consider the projective (spherical) triangle at the point $P_{i}$; the vertices of this projective triangle are the three lines that join $P_{i}$ with the other three vertices of the tetrahedron. The edges will have spherical lengths $\alpha _{i,j},\alpha _{i,k},\alpha _{i,l}$ and the respective opposite spherical angles are given by $\theta _{ij},\theta _{ik},\theta _{il}$.
The usual laws for spherical trigonometry hold for this projective triangle.

## Laws of trigonometry for the tetrahedron
### Alternating sines theorem

Take the tetrahedron $X$, and consider the point $P_{i}$ as an apex. The Alternating sines theorem is given by the following identity:$\sin(\alpha _{j,l})\sin(\alpha _{k,j})\sin(\alpha _{l,k})=\sin(\alpha _{j,k})\sin(\alpha _{k,l})\sin(\alpha _{l,j})$One may view the two sides of this identity as corresponding to clockwise and counterclockwise orientations of the surface.

#### The space of all shapes of tetrahedra

Putting any of the four vertices in the role of O yields four such identities, but at most three of them are independent; if the "clockwise" sides of three of the four identities are multiplied and the product is inferred to be equal to the product of the "counterclockwise" sides of the same three identities, and then common factors are cancelled from both sides, the result is the fourth identity.
Three angles are the angles of some triangle if and only if their sum is 180° (π radians). What condition on 12 angles is necessary and sufficient for them to be the 12 angles of some tetrahedron? Clearly the sum of the angles of any side of the tetrahedron must be 180°. Since there are four such triangles, there are four such constraints on sums of angles, and the number of degrees of freedom is thereby reduced from 12 to 8. The four relations given by the sine law further reduce the number of degrees of freedom, from 8 down to not 4 but 5, since the fourth constraint is not independent of the first three. Thus the space of all shapes of tetrahedra is 5-dimensional.

### Law of sines for the tetrahedron

See: Law of sines

### Law of cosines for the tetrahedron

The law of cosines for the tetrahedron relates the areas of each face of the tetrahedron and the dihedral angles about a point. It is given by the following identity:
    $\Delta _{i}^{2}=\Delta _{j}^{2}+\Delta _{k}^{2}+\Delta _{l}^{2}-2(\Delta _{j}\Delta _{k}\cos \theta _{il}+\Delta _{j}\Delta _{l}\cos \theta _{ik}+\Delta _{k}\Delta _{l}\cos \theta _{ij})$

### Relationship between dihedral angles of tetrahedron

Take the general tetrahedron $X$ and project the faces $F_{i},F_{j},F_{k}$ onto the plane with the face $F_{l}$. Let $c_{ij}=\cos \theta _{ij}$.
Then the area of the face $F_{l}$ is given by the sum of the projected areas, as follows:$\Delta _{l}=\Delta _{i}c_{jk}+\Delta _{j}c_{ik}+\Delta _{k}c_{ij}$By substitution of $i,j,k,l\in \{1,2,3,4\}$ with each of the four faces of the tetrahedron, one obtains the following homogeneous system of linear equations:${\begin{cases}-\Delta _{1}+\Delta _{2}c_{34}+\Delta _{3}c_{24}+\Delta _{4}c_{23}=0\\\Delta _{1}c_{34}-\Delta _{2}+\Delta _{3}c_{14}+\Delta _{4}c_{13}=0\\\Delta _{1}c_{24}+\Delta _{2}c_{14}-\Delta _{3}+\Delta _{4}c_{12}=0\\\Delta _{1}c_{23}+\Delta _{2}c_{13}+\Delta _{3}c_{12}-\Delta _{4}=0\end{cases}}$This homogeneous system will have solutions precisely when: ${\begin{vmatrix}-1&c_{34}&c_{24}&c_{23}\\c_{34}&-1&c_{14}&c_{13}\\c_{24}&c_{14}&-1&c_{12}\\c_{23}&c_{13}&c_{12}&-1\end{vmatrix}}=0$By expanding this determinant, one obtains the relationship between the dihedral angles of the tetrahedron, as follows: $1-\sum _{1\leq i<j\leq 4}c_{ij}^{2}+\sum _{j=2 \atop k\neq l\neq j}^{4}c_{1j}^{2}c_{kl}^{2}=2\left(\sum _{i=1 \atop j\neq k\neq l\neq i}^{4}c_{ij}c_{ik}c_{il}+\sum _{2\leq j<k\leq 4 \atop l\neq j,k}c_{1j}c_{1k}c_{jl}c_{kl}\right)$

### Skew distances between edges of tetrahedron

Take the general tetrahedron $X$ and let $P_{ij}$ be the point on the edge $e_{ij}$ and $P_{kl}$ be the point on the edge $e_{kl}$ such that the line segment ${\overline {P_{ij}P_{kl}}}$ is perpendicular to both $e_{ij}$ & $e_{kl}$. Let $R_{ij}$ be the length of the line segment ${\overline {P_{ij}P_{kl}}}$.
To find $R_{ij}$:
First, construct a line through $P_{k}$ parallel to $e_{il}$ and another line through $P_{i}$ parallel to $e_{kl}$. Let $O$ be the intersection of these two lines. Join the points $O$ and $P_{j}$. By construction, ${\overline {OP_{i}P_{l}P_{k}}}$ is a parallelogram and thus ${\overline {OP_{k}P_{i}}}$ and ${\overline {OP_{l}P_{i}}}$ are congruent triangles. Thus, the tetrahedron $X$ and $Y={\overline {OP_{i}P_{j}P_{k}}}$ are equal in volume.
As a consequence, the quantity $R_{ij}$ is equal to the altitude from the point $P_{k}$ to the face ${\overline {OP_{i}P_{j}}}$ of the tetrahedron $Y$; this is shown by translation of the line segment ${\overline {P_{ij}P_{kl}}}$.
By the volume formula, the tetrahedron $Y$ satisfies the following relation: $3V=R_{ij}\times \Delta ({\overline {OP_{i}P_{j}}})$where $\Delta ({\overline {OP_{i}P_{j}}})$ is the area of the triangle ${\overline {OP_{i}P_{j}}}$. Since the length of the line segment ${\overline {OP_{i}}}$ is equal to $d_{kl}$ (as ${\overline {OP_{i}P_{l}P_{k}}}$ is a parallelogram): $\Delta ({\overline {OP_{i}P_{j}}})={\frac {1}{2}}d_{ij}d_{kl}\sin \lambda$where $\lambda =\angle OP_{i}P_{j}$. Thus, the previous relation becomes: $6V=R_{ij}d_{ij}d_{kl}\sin \lambda$To obtain $\sin \lambda$, consider two spherical triangles:
* Take the spherical triangle of the tetrahedron $X$ at the point $P_{i}$; it will have sides $\alpha _{i,j},\alpha _{i,k},\alpha _{i,l}$ and opposite angles $\theta _{ij},\theta _{ik},\theta _{il}$. By the spherical law of cosines:$\cos \alpha _{i,k}=\cos \alpha _{i,j}\cos \alpha _{i,l}+\sin \alpha _{i,j}\sin \alpha _{i,l}\cos \theta _{ik}$
* Take the spherical triangle of the tetrahedron $X$ at the point $P_{i}$. The sides are given by $\alpha _{i,l},\alpha _{k,j},\lambda$ and the only known opposite angle is that of $\lambda$, given by $\pi -\theta _{ik}$. By the spherical law of cosines:$\cos \lambda =\cos \alpha _{i,l}\cos \alpha _{k,j}-\sin \alpha _{i,l}\sin \alpha _{k,j}\cos \theta _{ik}$
Combining the two equations gives the following result:$\cos \alpha _{i,k}\sin \alpha _{k,j}+\cos \lambda \sin \alpha _{i,j}=\cos \alpha _{i,l}\left(\cos \alpha _{i,j}\sin \alpha _{k,j}+\sin \alpha _{i,j}\cos \alpha _{k,j}\right)=\cos \alpha _{i,l}\sin \alpha _{l,j}$
Making $\cos \lambda$ the subject:$\cos \lambda =\cos \alpha _{i,l}{\frac {\sin \alpha _{l,j}}{\sin \alpha _{i,j}}}-\cos \alpha _{i,k}{\frac {\sin \alpha _{k,j}}{\sin \alpha _{i,j}}}$Thus, using the cosine law and some basic trigonometry:$\cos \lambda ={\frac {d_{ij}^{2}+d_{ik}^{2}-d_{jk}^{2}}{2d_{ij}d_{ik}}}{\frac {d_{ik}}{d_{kl}}}-{\frac {d_{ij}^{2}+d_{il}^{2}-d_{jl}^{2}}{2d_{ij}d_{il}}}{\frac {d_{il}}{d_{kl}}}={\frac {d_{ik}^{2}+d_{jl}^{2}-d_{il}^{2}-d_{jk}^{2}}{2d_{ij}d_{kl}}}$Thus:$\sin \lambda ={\sqrt {1-\left({\frac {d_{ik}^{2}+d_{jl}^{2}-d_{il}^{2}-d_{jk}^{2}}{2d_{ij}d_{kl}}}\right)^{2}}}={\frac {\sqrt {4d_{ij}^{2}d_{kl}^{2}-(d_{ik}^{2}+d_{jl}^{2}-d_{il}^{2}-d_{jk}^{2})^{2}}}{2d_{ij}d_{kl}}}$So:$R_{ij}={\frac {12V}{\sqrt {4d_{ij}^{2}d_{kl}^{2}-(d_{ik}^{2}+d_{jl}^{2}-d_{il}^{2}-d_{jk}^{2})^{2}}}}$$R_{ik}$ and $R_{il}$ are obtained by permutation of the edge lengths.
Note that the denominator is a re-formulation of the Bretschneider-von Staudt formula, which evaluates the area of a general convex quadrilateral.