# Cayley–Menger determinant

Jump to navigation Jump to search

In linear algebra, geometry, and trigonometry, the Cayley–Menger determinant is a formula for the content, i.e. the higher-dimensional volume, of a ${\textstyle n}$ -dimensional simplex in terms of the squares of all of the distances between pairs of its vertices. The determinant is named after Arthur Cayley and Karl Menger.

## Definition

Let ${\textstyle A_{0},A_{1},\ldots ,A_{n}}$ be $n+1$ points in $k$ -dimensional Euclidean space, often with $k\geq n$ . These points are the vertices of an n-dimensional simplex: a triangle when $n=2$ ; a tetrahedron when $n=3$ , and so on. Let ${\textstyle d_{ij}}$ be the distances between $A_{i}$ and ${\textstyle A_{j}}$ , for $0\leq i . The content, i.e. the n-dimensional volume of this simplex, denoted by $v_{n}$ , can be expressed as a function of determinants of certain matrices, as follows:

{\begin{aligned}v_{n}^{2}&={\frac {1}{(n!)^{2}2^{n}}}{\begin{vmatrix}2d_{01}^{2}&d_{01}^{2}+d_{02}^{2}-d_{12}^{2}&\cdots &d_{01}^{2}+d_{0n}^{2}-d_{1n}^{2}\\d_{01}^{2}+d_{02}^{2}-d_{12}^{2}&2d_{02}^{2}&\cdots &d_{02}^{2}+d_{0n}^{2}-d_{1n}^{2}\\\vdots &\vdots &\ddots &\vdots \\d_{01}^{2}+d_{0n}^{2}-d_{1n}^{2}&d_{02}^{2}+d_{0n}^{2}-d_{1n}^{2}&\cdots &2d_{0n}^{2}\end{vmatrix}}\\[10pt]&={\frac {(-1)^{n+1}}{(n!)^{2}2^{n}}}{\begin{vmatrix}0&d_{01}^{2}&d_{02}^{2}&\cdots &d_{0n}^{2}&1\\d_{01}^{2}&0&d_{12}^{2}&\cdots &d_{1n}^{2}&1\\d_{02}^{2}&d_{12}^{2}&0&\cdots &d_{2n}^{2}&1\\\vdots &\vdots &\vdots &\ddots &\vdots &\vdots \\d_{0n}^{2}&d_{1n}^{2}&d_{2n}^{2}&\cdots &0&1\\1&1&1&\cdots &1&0\end{vmatrix}}.\end{aligned}} This is the Cayley–Menger determinant. For $n=2$ it is a symmetric polynomial in the $d_{ij}$ 's and is thus invariant under permutation of these quantities. This fails for $n>2$ , but it is always invariant under permutation of the vertices.

A proof of the second equation can be found. From the second equation, the first can be derived by elementary row and column operations:

${\begin{vmatrix}0&d_{01}^{2}&d_{02}^{2}&\cdots &d_{0n}^{2}&1\\d_{01}^{2}&0&d_{12}^{2}&\cdots &d_{1n}^{2}&1\\d_{02}^{2}&d_{12}^{2}&0&\cdots &d_{2n}^{2}&1\\\vdots &\vdots &\vdots &\ddots &\vdots &\vdots \\d_{0n}^{2}&d_{1n}^{2}&d_{2n}^{2}&\cdots &0&1\\1&1&1&\cdots &1&0\end{vmatrix}}={\begin{vmatrix}0&0&0&\cdots &0&1\\0&-2d_{01}^{2}&d_{12}^{2}-d_{02}^{2}-d_{01}^{2}&\cdots &d_{1n}^{2}-d_{0n}^{2}-d_{01}^{2}&0\\0&d_{12}^{2}-d_{01}^{2}-d_{02}^{2}&-2d_{02}^{2}&\cdots &d_{2n}^{2}-d_{0n}^{2}-d_{02}^{2}&0\\\vdots &\vdots &\vdots &\ddots &\vdots &\vdots \\0&d_{1n}^{2}-d_{01}^{2}-d_{0n}^{2}&d_{2n}^{2}-d_{02}^{2}-d_{0n}^{2}&\cdots &-2d_{0n}^{2}&0\\1&0&0&\cdots &0&0\end{vmatrix}}$ then exchange the first and last column, gaining a $-1$ , and multiply each of its $n$ inner rows by $-1$ .

## Generalization to hyperbolic and spherical geometry

There are spherical and hyperbolic generalizations. A proof can be found here .

In a spherical space of dimension $(n-1)$ and constant curvature $1/R$ , any $(n+1)$ points satisfy

