TOPICS
Search

Distance


The distance between two points in a metric space is the nonnegative real number assigned to them by its metric (Lang 2013, p. 1). 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 space R^3, 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)

On a connected Riemannian manifold, the distance is the infimum of the lengths of joining piecewise smooth curves, and need not be attained by a shortest path. A shortest path, when it exists, can be parametrized as a geodesic. On a sphere, two distinct points that are not antipodal points are joined by a unique shortest path, the shorter arc of their great circle. Antipodal points on a sphere admit multiple shortest paths.

Let gamma(t) be a smooth curve in a connected Riemannian 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 infimum of these lengths,

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

Here the infimum is over joining piecewise smooth curves, which are smooth on each of finitely many subintervals (Lang 2013, p. 3).

For a generic configuration of n>=2 points in the plane, 1+2(n-2)=2n-3 coordinates specify their relative distances: the first point can be placed at (0, 0) and the distinct second point at (x,0) on the x-axis. The remaining n-2 points need two coordinates each. The total number of pairwise distances is

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

where (n; k) is a binomial coefficient. Thus the generic number m of independent algebraic relations among the pairwise distances is

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

For n=1 there are no pairwise distances and no such relations. For n=1, 2, ..., the counts are therefore 0, 0, 0, 1, 3, 6, 10, 15, 21, 28, ... (OEIS A000217). For n>=3, the generic number of relations is the triangular number T_(n-3).

There are no universal algebraic relations for n=2 or n=3 points, but 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_i 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

2-Dimensional Point-Line Distance, 2-Dimensional Point-Point Distance, 3-Dimensional Point-Line Distance, 3-Dimensional Point-Point Distance, Arc Length, Cube Point Picking, Curve Length, Depth, Euclidean Metric, Euclidean Space, Expansive, Geodesic, Geodesic Metric Space, Height, Length, Length Metric, Line Line Picking, Metric, Planar Distance, Point Distances, 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."Lang, U. "Length Spaces." Lecture notes, version of Nov. 4, 2013. https://people.math.ethz.ch/~lang/LengthSpaces.pdf.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 Resource. https://mathworld.wolfram.com/Distance.html

Subject classifications