# Definition:Taxicab Metric

## Definition

Let $M_{1'} = \struct {A_{1'}, d_{1'} }$ and $M_{2'} = \struct {A_{2'}, d_{2'} }$ 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:

- $\map {d_1} {x, y} := \map {d_{1'} } {x_1, y_1} + \map {d_{2'} } {x_2, y_2}$

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

### General Definition

The **taxicab metric** on $\ds \AA = \prod_{i \mathop = 1}^n A_{i'}$ is defined as:

- $\ds \map {d_1} {x, y} := \sum_{i \mathop = 1}^n \map {d_{i'} } {x_i, y_i}$

where $x = \tuple {x_1, x_2, \ldots, x_n}, y = \tuple {y_1, y_2, \ldots, y_n} \in \AA$.

### Real Number Plane

This metric is often seen in the context of the real number plane $\R^2$ and general real vector space $\R^n$:

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

- $\map {d_1} {x, y} := \size {x_1 - y_1} + \size {x_2 - y_2}$

where $x = \tuple {x_1, x_2}$, $y = \tuple {y_1, y_2} \in \R^2$.

### Real Vector Space

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

- $\ds \map {d_1} {x, y} := \sum_{i \mathop = 1}^n \size {x_i - y_i}$

where $x = \tuple {x_1, x_2, \ldots, x_n}, y = \tuple {y_1, y_2, \ldots, y_n} \in \R^n$.

## Graphical Example

This diagram shows the open $\epsilon$-ball $\map {B_\epsilon} {A; d_1}$ of point $A$ in the $\struct {\R^2, d_1}$ 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.

## Sources

- 1975: W.A. Sutherland:
*Introduction to Metric and Topological Spaces*... (previous) ... (next): $2$: Continuity generalized: metric spaces: $2.2$: Examples: Example $2.2.7$