${\begin{vmatrix}0&f(d_{01})&f(d_{02})&\cdots &f(d_{0n})&1\\f(d_{01})&0&f(d_{12})&\cdots &f(d_{1n})&1\\f(d_{02})&f(d_{12})&0&\cdots &f(d_{2n})&1\\\vdots &\vdots &\vdots &\ddots &\vdots &\vdots \\f(d_{0n})&f(d_{1n})&f(d_{2n})&\cdots &0&1\\1&1&1&\cdots &1&{\frac {1}{2R^{2}}}\end{vmatrix}}=0$ where $f(d)=2R^{2}\left(1-\cos {\frac {d}{R}}\right)$ , and $d_{ij}$ is the spherical distance between points $i,j$ .

In a hyperbolic space of dimension $(n-1)$ and constant curvature $-1/R$ , any $(n+1)$ points satisfy

${\begin{vmatrix}0&f(d_{01})&f(d_{02})&\cdots &f(d_{0n})&1\\f(d_{01})&0&f(d_{12})&\cdots &f(d_{1n})&1\\f(d_{02})&f(d_{12})&0&\cdots &f(d_{2n})&1\\\vdots &\vdots &\vdots &\ddots &\vdots &\vdots \\f(d_{0n})&f(d_{1n})&f(d_{2n})&\cdots &0&1\\1&1&1&\cdots &1&-{\frac {1}{2R^{2}}}\end{vmatrix}}=0$ where $f(d)=2R^{2}\left(\cosh {\frac {d}{R}}-1\right)$ , and $d_{ij}$ is the hyperbolic distance between points $i,j$ .

## Example

In the case of $n=2$ , we have that $v_{2}$ is the area of a triangle and thus we will denote this by $A$ . By the Cayley–Menger determinant, where the triangle has side lengths $a$ , $b$ and $c$ ,

{\begin{aligned}16A^{2}&={\begin{vmatrix}2a^{2}&a^{2}+b^{2}-c^{2}\\a^{2}+b^{2}-c^{2}&2b^{2}\end{vmatrix}}\\[8pt]&=4a^{2}b^{2}-(a^{2}+b^{2}-c^{2})^{2}\\[6pt]&=(a^{2}+b^{2}+c^{2})^{2}-2(a^{4}+b^{4}+c^{4})\\[6pt]&=(a+b+c)(a+b-c)(a-b+c)(-a+b+c)\end{aligned}} The result in the third line is due to the Fibonacci identity. The final line can be rewritten to obtain Heron's formula for the area of a triangle given three sides, which was known to Archimedes prior.

In the case of $n=3$ , the quantity $v_{3}$ gives the volume of a tetrahedron, which we will denote by $V$ . For distances between $A_{i}$ and $A_{j}$ given by $d_{ij}$ , the Cayley–Menger determinant gives

{\begin{aligned}144V^{2}={}&{\frac {1}{2}}{\begin{vmatrix}2d_{01}^{2}&d_{01}^{2}+d_{02}^{2}-d_{12}^{2}&d_{01}^{2}+d_{03}^{2}-d_{13}^{2}\\d_{01}^{2}+d_{02}^{2}-d_{12}^{2}&2d_{02}^{2}&d_{02}^{2}+d_{03}^{2}-d_{23}^{2}\\d_{01}^{2}+d_{03}^{2}-d_{13}^{2}&d_{02}^{2}+d_{03}^{2}-d_{23}^{2}&2d_{03}^{2}\end{vmatrix}}\\[8pt]={}&4d_{01}^{2}d_{02}^{2}d_{03}^{2}+(d_{01}^{2}+d_{02}^{2}-d_{12}^{2})(d_{01}^{2}+d_{03}^{2}-d_{13}^{2})(d_{02}^{2}+d_{03}^{2}-d_{23}^{2})\\[6pt]&{}-d_{01}^{2}(d_{02}^{2}+d_{03}^{2}-d_{23}^{2})^{2}-d_{02}^{2}(d_{01}^{2}+d_{03}^{2}-d_{13}^{2})^{2}-d_{03}^{2}(d_{01}^{2}+d_{02}^{2}-d_{12}^{2})^{2}.\end{aligned}} ### Finding the circumradius of a simplex

Given a nondegenerate n-simplex, it has a circumscribed n-sphere, with radius $r$ . Then the (n+1)-simplex made of the vertices of the n-simplex and the center of the n-sphere is degenerate. Thus, we have

${\begin{vmatrix}0&r^{2}&r^{2}&r^{2}&\cdots &r^{2}&1\\r^{2}&0&d_{01}^{2}&d_{02}^{2}&\cdots &d_{0n}^{2}&1\\r^{2}&d_{01}^{2}&0&d_{12}^{2}&\cdots &d_{1n}^{2}&1\\r^{2}&d_{02}^{2}&d_{12}^{2}&0&\cdots &d_{2n}^{2}&1\\\vdots &\vdots &\vdots &\vdots &\ddots &\vdots &\vdots \\r^{2}&d_{0n}^{2}&d_{1n}^{2}&d_{2n}^{2}&\cdots &0&1\\1&1&1&1&\cdots &1&0\end{vmatrix}}=0$ In particular, when $n=2$ , this gives the circumradius of a triangle in terms of its edge lengths.