Methods · Distance
MANHATTAN DISTANCE (Manhattan Distance)
Manhattan distance measures the difference between two alternatives by summing the absolute deviation on each criterion one by one; a large deviation on one criterion does not overshadow the others.
Base method's data type: Classical
What Is the Method?
Manhattan distance is a distance measure that gives the total difference between two numerical vectors (an alternative and an ideal point, or two alternatives). Its input is two equal-length number sequences, its output a single figure: the sum of the absolute difference on each criterion. It is a building block that feeds the "how far is this alternative from the ideal" step of ranking methods such as TOPSIS, CODAS and MABAC; it is not a ranking method in its own right.
Its name comes from the distance covered on a city's grid-shaped streets by moving only horizontally and vertically, never diagonally; this geometry was introduced as "taxicab geometry" by Krause (1973). Mathematically, Manhattan distance is the p=1 special case of the Minkowski distance family; the roots of the general Lp norm lie in Minkowski's (1910) work. Some methods, CODAS among them, use Manhattan distance as a second measure alongside Euclidean distance.
The Philosophy Behind It
The idea behind Manhattan distance is this: the overall difference between an alternative and the ideal is the plain sum of the deviation on each criterion, no more and no less. Euclidean distance squares each deviation before taking the root, inflating large deviations disproportionately; Manhattan does not do this, counting every deviation as it stands, linearly.
This choice has a consequence: Manhattan distance is more robust to outliers than Euclidean distance. An alternative that is very poor on one criterion and good on the others is heavily penalised under Euclidean distance because of that single poor criterion; under Manhattan distance, the same deviation enters the sum only in proportion to its own share. If the decision-maker's question is "what is the overall deviation, regardless of which criterion it comes from", Manhattan is the right tool; if it is "a large failure on a single criterion should overshadow everything else", Euclidean or a high-p Minkowski distance is more suitable.
How It Works
The calculation consists of a single step.
One step: summing absolute differences. The two vectors are laid alongside one another in the same order; the difference between the two values on each criterion is taken and recorded regardless of sign (absolute value). These absolute differences are summed, and the result is the Manhattan distance. If the deviations on three criteria are 2, 2 and 30, the total is 34; if the deviations are 12, 12 and 12, the total is 36, and a more evenly spread total of deviations comes out slightly larger here than one concentrated at a single point. How the deviations are distributed changes the result far more sharply under Euclidean distance; the second case demonstrates this with figures.
The formula for this step and its implementation in DecisionMind are given on the method page; this card carries no formulas.
How to Read the Output
Manhattan distance is the total absolute deviation between two alternatives; it says nothing else. A value of zero means the two vectors are identical; a large value means the overall deviation is large. This figure is not a percentage and not a probability, and it is only meaningful between comparisons built with the same set of criteria and the same scale; if criteria are in different units (say, currency and days), they must first be brought onto a common scale (normalisation), otherwise a criterion with large figures dominates the sum on its own.
A further feature of Manhattan distance is that it conceals where the deviation comes from: a total deviation of 0.37 might come from a single criterion, or be shared equally across three. For this reason, Manhattan distance should not be reported alone by the host method; which criteria contribute most to the deviation should be shown separately.
Thus instead of writing:
"The Manhattan distance is 0.37, so this alternative is 63 per cent as good as the ideal"
it is correct to write:
"The total absolute deviation is 0.37; which criterion this deviation chiefly comes from must be stated separately, because the total alone does not show this"
Data Type and Inputs
Manhattan distance works with crisp numerical data. Under this name, DM3 holds only the base Manhattan member; it has no separate extension. You need: two equal-length numerical vectors, preferably already brought onto the same scale (normalised), because Manhattan distance itself performs no scaling. A minimum of two criteria and two alternatives suffices; there is no upper limit, and three to twelve criteria give a comfortably readable table. Manhattan produces no weights and requires none; weighting falls to the host method (TOPSIS's second step, for instance) and is generally applied before Manhattan distance is calculated.
When to Use It, When Not To
If your criteria are numerical, have been brought onto a common scale, and you do not want a single outlying criterion to dominate the result on its own, Manhattan is a suitable choice. In some host methods, such as CODAS, Manhattan is automatically used as a second measure alongside Euclidean distance; in that case it need not be separately chosen, as it is part of the method's own definition.
It should not be used where a large failure on one criterion ought to weigh disproportionately on the decision; Euclidean or a high-p Minkowski distance is more suitable there, because these inflate large deviations by squaring (or a higher power). Where criteria are binary or categorical, Hamming distance should be used rather than Manhattan. Where criteria are strongly related (correlated) and this relationship should be taken into account, Mahalanobis distance is more suitable.
Numerical data, robustness to outliers wanted → Manhattan
A large deviation on a single criterion should be penalised → Euclidean or a high-p Minkowski
Criteria binary/categorical → Hamming
Criteria are related to one another (correlated) → Mahalanobis
Already used as a second measure alongside Euclidean, as in CODAS → no separate choice needed
Strengths
Manhattan distance's greatest strength is its robustness to outliers: a single large deviation on one criterion does not inflate the total as sharply as under Euclidean distance, because deviations enter the sum directly rather than squared. It is simple to calculate and easily explained to a decision-maker as "the total absolute difference". Its computational burden grows linearly as the number of criteria and alternatives increases, and it runs quickly on large tables. Used alongside Euclidean distance, as in CODAS, the two measures' different sensitivities, one squared, one linear, complement one another.
Weaknesses
Its limitations follow from its definition. First, it conceals where the deviation comes from; the same total can arise from very different deviation patterns, and this pattern remains invisible unless examined separately. Second, if criteria sit on different scales (one 0-1, one 0-1000), the total is dominated by the large-scale criterion; normalisation beforehand is essential. Third, different distance measures can rank the same table differently (Chen and Tsao, 2007); choosing Manhattan is itself a decision and must be justified in the report. Fourth, it does not take the relationship (correlation) between criteria into account; the deviation of two criteria that influence one another is summed separately as though they were independent. Fifth, its robustness to outliers is sometimes an unwelcome property: where a genuinely serious failure needs to be noticed, this robustness weakens the signal.
Common Mistakes
The most common mistake is applying Manhattan distance directly to raw, unnormalised data; when criteria on different scales are summed, the large-scale criterion determines the total on its own. A second mistake is assuming Manhattan and Euclidean distance will always give the same order; where deviations are concentrated in a single criterion, the two measures can favour different alternatives. A third mistake is interpreting the result, in a method that uses Euclidean and Manhattan together, such as CODAS, without knowing when the second measure comes into play (the threshold value); the switching rule between the two measures is part of the method's own definition and cannot be ignored. A fourth mistake is reading the total deviation as an "average deviation"; a total is not an average unless divided by the number of criteria, and totals from tables with different numbers of criteria cannot be compared.
The governing principle is this:
Manhattan distance counts the total deviation linearly and holds a single large deviation at equal weight with the others; if this is not exactly what you want, Euclidean or a Minkowski distance with a different p value is needed.
Cases
Each case opens with a deviation table, describes in words what Manhattan distance does to it, and shows how to read the result. The first case is DM3's own validation example; the figures have been recalculated and verified in Python. The remaining cases are illustrative constructions.
1. Validation: Comparing two numerical vectors (DM3 validation example)
DM3's Manhattan-distance engine compares two vectors across three criteria (D1-D3): a = (3, 5, 4) and b = (5, 3, 2).
| Vector | D1 | D2 | D3 |
|---|---|---|---|
| a | 3 | 5 | 4 |
| b | 5 | 3 | 2 |
| |a-b| | 2 | 2 | 2 |
The method takes the absolute difference on each criterion: on D1, |3-5|=2; on D2, |5-3|=2; on D3, |4-2|=2. These three differences are summed.
Result: Manhattan distance d = 6.
This means the total absolute deviation between a and b is 6; the deviation is spread evenly across the three criteria (2 each).
In the report: "The total absolute deviation between a and b is 6; this deviation is spread evenly across the three criteria."
Source: This example is DM3's Manhattan-engine validation case, constructed for illustrative purposes.
2. Public Transport: Bus fleet maintenance contract proposals
A municipality has evaluated three maintenance firms' (F1, F2, F3) proposals on three criteria (unit maintenance cost, average breakdown-response time, spare-parts delivery delay; all three "lower is better"). The weighted normalised table is as follows; the ideal is built from the smallest (best) value on each criterion.
| Firm | K1 | K2 | K3 |
|---|---|---|---|
| F1 | 0.10 | 0.12 | 0.40 |
| F2 | 0.14 | 0.10 | 0.06 |
| F3 | 0.30 | 0.28 | 0.05 |
| Ideal | 0.10 | 0.10 | 0.05 |
F1's value on K3 (0.40) is far higher than the other firms'; there is a large deviation on this single criterion, while on K1 and K2 F1 sits very close to the ideal. Manhattan distance sums these three deviations as they stand: for F1, 0+0.02+0.35=0.37. Euclidean distance squares the same deviations, sums them and takes the root: for F1, sqrt(0+0.0004+0.1225)=0.35.
| Firm | Manhattan (L1) | Rank (L1) | Euclidean (L2) | Rank (L2) |
|---|---|---|---|---|
| F2 | 0.05 | 1 | 0.041 | 1 |
| F1 | 0.37 | 2 | 0.351 | 3 |
| F3 | 0.38 | 3 | 0.269 | 2 |
F2 comes first on both measures. But the order between F1 and F3 reverses: by Manhattan, F1 (0.37) is slightly better than F3 (0.38); by Euclidean, F3 (0.269) is markedly better than F1 (0.351). This is because F1's single large deviation on K3 (0.35) is squared under Euclidean (0.1225) and dominates the total, whereas under Manhattan it enters the sum linearly, in proportion to its own share alone. F3's deviation, by contrast, is more evenly spread across two criteria (K1: 0.20, K2: 0.18).
The municipality hesitates here: if F1's failure on K3 (spare-parts delivery delay) is serious and should be penalised, Euclidean distance gives the correct ranking (F3 ahead); if the total of the deviations matters and a single poor criterion should not be allowed to overshadow the others, Manhattan (F1 ahead) is preferred.
In the report: "F2 is clearly the best proposal. The order between F1 and F3 depends on the distance measure chosen: Manhattan favours F1, Euclidean favours F3; this difference stems from F1's single large deviation on spare-parts delivery delay."
3. Textiles: CODAS's joint use of two measures in choosing a fabric supplier
A textile firm is evaluating three fabric suppliers (G1, G2, G3) on five criteria and ranking them using the CODAS method. CODAS calculates each alternative's Euclidean distance (E) and Manhattan distance (T) to the worst (negative-ideal) point together; if two alternatives' Euclidean distances differ by more than a given threshold (τ=0.02), the Manhattan difference is also added to the comparison, while for small differences that stay under the threshold only the Euclidean difference is used.
The weighted normalised table and the negative ideal (the worst, smallest value on each criterion) are as follows:
| Supplier | K1 | K2 | K3 | K4 | K5 |
|---|---|---|---|---|---|
| G1 | 0.0947 | 0.0947 | 0.0947 | 0.0947 | 0.0947 |
| G2 | 0.20 | 0.05 | 0.05 | 0.05 | 0.05 |
| G3 | 0.05 | 0.05 | 0.05 | 0.05 | 0.05 |
| Negative ideal | 0.05 | 0.05 | 0.05 | 0.05 | 0.05 |
G1's deviation on all five criteria is equal and moderate (0.0447 on each); G2's deviation is concentrated on a single criterion (0.15 on K1), with no deviation on the other four.
| Supplier | Euclidean distance (E) | Manhattan distance (T) |
|---|---|---|
| G1 | 0.10 | 0.224 |
| G2 | 0.15 | 0.15 |
| G3 | 0.00 | 0.00 |
Looking at Euclidean distance alone, G2 (0.15) appears superior to G1 (0.10), because it sits further from the negative ideal. But since the Euclidean gap between G1 and G2 (0.05) exceeds the threshold (0.02), CODAS also brings in the Manhattan difference; G1's Manhattan distance (0.224) is markedly larger than G2's (0.15), because G1's deviation is spread across five criteria while G2's is concentrated on one. Once the two measures are calculated together, CODAS's final assessment score puts G1 ahead of G2; G3 comes last on both measures with zero deviation (being the negative ideal itself).
| Supplier | Euclidean-only rank | CODAS (Euclidean+Manhattan) rank |
|---|---|---|
| G2 | 1 | 2 |
| G1 | 2 | 1 |
| G3 | 3 | 3 |
The firm hesitates here: had only Euclidean distance been consulted, G2 would have been chosen; the Manhattan term that CODAS adds by its own definition rewards G1's balanced performance spread across five criteria and turns the order in G1's favour. This is a design decision accepted the moment CODAS is chosen, not an additional preference.
In the report: "Under CODAS's definition, which uses Euclidean and Manhattan distance together, G1 ranks first. Had only Euclidean distance been consulted, G2 would have come out ahead; the difference stems from G1's deviation being spread evenly across five criteria, while G2's is concentrated on one."
4. What Not to Do
In the public-transport case, firmly reporting the order between F1 and F3 by looking only at Manhattan and saying "F1 is better", without stating that Euclidean says the opposite, is the first error. The second error, in the textiles case, is ignoring CODAS's Manhattan term and declaring G2 the winner based on Euclidean distance alone; CODAS's own definition uses both together. The third error is applying Manhattan distance directly to raw criterion values on different scales (currency and days, say) without normalisation; the large-scale criterion then determines the total on its own.
Sources
For the formula for this step and its implementation in DecisionMind, see the method page: decisionmind.app/library/dist-manhattan
Minkowski, H. (1910). Geometrie der Zahlen (2nd ed.). Teubner, Leipzig. (no DOI; this is the mathematical origin of Manhattan distance, the p=1 special case of the Lp distance family.)
Krause, E. F. (1973). Taxicab Geometry. The Mathematics Teacher, 66(8), 695-706. DOI: 10.5951/mt.66.8.0695
Chen, T.-Y., & Tsao, C.-Y. (2007). Experimental analysis of the intuitionistic fuzzy TOPSIS method on distance measures. Information Sciences 2007 (7th International FLINS Conference), 1057-1063. DOI: 10.1142/9789812709677_0148
Deza, M. M., & Deza, E. (2009). Encyclopedia of Distances. Springer-Verlag Berlin Heidelberg. DOI: 10.1007/978-3-642-00234-2_1