- Introduced by
- Dezert, J., Tchamova, A., Han, D., Bhotto, M. Z. A.
- Year
- 2020
- Type
- Distance (L1, city-block)
- Family
- Distance
What does it do?
Manhattan distance, also called the L1 norm, city-block distance or taxicab distance, measures the separation between two equal-length numeric vectors as the sum of their absolute component differences.
It belongs to the distance family used in multi-criteria decision making (MCDM).
The intuition behind the method
Consider two alternatives described by the same set of numeric criteria. Manhattan distance adds up the size of the gap on each criterion, ignoring direction, so every gap counts in proportion to its magnitude. The name refers to travel along a rectangular street grid, where the trip length is the total of east-west and north-south blocks rather than the straight-line diagonal. In decision work it is best understood as a building block, for example a distance from an alternative's profile to a reference profile, not a complete ranking procedure on its own. The result is meaningful only if the criteria were placed on comparable scales beforehand.
History
Manhattan distance is the case p = 1 of the Minkowski distance and the metric of taxicab geometry, in which distances are measured along horizontal and vertical grid lines. As a standard construct in mathematics and computing, it predates its use in decision analysis.
When to use it
Choose Manhattan distance when you need a distance between two crisp, equal-length vectors and want each component's gap to contribute linearly, without squaring, so that no single large gap dominates the total. It fits comparisons of an alternative's criterion profile against a reference profile, and situations where the criteria have already been normalised to a common scale. Do not use it when the criteria are in different units and have not been rescaled, when inputs are uncertain, interval-valued or fuzzy, or when you need a distance that penalises large gaps more heavily than small ones, for which the squared Euclidean form is the usual alternative.
Limitations and considerations
- The formula applies no normalisation. Components measured in different units contribute in their own units, so the criteria must be placed on comparable scales before the vectors are formed.
- The formula has no weighting term. Differences in criterion importance are not represented unless they are applied to the vectors before the distance is computed.
- The measure is defined for crisp numeric values only. It has no mechanism for uncertain, interval-valued or fuzzy inputs.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The formula is a single sum of absolute differences, so every term can be checked by hand. For example, between a = [3.0, 5.0, 4.0] and b = [5.0, 3.0, 2.0] the differences are 2.0, 2.0 and 2.0, which sum to 6.0.
- Because the differences are not squared, one large gap contributes only in proportion to its size. This makes the total less dominated by a single component than a squared-difference distance would be.
- The formula requires no parameters beyond the two vectors. It contains no weights, exponents or thresholds that must be chosen by the analyst.
Applications
- Measuring the distance between an alternative's criterion profile and a reference or ideal profile, after the criteria have been normalised.
- Serving as a dissimilarity measure in hierarchical clustering of numeric data. In the R pvclust example on the iris data, the call pvclust(..., method.dist = "manhattan", method.hclust = "ward.D") computes bootstrap-supported clusters from Manhattan distances (Shipunov-visual_statistics, p. 300).
- Possibly serving as a secondary distance in some CODAS formulations.
How it works
How it works
Compute the sum, over all n components, of the absolute difference between a_j and b_j. The absolute value makes each gap positive regardless of which vector is larger, and the sum gives the total separation between a and b.
Formula
d_M(\mathbf{a},\mathbf{b}) = \sum_{j=1}^{n}|a_j - b_j|Common pitfalls
- The output is a distance, not a score. Zero means identical vectors and larger values mean greater separation, so ranking alternatives by closeness to a reference requires sorting in ascending order.
- The absolute value treats a gap in either direction identically. Benefit and cost criteria must therefore be oriented consistently before the vectors are compared, or the distance will not reflect preference.
- The sum grows with the number of components. Distances computed over different numbers of criteria are not directly comparable.
- Components with larger numeric ranges dominate the sum. Each term is an absolute difference in the component's own scale, so a criterion measured over a wide range contributes more than one measured over a narrow range, even when it is less important. Normalise the criteria (for example by min-max scaling) whenever their ranges differ, not only when their units differ.
Frequently asked questions
Why is the example distance 6.0?
The component differences for a = [3.0, 5.0, 4.0] and b = [5.0, 3.0, 2.0] are |3.0 - 5.0| = 2.0, |5.0 - 3.0| = 2.0 and |4.0 - 2.0| = 2.0. Their sum is 6.0.
How does Manhattan distance differ from Euclidean distance?
Manhattan distance sums absolute differences, while Euclidean distance squares the differences, sums them and takes the square root. Squaring gives larger gaps proportionally more weight in the Euclidean form.
Does the measure account for criteria with different units?
No. The formula contains no normalisation step, so the vectors must be rescaled to comparable units before the distance is computed.
Related methods
Sources
Dezert, J., Tchamova, A., Han, D., Bhotto, M. Z. A. (2020). Manhattan Distance. IEEE Transactions on Cybernetics
Open publication referenceShipunov-visual_statistics, p. 300