All Topics  
Distance

 

   Email Print
   Bookmark   Link






 

Distance



 
 
Distance is a numerical description of how far apart objects are. In physics
Physics

Physics is the natural science which examines basic concepts such as energy, force, and spacetime and all that derives from these, such as mass, charge, matter and its Motion ....
 or everyday discussion, distance may refer to a physical length, a period of time, or an estimation based on other criteria (e.g. "two counties over"). In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, distance must meet more rigorous criteria.

In most cases, "distance from A to B" is interchangeable with "distance between B and A".

Geometry In neutral geometry, the minimum distance between two points is the length of the line segment
Line (mathematics)

In geometry, a line is a Curvature curve. When geometry is used to model the real world, lines are used to represent straight objects with negligible width and height....
 between them.

In analytic geometry
Analytic geometry

Analytic geometry, usually called coordinate geometry and earlier referred to as Cartesian geometry or analytical geometry, is the study of geometry using the principles of algebra; the modern development of analytic geometry is thus suggestively called algebraic geometry....
, the distance between two points of the xy-plane
Cartesian coordinate system

In mathematics, the Cartesian coordinate system is used to determine each Point uniquely in a Plane through two numbers, usually called the x-coordinate or abscissa and the y-coordinate or ordinate of the point....
 can be found using the distance formula.






Discussion
Ask a question about 'Distance'
Start a new discussion about 'Distance'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Distance is a numerical description of how far apart objects are. In physics
Physics

Physics is the natural science which examines basic concepts such as energy, force, and spacetime and all that derives from these, such as mass, charge, matter and its Motion ....
 or everyday discussion, distance may refer to a physical length, a period of time, or an estimation based on other criteria (e.g. "two counties over"). In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, distance must meet more rigorous criteria.

In most cases, "distance from A to B" is interchangeable with "distance between B and A".

Mathematics


Geometry

In neutral geometry, the minimum distance between two points is the length of the line segment
Line (mathematics)

In geometry, a line is a Curvature curve. When geometry is used to model the real world, lines are used to represent straight objects with negligible width and height....
 between them.

In analytic geometry
Analytic geometry

Analytic geometry, usually called coordinate geometry and earlier referred to as Cartesian geometry or analytical geometry, is the study of geometry using the principles of algebra; the modern development of analytic geometry is thus suggestively called algebraic geometry....
, the distance between two points of the xy-plane
Cartesian coordinate system

In mathematics, the Cartesian coordinate system is used to determine each Point uniquely in a Plane through two numbers, usually called the x-coordinate or abscissa and the y-coordinate or ordinate of the point....
 can be found using the distance formula. The distance between (x1, y1) and (x2, y2) is given by

Similarly, given points (x1, y1, z1) and (x2, y2, z2) in three-space
Cartesian coordinate system

In mathematics, the Cartesian coordinate system is used to determine each Point uniquely in a Plane through two numbers, usually called the x-coordinate or abscissa and the y-coordinate or ordinate of the point....
, the distance between them is

Which is easily proven by constructing a right triangle with a leg on the hypotenuse
Hypotenuse

File:Triangle Sides.svgA hypotenuse is the longest side of a right triangle, the side opposite the right angle. The length of the hypotenuse of a right triangle can be found using the Pythagorean theorem, which states that the Square of the length of the hypotenuse equals the sum of the squares of the lengths of the other two sides....
 of another (with the other leg orthogonal to the plane
Plane (mathematics)

In mathematics, a plane is a curvature surface. Planes can arise as subspaces of some higher dimensional space, as with the walls of a room, or they may enjoy an independent existence in their own right, as in the setting of Euclidean geometry....
 that contains the 1st triangle) and applying the Pythagorean theorem
Pythagorean theorem

In mathematics, the Pythagorean theorem or Pythagoras' theorem is a relation in Euclidean geometry among the three sides of a triangle#Types of triangles....
.

In the study of complicated geometries, we call this (most common) type of distance Euclidean distance
Euclidean distance

