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
-
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(p, q) = 1$
High school
The discrete distance between $p = (0, 0, 1)$ and $q = (1, 0, 0)$ is $1$, because $p \neq q$.
-
The points $p = (0, 0)$ and $q = (100, 100)$ in $\reals^2$
: $d(p, q) = 1$
High school
The discrete distance between $p = (0, 0)$ and $q = (100, 100)$ is $1$, because $p \neq q$.
-
The points $p = (0, 0)$ and $q = (2, 0)$ in $\reals^2$
: $d(p, q) = 1$
High school
The discrete distance between $p = (0, 0)$ and $q = (2, 0)$ is $1$, because $p \neq q$.
-
The points $p = (1, 1)$ and $q = (4, 5)$ in $\reals^2$
: $d(p, q) = 1$
High school
The discrete distance between $p = (1, 1)$ and $q = (4, 5)$ is $1$, because $p \neq q$.
Examples
- $d(x, y) = 1$ for $x \neq y$, and $d(x, x) = 0$ Undergraduate
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.
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.