The distance between two points is the length of the path connecting them. In the plane, the distance between points and is given by the Pythagorean theorem,
(1)
|
In Euclidean three-space, the distance between points and is
(2)
|
In general, the distance between points and in a Euclidean space is given by
(3)
|
For curved or more complicated surfaces, the so-called metric can be used to compute the distance between two points by integration. When unqualified, "the" distance generally means the shortest distance between two points. For example, there are an infinite number of paths between two points on a sphere but, in general, only a single shortest path. The shortest distance between two points is the length of a so-called geodesic between the points. In the case of the sphere, the geodesic is a segment of a great circle containing the two points.
Let be a smooth curve in a manifold from to with and . Then , where is the tangent space of at . The curve length of with respect to the Riemannian structure is given by
(4)
|
and the distance between and is the shortest distance between and given by
(5)
|
In order to specify the relative distances of points in the plane, coordinates are needed, since the first can always be taken as (0, 0) and the second as , which defines the x-axis. The remaining points need two coordinates each. However, the total number of distances is
(6)
|
where is a binomial coefficient. The distances between points are therefore subject to relationships, where
(7)
| |||
(8)
|
For , 2, ..., this gives 0, 0, 0, 1, 3, 6, 10, 15, 21, 28, ... (OEIS A000217) relationships, and the number of relationships between points is the triangular number .
Although there are no relationships for and points, for (a quadrilateral), there is one (Weinberg 1972):
(9)
|
This equation can be derived by writing
(10)
|
and eliminating and from the equations for , , , , , and . This results in a Cayley-Menger determinant
(11)
|
as observed by Uspensky (1948, p. 256).