A measure of the distance between points in multidimensional space (also called a metric). Distance measures are used with techniques such as cluster analysis and multidimensional scaling. The two measures most commonly used are Euclidean distance and the city-block metric.
Euclidean distance is the straight-line distance between two points. In d dimensions, if the positions of P and Q are given by the coordinates (p1, p2,…, pd) and (q1, q2,…, qd) then the Euclidean distance between P and Q is given by
The city-block metric in two dimensions measures the distance between two points in a city if, for example, the only directions in which one could travel were north-south and east-west. It is also called the Manhattan distance. In d dimensions the city-block distance between P and Q is given by
A generalization of the previous measures is the Minkowski distance
where k is a positive integer. Euclidean distance is the Minkowski distance of order 2, and Manhattan distance is the Minkowski distance of order 1.
The Chebyshev distance is the largest difference over the d dimensions
Two other measures that have been proposed are the Canberra distance, given by
and, in the context of counts of organisms, the Bray-Curtis distance (also called the Sorensen distance):