In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, which can be proven by repeated application of the Pythagorean theorem....
, as it is derived from the Pythagorean theorem
Pythagorean theorem

In mathematics, the Pythagorean theorem or Pythagoras' theorem is a relation in Euclidean geometry among the three sides of a triangle#Types of triangles....
, which does not hold in Non-Euclidean geometries
Non-Euclidean geometry

In mathematics, non-Euclidean geometry describes hyperbolic geometry and elliptic geometry, which are contrasted with Euclidean geometry. The essential difference between Euclidean and non-Euclidean geometry is the nature of Parallel lines....
. This distance formula
Formula

In mathematics and in the sciences, a formula is a concise way of expressing information symbolically , or a general relationship between quantities....
 can also be expanded into the arc-length formula
Arc length

Determining the length of an irregular arc segment ? also called rectification of a curve ? was historically difficult. Although many methods were used for specific curves, the advent of calculus led to a general formula that provides closed-form expression in some cases....
.

Distance in Euclidean space


In the Euclidean space
Euclidean space

Around 300 Before Christ, the Ancient Greece mathematician Euclid undertook a study of relationships among distances and angles, first in a plane and then in space....
 Rn, the distance between two points is usually given by the Euclidean distance
Euclidean distance

In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, which can be proven by repeated application of the Pythagorean theorem....
 (2-norm distance). Other distances, based on other norms
Norm (mathematics)

In linear algebra, functional analysis and related areas of mathematics, a norm is a function that assigns a strictly positive length or size to all vectors in a vector space, other than the zero vector....
, are sometimes used instead.

For a point (x1, x2, ...,xn) and a point (y1, y2, ...,yn), the Minkowski distance of order p (p-norm distance) is defined as:
1-norm distance
2-norm distance
p-norm distance  
infinity norm distance  


p need not be an integer, but it cannot be less than 1, because otherwise the triangle inequality
Triangle inequality

In mathematics, the triangle inequality states that for any triangle, the length of a given side must be less than the sum of the other two sides but greater than the difference between the two sides....
 does not hold.

The 2-norm distance is the Euclidean distance
Euclidean distance

In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, which can be proven by repeated application of the Pythagorean theorem....
, a generalization of the Pythagorean theorem
Pythagorean theorem

In mathematics, the Pythagorean theorem or Pythagoras' theorem is a relation in Euclidean geometry among the three sides of a triangle#Types of triangles....
 to more than two coordinates. It is what would be obtained if the distance between two points were measured with a ruler
Ruler

A ruler, or rule, is an Measuring instrument used in geometry, technical drawing and engineering/building to measure distances and/or to rule straight lines....
: the "intuitive" idea of distance.

The 1-norm distance is more colourfully called the taxicab norm or Manhattan distance
Taxicab geometry

File:Manhattan distance.svgTaxicab geometry, considered by Hermann Minkowski in the 19th century, is a form of geometry in which the usual metric space of Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the differences of their coordinates....
, because it is the distance a car would drive in a city laid out in square blocks (if there are no one-way streets).

The infinity norm distance is also called Chebyshev distance
Chebyshev distance

In mathematics, Chebyshev distance , or Lp space is a Metric defined on a vector space where the distance between two coordinate vectors is the greatest of their differences along any coordinate dimension....
. In 2D it represents the distance king
King (chess)

In chess, the King is the most important chess piece. The object of the game is to trap the opponent's king so that he would not be able to avoid capture ....
s must travel between two squares on a chessboard
Chessboard

A chessboard is the type of checkerboard used in the game of chess, and consists of 64 squares arranged in two alternating colors . The colors are called "black" and "white" , although the actual colors are usually dark green and buff for boards used in competition, and often natural shades of light and dark woods for home boards....
.

The p-norm is rarely used for values of p other than 1, 2, and infinity, but see; super ellipse.

In physical space the Euclidean distance is in a way the most natural one, because in this case the length of a rigid body
Rigid body

In physics, a rigid body is an idealization of a solid Physical body of finite size in which deformation is neglected. In other words, the distance between any two given Point s of a rigid body remains constant in time regardless of external forces exerted on it....
 does not change with rotation
