# Manhattan distance

*450*pages on

this wiki

**Taxicab geometry**, considered by Hermann Minkowski in the 19th century, is a form of geometry in which the usual metric of Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the (absolute) differences of their coordinates.

## Manhattan distance Edit

**More formally, we can define the Manhattan distance, also known as the L _{1}-distance, between two points in an Euclidean space with fixed Cartesian coordinate system is defined as the sum of the lengths of the projections of the line segment between the points onto the coordinate axes.**

**For example, in the plane, the Manhattan distance between the point P_{1} with coordinates (x_{1}, y_{1}) and the point P_{2} at (x_{2}, y_{2}) is**

Notice that the Manhattan distance depends on the choice on the rotation of the coordinate system, but does not depend on the translation of the coordinate system or its reflection with respect to a coordinate axis.

**Manhattan distance is also known as city block distance. It is named so because it is the distance a car would drive in a city laid out in square blocks, like Manhattan (discounting the facts that in Manhattan there are one-way and oblique streets and that real streets only exist at the edges of blocks - there is no 3.14th Avenue). Any route from a corner to another one that is 3 blocks East and 6 blocks North, will cover at least 9 blocks.**

## Chess Edit

In chess, the distance between squares on the chessboard for rooks is measured in Manhattan distance; kings and queens use Chebyshev distance, and bishops use the Manhattan distance (between squares of the same color) on the chessboard rotated 45 degrees, i.e., with its diagonals as coordinate axes. To reach from one square to another, only kings require the number of moves equal to the distance; rooks, queens and bishops require one or two moves (on an empty board, and assuming that the move is possible at all in the bishop's case).