Manhattan Distance
The sum of the absolute differences along each coordinate. It is named after a city where the streets run only along the axes.
\[
d(A,B)=\sum_{i=1}^{n}\lvert x_i-y_i\rvert
\]
Example
For the points \(A=(1,2)\) and \(B=(4,6)\):
\[
d= \lvert1-4\rvert+\lvert2-6\rvert = 3+4 = 7
\]
For the same points, the Euclidean distance gives 5.
When It Is Used
Manhattan distance is less sensitive to outliers than Euclidean distance and is often used in metric methods.