Two points pi, qi
# Euclidean distance
d(pi,qi) = (∑(pi-qi)^2)^(1/2)
# Chebyshev distance
measures distance assuming only the most significant dimension is relevant.
d(pi,qi) = max(|pi-qi|) max for each i
Also called L∞ metric, as d = lim p->∞ (∑|pi-qi|^p)^(1/p)
# Manhattan distance
d(pi,qi) = ∑i (|pi-qi|)
measures distance following only axis-aligned directions.
# Minkowski distance of order p (p-norm distance)
d = (∑|pi-qi|^p)^(1/p)
a generalization that unifies Euclidean distance (p=2), Manhattan distance (p=1), and Chebyshev distance (p=∞).