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=d_(12)^4d_(34)^2+d_(13)^4d_(24)^2+d_(14)^4d_(23)^2+d_(23)^4d_(14)^2+d_(24)^4d_(13)^2+d_(34)^4d_(12)^2+d_(12)^2d_(23)^2d_(31)^2+d_(12)^2d_(24)^2d_(41)^2+d_(13)^2d_(34)^2d_(41)^2+d_(23)^2d_(34)^2d_(42)^2-d_(12)^2d_(23)^2d_(34)^2-d_(13)^2d_(32)^2d_(24)^2-d_(12)^2d_(24)^2d_(43)^2-d_(14)^2d_(42)^2d_(23)^2-d_(13)^2d_(34)^2d_(42)^2-d_(14)^2d_(43)^2d_(32)^2-d_(23)^2d_(31)^2d_(14)^2-d_(21)^2d_(13)^2d_(34)^2-d_(24)^2d_(41)^2d_(13)^2-d_(21)^2d_(14)^2d_(43)^2-d_(31)^2d_(12)^2d_(24)^2-d_(32)^2d_(21)^2d_(14)^2.
(9)

This equation can be derived by writing

 d_(ij)=sqrt((x_i-x_j)^2+(y_i-y_j)^2)
(10)

and eliminating x_i and y_j from the equations for d_(12), d_(13), d_(14), d_(23), d_(24), and d_(34). This results in a Cayley-Menger determinant

 0=|0 1 1 1 1; 1 0 d_(12)^2 d_(13)^2 d_(14)^2; 1 d_(21)^2 0 d_(23)^2 d_(24)^2; 1 d_(31)^2 d_(32)^2 0 d_(34)^2; 1 d_(41)^2 d_(42)^2 d_(43)^2 0|,
(11)

as observed by Uspensky (1948, p. 256).


See also

Arc Length, Cube Point Picking, Curve Length, Depth, Euclidean Metric, Euclidean Space, Expansive, Geodesic, Height, Length, Line Line Picking, Metric, Planar Distance, Point Distances, Point-Line Distance--2-Dimensional, Point-Line Distance--3-Dimensional, Point-Point Distance--2-Dimensional, Point-Point Distance--3-Dimensional, Point-Plane Distance, Sphere, Vector Norm, Width

Explore with Wolfram|Alpha

References

Gray, A. "The Intuitive Idea of Distance on a Surface." §15.1 in Modern Differential Geometry of Curves and Surfaces with Mathematica, 2nd ed. Boca Raton, FL: CRC Press, pp. 341-345, 1997.Sloane, N. J. A. Sequence A000217/M2535 in "The On-Line Encyclopedia of Integer Sequences."Uspensky, J. V. Theory of Equations. New York: McGraw-Hill, p. 256, 1948.Weinberg, S. Gravitation and Cosmology: Principles and Applications of the General Theory of Relativity. New York: Wiley, p. 7, 1972.

Referenced on Wolfram|Alpha

Distance

Cite this as:

Weisstein, Eric W. "Distance." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Distance.html

Subject classifications