Geometry, Topology · Siblings

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.

Definitions

Euclidean distance

High school

Consider two points $p = (p_1, \dots, p_n)$ and $q = (q_1, \dots, q_n)$ in $\reals^n$. The Euclidean distance between $p$ and $q$ is the length of the straight segment from $p$ to $q$:

\[d_2(p, q) = \sqrt{(p_1 - q_1)^2 + \dots + (p_n - q_n)^2}.\]
Undergraduate

Consider two points $p = (p_1, \dots, p_n)$ and $q = (q_1, \dots, q_n)$ in $\reals^n$. The Euclidean distance between $p$ and $q$ is

\[d_2(p, q) = \norm{p - q}_2\]

where $\norm{\cdot}$ indicates the Euclidean norm.

Worked examples

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}.\]
Worked examples
Properties
  • The taxicab distance is $\norm{p - q}_1$, the 1-norm of the difference.

Chebyshev distance

High school

Consider two points $p = (p_1, \dots, p_n)$ and $q = (q_1, \dots, q_n)$ in $\reals^n$. The Chebyshev distance between $p$ and $q$ is the largest difference in any one coordinate:

\[d_{\infty}(p, q) = \max_i \abs{p_i - q_i}.\]
Worked examples
Properties
  • The Chebyshev distance is $\norm{p - q}_{\infty}$, the infinity norm of the difference.
  • On a chessboard, the Chebyshev distance between two squares is the number of moves a king needs to go from one to the other.

geodesic distance

High school

Consider two points $p$ and $q$ on a surface, such as two cities on the Earth. The geodesic distance between $p$ and $q$ is the length of the shortest path from $p$ to $q$ that stays on the surface.

Caveat. On a sphere, the shortest path follows a great circle, so the geodesic distance is the great-circle distance.
Graduate (Riemannian manifolds)

Consider a connected Riemannian manifold $M$ and two points $p, q \in M$. The geodesic distance between $p$ and $q$ is the infimum of the lengths of the piecewise smooth curves in $M$ from $p$ to $q$:

\[d(p, q) = \inf \setdef{\int_0^1 \norm{\gamma^{\prime}(t)} \dt \suchthat \gamma(0) = p, \gamma(1) = q}.\]
Worked examples
Properties
  • The geodesic distance is at least the Euclidean distance through the surrounding space, because a straight segment is the shortest of all paths, including those that leave the surface.
  • In the plane (or in $\reals^n$), the geodesic distance is the Euclidean distance, because the straight segment stays in the space.
  • A shortest path is called a geodesic. Geodesics need not be unique: every half great circle from the north pole to the south pole is a shortest path.

discrete metric

Undergraduate

Consider a set $X$. The discrete metric on $X$ is the metric $d$ such that $d(p, q) = 1$ for $p \neq q$ and $d(p, p) = 0$.

Examples
Worked examples
Properties
  • The discrete metric does not come from a norm, even on $\reals^n$, because $d(2p, 0) = 1 = d(p, 0)$ for every $p \neq 0$, so it does not scale.
  • In the discrete metric, every set is open, and a sequence converges only if it is eventually constant.

Examples

Each cell is the distance between the two points in that row.

The points $p = (1, 1)$ and $q = (4, 5)$ in $\reals^2$

The points $(1, 1)$ and $(4, 5)$ differ by $3$ in the first coordinate and $4$ in the second.
Euclidean distance $d_2(p, q) = \sqrt{3^2 + 4^2} = 5$
Taxicab distance $d_1(p, q) = 3 + 4 = 7$
Chebyshev distance $d_{\infty}(p, q) = \max(3, 4) = 4$
geodesic distance $5$
discrete metric $d(p, q) = 1$

The points $p = (0, 0)$ and $q = (2, 0)$ in $\reals^2$

Only the discrete metric differs.
Euclidean distance $d_2(p, q) = \sqrt{2^2 + 0^2} = 2$
Taxicab distance $d_1(p, q) = 2 + 0 = 2$
Chebyshev distance $d_{\infty}(p, q) = \max(2, 0) = 2$
geodesic distance $2$
discrete metric $d(p, q) = 1$

The points $p = (0, 0)$ and $q = (100, 100)$ in $\reals^2$

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.
Euclidean distance $d_2(p, q) = \sqrt{100^2 + 100^2} = 100 \sqrt{2} \approx 141.42$
Taxicab distance $d_1(p, q) = 100 + 100 = 200$
Chebyshev distance $d_{\infty}(p, q) = \max(100, 100) = 100$
geodesic distance $100 \sqrt{2}$
discrete metric $d(p, q) = 1$

The north pole $p = (0, 0, 1)$ and the point $q = (1, 0, 0)$ on the equator of the unit sphere in $\reals^3$

Euclidean distance: The Euclidean distance $\sqrt{2} \approx 1.41$ is shorter, because the straight segment cuts through the inside of the sphere.
geodesic distance: The geodesic distance on the unit sphere from the north pole to a point on the equator is the length of a quarter of a great circle, $\frac{2 \pi}{4} = \frac{\pi}{2}$.
discrete metric: The discrete distance between $p = (0, 0, 1)$ and $q = (1, 0, 0)$ is $1$, because $p \neq q$.
Euclidean distance $d_2(p, q) = \sqrt{1^2 + 0^2 + 1^2} = \sqrt{2} \approx 1.41$
Taxicab distance $d_1(p, q) = 1 + 0 + 1 = 2$
Chebyshev distance $d_{\infty}(p, q) = \max(1, 0, 1) = 1$
geodesic distance $\frac{\pi}{2} \approx 1.57$
discrete metric $d(p, q) = 1$

Notes

See also

All distinctions · All definitions · Notation