In linear algebra , geometry , and trigonometry , the Cayley–Menger determinant is a formula for the content, i.e. the higher-dimensional volume , of a
n
{\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
A
0
,
A
1
,
…
,
A
n
{\textstyle A_{0},A_{1},\ldots ,A_{n}}
be
n
+
1
{\displaystyle n+1}
points in
k
{\displaystyle k}
-dimensional Euclidean space , with
k
≥
n
{\displaystyle k\geq n}
[ a] . These points are the vertices of an n -dimensional simplex: a triangle when
n
=
2
{\displaystyle n=2}
; a tetrahedron when
n
=
3
{\displaystyle n=3}
, and so on. Let
d
i
j
{\textstyle d_{ij}}
be the distances between vertices
A
i
{\displaystyle A_{i}}
and
A
j
{\textstyle A_{j}}
. The content, i.e. the n -dimensional volume of this simplex, denoted by
v
n
{\displaystyle v_{n}}
, can be expressed as a function of determinants of certain matrices, as follows:[ 1]
v
n
2
=
1
(
n
!
)
2
2
n
|
2
d
01
2
d
01
2
+
d
02
2
−
d
12
2
⋯
d
01
2
+
d
0
n
2
−
d
1
n
2
d
01
2
+
d
02
2
−
d
12
2
2
d
02
2
⋯
d
02
2
+
d
0
n
2
−
d
2
n
2
⋮
⋮
⋱
⋮
d
01
2
+
d
0
n
2
−
d
1
n
2
d
02
2
+
d
0
n
2
−
d
2
n
2
⋯
2
d
0
n
2
|
=
(
−
1
)
n
+
1
(
n
!
)
2
2
n
|
0
d
01
2
d
02
2
⋯
d
0
n
2
1
d
01
2
0
d
12
2
⋯
d
1
n
2
1
d
02
2
d
12
2
0
⋯
d
2
n
2
1
⋮
⋮
⋮
⋱
⋮
⋮
d
0
n
2
d
1
n
2
d
2
n
2
⋯
0
1
1
1
1
⋯
1
0
|
.
{\displaystyle {\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_{2n}^{2}\\\vdots &\vdots &\ddots &\vdots \\d_{01}^{2}+d_{0n}^{2}-d_{1n}^{2}&d_{02}^{2}+d_{0n}^{2}-d_{2n}^{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
{\displaystyle n=2}
it is a symmetric polynomial in the
d
i
j
{\displaystyle d_{ij}}
's and is thus invariant under permutation of these quantities. This fails for
n
>
2
,
{\displaystyle n>2,}
but it is always invariant under permutation of the vertices[ b] .
Proof
Let the column vectors
A
0
,
A
1
,
…
,
A
n
{\textstyle A_{0},A_{1},\ldots ,A_{n}}
be
n
+
1
{\displaystyle n+1}
points in
n
{\displaystyle n}
-dimensional Euclidean space. Starting with the volume formula
v
n
=
1
n
!
|
det
(
A
0
A
1
⋯
A
n
1
1
⋯
1
)
|
,
{\displaystyle v_{n}={\frac {1}{n!}}\left|\det {\begin{pmatrix}A_{0}&A_{1}&\cdots &A_{n}\\1&1&\cdots &1\end{pmatrix}}\right|\,,}
we note that the determinant is unchanged when we add an extra row and column to make an
(
n
+
2
)
×
(
n
+
2
)
{\displaystyle (n+2)\times (n+2)}
matrix,
P
=
(
A
0
A
1
⋯
A
n
0
1
1
⋯
1
0
‖
A
0
‖
2
‖
A
1
‖
2
⋯
‖
A
n
‖
2
1
)
,
{\displaystyle P={\begin{pmatrix}A_{0}&A_{1}&\cdots &A_{n}&0\\1&1&\cdots &1&0\\\|A_{0}\|^{2}&\|A_{1}\|^{2}&\cdots &\|A_{n}\|^{2}&1\end{pmatrix}}\,,}
where
‖
A
j
‖
2
{\displaystyle \|A_{j}\|^{2}}
is the square of the length of the vector
A
j
{\displaystyle A_{j}}
. Additionally, we note that the
(
n
+
2
)
×
(
n
+
2
)
{\displaystyle (n+2)\times (n+2)}
matrix
Q
=
(
−
2
0
⋯
0
0
0
0
−
2
⋯
0
0
0
⋮
⋮
⋱
⋮
⋮
⋮
0
0
⋯
−
2
0
0
0
0
⋯
0
0
1
0
0
⋯
0
1
0
)
{\displaystyle Q={\begin{pmatrix}-2&0&\cdots &0&0&0\\0&-2&\cdots &0&0&0\\\vdots &\vdots &\ddots &\vdots &\vdots &\vdots \\0&0&\cdots &-2&0&0\\0&0&\cdots &0&0&1\\0&0&\cdots &0&1&0\end{pmatrix}}}
has a determinant of
(
−
2
)
n
(
−
1
)
=
(
−
1
)
n
+
1
2
n
{\displaystyle (-2)^{n}(-1)=(-1)^{n+1}2^{n}}
. Thus,
det
(
0
d
01
2
d
02
2
⋯
d
0
n
2
1
d
01
2
0
d
12
2
⋯
d
1
n
2
1
d
02
2
d
12
2
0
⋯
d
2
n
2
1
⋮
⋮
⋮
⋱
⋮
⋮
d
0
n
2
d
1
n
2
d
2
n
2
⋯
0
1
1
1
1
⋯
1
0
)
=
det
(
P
T
Q
P
)
=
det
(
Q
)
det
(
P
)
2
=
(
−
1
)
n
+
1
2
n
(
n
!
)
2
v
n
2
.
{\displaystyle \det {\begin{pmatrix}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{pmatrix}}=\det(P^{T}QP)=\det(Q)\det(P)^{2}=(-1)^{n+1}2^{n}(n!)^{2}v_{n}^{2}\,.}
[ 2]
Generalization to hyperbolic and spherical geometry
There are spherical and hyperbolic generalizations.[ 3] A proof can be found here.[ 4]
In a spherical space of dimension
(
n
−
1
)
{\displaystyle (n-1)}
and constant curvature
1
/
R
2
{\displaystyle 1/R^{2}}
, any
(
n
+
1
)
{\displaystyle (n+1)}
points satisfy
|
0
f
(
d
01
)
f
(
d
02
)
⋯
f
(
d
0
n
)
1
f
(
d
01
)
0
f
(
d
12
)
⋯
f
(
d
1
n
)
1
f
(
d
02
)
f
(
d
12
)
0
⋯
f
(
d
2
n
)
1
⋮
⋮
⋮
⋱
⋮
⋮
f
(
d
0
n
)
f
(
d
1
n
)
f
(
d
2
n
)
⋯
0
1
1
1
1
⋯
1
1
2
R
2
|
=
0
{\displaystyle {\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
)
=
2
R
2
(
1
−
cos
d
R
)
{\displaystyle f(d)=2R^{2}\left(1-\cos {\frac {d}{R}}\right)}
, and
d
i
j
{\displaystyle d_{ij}}
is the spherical distance between points
i
,
j
{\displaystyle i,j}
.
In a hyperbolic space of dimension
(
n
−
1
)
{\displaystyle (n-1)}
and constant curvature
−
1
/
R
2
{\displaystyle -1/R^{2}}
, any
(
n
+
1
)
{\displaystyle (n+1)}
points satisfy
|
0
f
(
d
01
)
f
(
d
02
)
⋯
f
(
d
0
n
)
1
f
(
d
01
)
0
f
(
d
12
)
⋯
f
(
d
1
n
)
1
f
(
d
02
)
f
(
d
12
)
0
⋯
f
(
d
2
n
)
1
⋮
⋮
⋮
⋱
⋮
⋮
f
(
d
0
n
)
f
(
d
1
n
)
f
(
d
2
n
)
⋯
0
1
1
1
1
⋯
1
−
1
2
R
2
|
=
0
{\displaystyle {\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
)
=
2
R
2
(
cosh
d
R
−
1
)
{\displaystyle f(d)=2R^{2}\left(\cosh {\frac {d}{R}}-1\right)}
, and
d
i
j
{\displaystyle d_{ij}}
is the hyperbolic distance between points
i
,
j
{\displaystyle i,j}
.
Example
In the case of
n
=
2
{\displaystyle n=2}
, we have that
v
2
{\displaystyle v_{2}}
is the area of a triangle and thus we will denote this by
A
{\displaystyle A}
. By the Cayley–Menger determinant, where the triangle has side lengths
a
{\displaystyle a}
,
b
{\displaystyle b}
and
c
{\displaystyle c}
,
16
A
2
=
|
2
a
2
a
2
+
b
2
−
c
2
a
2
+
b
2
−
c
2
2
b
2
|
=
4
a
2
b
2
−
(
a
2
+
b
2
−
c
2
)
2
=
(
a
2
+
b
2
+
c
2
)
2
−
2
(
a
4
+
b
4
+
c
4
)
=
(
a
+
b
+
c
)
(
a
+
b
−
c
)
(
a
−
b
+
c
)
(
−
a
+
b
+
c
)
{\displaystyle {\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.[ 5]
In the case of
n
=
3
{\displaystyle n=3}
, the quantity
v
3
{\displaystyle v_{3}}
gives the volume of a tetrahedron , which we will denote by
V
{\displaystyle V}
. For distances between
A
i
{\displaystyle A_{i}}
and
A
j
{\displaystyle A_{j}}
given by
d
i
j
{\displaystyle d_{ij}}
, the Cayley–Menger determinant gives[ 6] [ 7]
144
V
2
=
1
2
|
2
d
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
2
d
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
2
d
03
2
|
=
4
d
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
)
−
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
.
{\displaystyle {\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
{\displaystyle 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
|
0
r
2
r
2
r
2
⋯
r
2
1
r
2
0
d
01
2
d
02
2
⋯
d
0
n
2
1
r
2
d
01
2
0
d
12
2
⋯
d
1
n
2
1
r
2
d
02
2
d
12
2
0
⋯
d
2
n
2
1
⋮
⋮
⋮
⋮
⋱
⋮
⋮
r
2
d
0
n
2
d
1
n
2
d
2
n
2
⋯
0
1
1
1
1
1
⋯
1
0
|
=
0
{\displaystyle {\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
{\displaystyle n=2}
, this gives the circumradius of a triangle in terms of its edge lengths.
See also
Notes
^ An n -dimensional body can't be immersed into k -dimensional space if
k
<
n
.
{\displaystyle k<n.}
^ The (hyper)volume of a figure does not depend on its vertices' numbering order.
References