# Definition:Taxicab Metric

## Definition

Let $M_{1'} = \left({A_{1'}, d_{1'}}\right)$ and $M_{2'} = \left({A_{2'}, d_{2'}}\right)$ be metric spaces.

Let $A_{1'} \times A_{2'}$ be the cartesian product of $A_{1'}$ and $A_{2'}$.

The taxicab metric on $A_{1'} \times A_{2'}$ is defined as:

$d_1 \left({x, y}\right) := d_{1'} \left({x_1, y_1}\right) + d_{2'} \left({x_2, y_2}\right)$

where $x = \left({x_1, x_2}\right), y = \left({y_1, y_2}\right) \in A_{1'} \times A_{2'}$.

### General Definition

The taxicab metric on $\displaystyle \mathcal A = \prod_{i \mathop = 1}^n A_{i'}$ is defined as:

$\displaystyle d_1 \left({x, y}\right) := \sum_{i \mathop = 1}^n d_{i'} \left({x_i, y_i}\right)$

where $x = \left({x_1, x_2, \ldots, x_n}\right), y = \left({y_1, y_2, \ldots, y_n}\right) \in \mathcal A$.

### Real Number Plane

This metric is often seen in the context of the real number plane $\R^2$:

The taxicab metric on $\R^2$ is defined as:

$\displaystyle d_1 \left({x, y}\right) := \left\vert {x_1 - y_1}\right\vert + \left\vert {x_2 - y_2}\right\vert$

where $x = \left({x_1, x_2}\right), y = \left({y_1, y_2}\right) \in \R^2$.

## Graphical Example

This diagram shows the open $\epsilon$-ball of point $A$ in the $\left({\R^2, d_1}\right)$ metric space where $d_1$ is the taxicab metric.

Note that $\epsilon = \epsilon_1 + \epsilon_2$.

Neither the boundary lines nor the extreme points are actually part of the open $\epsilon$-ball.

## Linguistic Note

Imagine a city whose streets form a grid pattern. That is, all the streets run, for example, either North-South or East-West.

It is assumed that one can travel only along the streets.

To travel between any two locations in the city, one must therefore travel a certain distance (possibly zero) North or South, and a certain distance (also possbly zero) East or West.

The driver of a taxicab constantly needs to know the distance between any two points in the city.

However, that distance is measured not directly, but along the streets of the city.

Hence the distance between any two points in a taxicab metric is measured as the sum of the difference between the corresponding coordinates of those points.

## Also see

• Results about the taxicab metric can be found here.

## Notation

The notation is awkward, because it is necessary to use a indexing subscript for the $n$ metric spaces contributing to the product, and also for the $p$th exponential that defines the metric itself.

Thus the "prime" notation on the $n$ metric spaces.