Rotation

A rotation is a movement of an object in a circular motion. A two-dimensional object rotates around a center of rotation. A Three-dimensional space object rotates around a line called an axis....
.

Algebraic distance

The algebraic distance is a metric often used in computer vision
Computer vision

Computer vision is the science and technology of machines that see. As a scientific discipline, computer vision is concerned with the theory for building artificial systems that obtain information from images....
 that that can be minimized by least squares
Least squares

The method of least squares or ordinary least squares is used to solve overdetermined systems. Least squares is often applied in statistical contexts, particularly regression analysis....
 estimation. For curves or surfaces given in the form (such as a conic in homogeneous coordinates), the algebraic distance from the point to the curve is simply . It may serve as an "initial guess" for geometric distance to refine estimations of the curve by more accurate methods, such as non-linear least squares
Non-linear least squares

Non-linear least squares is the form of least squares analysis which is used to fit a set of m observations with a model that is non-linear in n unknown parameters ....
.

General case

In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, in particular geometry
Geometry

Geometry arose as the field of knowledge dealing with spatial relationships. Geometry was one of the two fields of pre-modern mathematics, the other being the study of numbers....
, a distance function
Metric (mathematics)

In mathematics, a metric or distance function is a function which defines a distance between elements of a Set . A set with a metric is called a metric space....
 on a given set M is a function
Function (mathematics)

The mathematical concept of a function expresses dependence between two quantities, one of which is known and the other which is produced. A function associates a single output to each input element drawn from a fixed Set , such as the real numbers , although different inputs may have the same output....
 d: M×M ? R, where R denotes the set of real number
Real number

In mathematics, the real numbers may be described informally in several different ways. The real numbers include both rational numbers, such as 42 and −23/129, and irrational numbers, such as pi and the square root of two; or, a real number can be given by an infinite decimal representation, such as 2.4871773339...., where the digits co...
s, that satisfies the following conditions:
  • d(x,y) = 0, and d(x,y) = 0 if and only if
    If and only if

    If and only if, in logic and fields that rely on it such as mathematics and philosophy, is a biconditional logical connective between statements....
     x = y. (Distance is positive between two different points, and is zero precisely from a point to itself.)
  • It is symmetric
    Symmetric relation

    In mathematics, a binary relation R over a Set X is symmetric if it holds for all a and b in X that if a is related to b then b is related to a....
    : d(x,y) = d(y,x). (The distance between x and y is the same in either direction.)
  • It satisfies the triangle inequality
    Triangle inequality

    In mathematics, the triangle inequality states that for any triangle, the length of a given side must be less than the sum of the other two sides but greater than the difference between the two sides....
    : d(x,z) = d(x,y) + d(y,z). (The distance between two points is the shortest distance along any path).
Such a distance function is known as a metric
Metric (mathematics)

In mathematics, a metric or distance function is a function which defines a distance between elements of a Set . A set with a metric is called a metric space....
. Together with the set, it makes up a metric space
Metric space

In mathematics, a metric space is a Set where a notion of distance between elements of the set is defined.The metric space which most closely corresponds to our intuitive understanding of space is the 3-dimensional Euclidean space....
.

For example, the usual definition of distance between two real numbers x and y is: d(x,y) = |x - y|. This definition satisfies the three conditions above, and corresponds to the standard topology
Topology

Topology is a major area of mathematics that has emerged through the development of concepts from geometry and set theory, such as those of space, dimension, shape, transformation and others....
 of the real line
Real line

In mathematics, the real line is simply the set R of singleton real numbers.However, this term is usually used when R is to be treated as a space of some sort, such as a topological space or a vector space....
. But distance on a given set is a definitional choice. Another possible choice is to define: d(x,y) = 0 if x = y, and 1 otherwise. This also defines a metric, but gives a completely different topology, the "discrete topology"; with this definition numbers cannot be arbitrarily close.

Distances between sets and between a point and a set

