Taxicab distance
High school
Consider two points $p = (p_1, \dots, p_n)$ and $q = (q_1, \dots, q_n)$ in $\reals^n$. The taxicab distance between $p$ and $q$ is the distance traveled from $p$ to $q$ when moving parallel to one axis at a time, as along the streets of a grid:
\[d_1(p, q) = \abs{p_1 - q_1} + \dots + \abs{p_n - q_n}.\]
Undergraduate
Consider two points $p = (p_1, \dots, p_n)$ and $q = (q_1, \dots, q_n)$ in $\reals^n$. The taxicab distance between $p$ and $q$ is defined as
\[d_1(p, q) = \sum_{i=1}^n \abs{p_i - q_i}.\]Examples
Worked examples
- The north pole $p = (0, 0, 1)$ and the point $q = (1, 0, 0)$ on the equator of the unit sphere in $\reals^3$ : $d_1(p, q) = 1 + 0 + 1 = 2$ High school
-
The points $p = (0, 0)$ and $q = (100, 100)$ in $\reals^2$
: $d_1(p, q) = 100 + 100 = 200$
High school
In the discrete metric, they are at distance $1$, the same as every two different points, so the discrete metric does not measure size at all.
-
The points $p = (0, 0)$ and $q = (2, 0)$ in $\reals^2$
: $d_1(p, q) = 2 + 0 = 2$
High school
Only the discrete metric differs.
-
The points $p = (1, 1)$ and $q = (4, 5)$ in $\reals^2$
: $d_1(p, q) = 3 + 4 = 7$
High school
The points $(1, 1)$ and $(4, 5)$ differ by $3$ in the first coordinate and $4$ in the second.
Properties
- The taxicab distance is $\norm{p - q}_1$, the 1-norm of the difference.
Distinctions involving this term
- Types of distances: A metric measures how far apart two points are, and the same two points can be at different distances under different metrics. The Euclidean distance is the straight-line distance, the taxicab distance travels along the axes, and the Chebyshev distance takes the largest difference in one coordinate. The geodesic distance is the length of the shortest path that stays on a surface, such as the great-circle distance on the Earth. The discrete metric only says whether two points are equal.