Every definition in this course so far used one thing about the real line: the distance $|x - y|$. Limits, Cauchy sequences and continuity all make sense wherever you can measure distance, whether between points of the plane (as in the distance formula), between functions, or between strings. A metric space is the setting that keeps exactly what those proofs need.
Key idea
Why it works
Now the old definitions transfer word for word. $x_n \to x$ means $d(x_n, x) \to 0$; a sequence is Cauchy when $d(x_m, x_n) < \varepsilon$ for $m, n \ge N$; and $X$ is complete when every Cauchy sequence converges to a point of $X$. $\mathbb{R}$ and $\mathbb{R}^{n}$ are complete; $\mathbb{Q}$ is not, since rational approximations of $\sqrt{2}$ form a Cauchy sequence with no rational limit. The space of continuous functions on $[a, b]$ with the sup norm distance $d(f, g) = \|f - g\|$ is complete too; the proof combines completeness of $\mathbb{R}$ with the fact that uniform limits of continuous functions are continuous.
Worked examples
Worked example: Three distances
- The coordinate differences are $5$ and $1$.
- $d_1 = 6$, $d_2 = \sqrt{26}$, $d_\infty = 5$.
Answer: $6$, $\sqrt{26} \approx 5.10$, $5$. In general $d_\infty \le d_2 \le d_1$.
Worked example: Not a metric
- Properties (1) and (2) hold.
- Try $x = 0$, $y = 3$, $z = 6$: $d(0, 6) = 36$, but $d(0, 3) + d(3, 6) = 9 + 9 = 18$.
Answer: No: the triangle inequality fails.
Worked example: The discrete metric
- For the triangle inequality: if $x \ne z$, then $y$ differs from at least one of them, so the right side is at least $1$.
- $d(x_n, x) < \frac{1}{2}$ forces $x_n = x$.
Answer: Yes. A sequence converges exactly when it is eventually constant.
Common mistake