Various distance definitions are possible between objects. For example, between celestial bodies one should not confuse the surface-to-surface distance and the center-to-center distance. If the former is much less than the latter, as for a LEO
Low Earth orbit

A Low Earth Orbit is generally defined as an orbit within the Locus extending from the Earth?s surface up to an altitude of 2,000 km. Given the rapid orbital decay of objects below approximately 200 km, the commonly accepted definition for LEO is between 160 - 2,000 km above the Earth surface....
, the first tends to be quoted (altitude), otherwise, e.g. for the Earth-Moon distance, the latter.

There are two common definitions for the distance between two non-empty subset
Subset

In mathematics, especially in set theory, a Set A is a subset of a set B if A is "contained" inside B. Notice that A and B may coincide....
s of a given set:
  • One version of distance between two non-empty sets is the infimum
    Infimum

    In mathematics the infimum of a subset of some set is the greatest element, not necessarily in the subset, that is less than or equal to all elements of the subset....
     of the distances between any two of their respective points, which is the every-day meaning of the word. This is a symmetric prametric
    Prametric space

    In topology, a prametric space generalizes the concept of a metric space by not requiring the conditions of symmetry, indiscernability and the triangle inequality....
    . On a collection of sets of which some touch or overlap each other, it is not "separating", because the distance between two different but touching or overlapping sets is zero. Also it is not hemimetric
    Hemimetric space

    In mathematics, a hemimetric space is a generalization of a metric space, obtained by removing the requirements of identity of indiscernibles and of symmetric relation....
    , i.e., the triangle inequality
    Triangle inequality

    In mathematics, the triangle inequality states that for any triangle, the length of a given side must be less than the sum of the other two sides but greater than the difference between the two sides....
     does not hold, except in special cases. Therefore only in special cases this distance makes a collection of sets a metric space
    Metric space

    In mathematics, a metric space is a Set where a notion of distance between elements of the set is defined.The metric space which most closely corresponds to our intuitive understanding of space is the 3-dimensional Euclidean space....
    .
  • The Hausdorff distance
    Hausdorff distance

    The Hausdorff distance, or Hausdorff metric, measures how far two subsets of a metric space are from each other. It turns the set of non-empty set compact space subsets of a metric space into a metric space in its own right....
     is the larger of two values, one being the supremum
    Supremum

    In mathematics, given a subset S of a partially ordered set T, the supremum of S, if it exists, is the greatest element of T that is greater than or equal to each element of S....
    , for a point ranging over one set, of the infimum, for a second point ranging over the other set, of the distance between the points, and the other value being likewise defined but with the roles of the two sets swapped. This distance makes the set of non-empty compact
    Compact space

    In mathematics, a topological space is called compact if each of its open covers has a finite set subcover.Note: Some authors such as Nicolas Bourbaki use the term "quasi-compact" for this instead, and reserve the term "compact" for topological spaces that are both Hausdorff spaces and "quasi-compact"....
     subsets of a metric space itself a metric space
    Metric space

    In mathematics, a metric space is a Set where a notion of distance between elements of the set is defined.The metric space which most closely corresponds to our intuitive understanding of space is the 3-dimensional Euclidean space....
    .


The is the infimum of the distances between the point and those in the set. This corresponds to the distance, according to the first-mentioned definition above of the distance between sets, from the set containing only this point to the other set.

In terms of this, the definition of the Hausdorff distance can be simplified: it is the larger of two values, one being the supremum, for a point ranging over one set, of the distance between the point and the set, and the other value being likewise defined but with the roles of the two sets swapped.

Graph theory


In graph theory
Graph theory

In mathematics and computer science, graph theory is the study of graph : mathematical structures used to model pairwise relations between objects from a certain collection....
 the distance between two vertices is the length of the shortest path
Path (graph theory)

In graph theory, a path in a graph is a sequence of vertex such that from each of its vertices there is an edge to the next vertex in the sequence....
 between those vertices.

Distance versus directed distance and displacement


Distance cannot be negative. Distance is a scalar
Scalar (physics)

