Minkowski Distance
The Minkowski distance is the general metric that, depending on the order p, becomes Manhattan (p = 1), Euclidean (p = 2) or Chebyshev (p → ∞).
The Minkowski distance is a general metric that measures the separation between two points in an n-dimensional space, and it encompasses several of the most widely used distances in machine learning as special cases. Its defining feature is a parameter, the order p, that tunes how the measurement is made. For two vectors x = (x1, ..., xn) and y = (y1, ..., yn), it is defined as the p-th root of the sum of the absolute coordinate differences raised to the power p.
In plain text, the formula is: d(x, y) = ( |x1 − y1|^p + |x2 − y2|^p + ... + |xn − yn|^p )^(1/p). In words, you take each coordinate-wise difference in absolute value, raise it to the power p, add all the terms, and apply the p-th root to the result. The distance satisfies the triangle inequality —and is therefore a valid metric— only when p ≥ 1; for values of p below 1 the formula stops being a metric.
Special cases: p = 1, p = 2 and p → ∞
The value of p turns the Minkowski distance into familiar metrics. With p = 1 you get the Manhattan distance (the L1 norm), the sum of absolute differences per coordinate, covered in depth by its own entry in this glossary. With p = 2 you recover the Euclidean distance (the L2 norm), the straight line between two points taught by classical geometry. As p tends to infinity, the expression converges to the Chebyshev distance, which is simply the largest of the absolute differences across coordinates. A single formula thus spans everything from the full sum to the single biggest gap.
What the parameter p controls
The order p governs how much large differences weigh relative to small ones. The higher p is, the more the dimensions where the two points differ most come to dominate: the coordinates with the greatest separation take over, reaching the Chebyshev extreme where only the maximum counts. With a low p, by contrast, every difference contributes more evenly. Choosing p is, in practice, deciding which geometry best fits the data.
Uses in artificial intelligence
The parameter p changes which differences carry more weight. Like any feature-space distance, it is useful only when the coordinates represent differences relevant to the problem.
This article was produced with artificial intelligence under human editorial oversight.