The taxicab metric, also called the taxicab distance, rectilinear distance, city block distance, or Manhattan distance, is the metric of
the Euclidean plane defined by
for all points and . This number is equal
to the length of all paths connecting and along horizontal and vertical segments, without ever going
back, like those described by a car moving in a lattice-like street pattern.