In physics, a scalar is a simple physical quantity that is not changed by coordinate system rotations or translations , or by Lorentz transformations or space-time translations ....
 quantity, containing only a magnitude
Magnitude (mathematics)

The magnitude of a mathematical object is its size: a property by which it can be larger or smaller than other objects of the same kind; in technical terms, an ordering of the class of objects to which it belongs....
, whereas a displacement vector
Displacement (vector)

In physics, displacement is the vector that specifies the change in position of a point or a particle in reference to a previous position. When the previous point is the origin, this is better referred to as a position vector....
 are vector quantities characterized by both magnitude and direction
Direction (geometry, geography)

Direction is the information contained in the relative position of one point with respect to another point without the distance information. Directions may be either Relative direction to some indicated reference , or absolute according to some previously agreed upon frame of reference ....
.

The distance covered by a vehicle (often recorded by an odometer
Odometer

An odometer is a device used for indicating distance traveled by an automobile or other vehicle. It may be electronics or Machine. The word derives from the Ancient Greek words hod?s, meaning 'path' or 'way', and m?tron, 'measure' ....
), person, animal, or object along a curved path from a point A to a point B should be distinguished from the respective displacement (the distance along a straight line from A to B). For instance, the distance covered during a round trip from A to B and back to A may be very long, while the displacement is always zero (because starting and ending points coincide).

Directed distance


Directed distances are distances with a direction or sense. They can be determined along straight lines and along curved lines. A directed distance along a straight line from A to B is a vector joining any two points in a n-dimensional Euclidean vector space. A directed distance along a curved line is not a vector and is represented by a segment of that curved line defined by endpoints A and B, with some specific information indicating the sense (or direction) of an ideal or real motion from one endpoint of the segment to the other (see figure). For instance, just labelling the two endpoints as A and B can indicate the sense, if the ordered sequence (A, B) is assumed, which implies that A is the starting point.

A displacement (see above) is a special kind of directed distance defined in mechanics
Mechanics

Mechanics is the branch of physics concerned with the behaviour of physical body when subjected to forces or Displacement , and the subsequent effect of the bodies on their environment....
. A directed distance is called displacement when it is the distance along a straight line (minimum distance) from A and B, and when A and B are positions occupied by the same particle at two different instants of time. This implies motion
Motion (physics)

In physics, motion means a constant change in the location of a body. Change in motion is the result of applied force. Motion is typically described in terms of velocity, acceleration, Displacement , and time....
 of the particle.

Another kind of directed distance is that between two different particles or point masses at a given time. For instance, the distance from the center of gravity of the Earth A and the center of gravity of the Moon B (which does not strictly imply motion from A to B).

Other "distances"

  • Mahalanobis distance
    Mahalanobis distance

    In statistics, Mahalanobis distance is a distance measure introduced by P. C. Mahalanobis in 1936. It is based on correlations between variables by which different patterns can be identified and analyzed....
     is used in statistics
    Statistics

    Statistics is a Mathematics pertaining to the collection, analysis, interpretation or explanation, and presentation of data. It also provides tools for prediction and forecasting based on data....
    .
  • Hamming distance
    Hamming distance

    In information theory, the Hamming distance between two String s of equal length is the number of positions for which the corresponding symbols are different....
     and Lee distance
    Lee distance

    In coding theory, the Lee distance is a distance between two String s and of equal length n over the q-ary alphabet of size .It is Metrics, defined as...
     are used in coding theory
    Coding theory

    Coding theory is a branch of information theory, electrical engineering, digital communication, mathematics, and computer science designing efficient and reliable data transmission methods, so that redundancy in the data can be removed and errors induced by a noisy channel can be corrected....
    .
  • Levenshtein distance
    Levenshtein distance

    In information theory and computer science, the Levenshtein distance is a string metric for measuring the amount of difference between two sequences ....
  • Chebyshev distance
    Chebyshev distance

    In mathematics, Chebyshev distance , or Lp space is a Metric defined on a vector space where the distance between two coordinate vectors is the greatest of their differences along any coordinate dimension....


See also