Manhattan distance measures the distance between two points by adding their absolute coordinate differences: |y2 − y1| + |x2 − x1|. It follows a grid-like path along perpendicular axes, so it is also called city block distance or the taxicab metric. section 2.3
Use Manhattan distance to:
- Measure distance or similarity between observations in clustering. section 2.4.2 section 2.2
- Consider an L1 metric when datasets have many dimensions or variables, where it may be preferable to Euclidean distance. section 2.3
- Combine it with single, complete, group-average, or Ward linkage when developing hierarchical clustering. section 2.4.2
(2.3)
Manhattan distance = (|y2 – y1| + |x2 – x1|)
Equation 2.3 gives the coordinate-based formula for Manhattan distance. section 2.3



