TOPICS
Search

Distance


The distance between two points is the length of the path connecting them. In the plane, the distance between points (x_1,y_1) and (x_2,y_2) is given by the Pythagorean theorem,

 d=sqrt((x_2-x_1)^2+(y_2-y_1)^2).
(1)

In Euclidean three-space, the distance between points (x_1,y_1,z_1) and (x_2,y_2,z_2) is

 d=sqrt((x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2).
(2)

In general, the distance between points x and y in a Euclidean space R^n is given by

 d=|x-y|=sqrt(sum_(i=1)^n|x_i-y_i|^2).
(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 gamma(t) be a smooth curve in a manifold M from x to y with gamma(0)=x and gamma(1)=y. Then gamma^'(t) in T_(gamma(t)), where T_x is the tangent space of M at x. The curve length of gamma with respect to the Riemannian structure is given by

 int_0^1|gamma^'(t)|_(gamma(t))dt,
(4)

and the distance d(x,y) between x and y is the shortest distance between x and y given by

 d(x,y)=inf_(gamma:x to y)int|gamma^'(t)|_(gamma(t))dt.
(5)

In order to specify the relative distances of n>1 points in the plane, 1+2(n-2)=2n-3 coordinates are needed, since the first can always be taken as (0, 0) and the second as (x,0), which defines the x-axis. The remaining n-2 points need two coordinates each. However, the total number of distances is

 (n; 2)=1/2n(n-1),
(6)

where (n; k) is a binomial coefficient. The distances between n>1 points are therefore subject to m relationships, where

m=1/2n(n-1)-(2n-3)
(7)
=1/2(n-2)(n-3).
(8)

For n=1, 2, ..., this gives 0, 0, 0, 1, 3, 6, 10, 15, 21, 28, ... (OEIS A000217) relationships, and the number of relationships between n points is the triangular number T_(n-3).

Although there are no relationships for n=2 and n=3 points, for n=4 (a quadrilateral), there is one (Weinberg 1972):

0=