Search

Search papers and lessons

Complete Metric Space

Level 3 · 10 min read

A complete metric space is one where every Cauchy sequence has a limit inside the space, so no sequence that is trying to converge can fall through a gap.

On this page

  • Colour = topic mix
  • Discrete math
  • Calculus
  • ReadReady to readNot yet

TL;DR

A metric space is complete when every Cauchy sequence in it converges to a point that is also in the space. The test for a Cauchy sequence uses only its terms, so completeness says that a space has no missing limits. The real numbers are complete and the rational numbers are not, which is why calculus is usually done on the reals.

Builds on: Cauchy Sequence, Metric Space, Limit of a Sequence · Leads to: Contraction Mapping, Banach Fixed-Point Theorem

Where it's used

Solving equations by repeated approximation. A fixed-point iteration replaces a guess xx with T(x)T(x), a function of the guess, and repeats. If the iterates form a Cauchy sequence, completeness gives them a limit that solves T(x)=xT(x) = x. The Banach fixed-point theorem uses exactly this argument. Its best-known use is proving that many ordinary differential equations have one solution.

Making calculus work. Limits, derivatives and integrals all rely on sequences that are known to converge. Working in a complete space such as the real line guarantees that a Cauchy sequence of values, such as the approximations to an integral, settles on a value that the calculus is allowed to use.

Building number systems. Starting from the rational numbers, which are not complete, one can fill in every missing limit of a Cauchy sequence and get the real numbers. Georg Cantor's construction does this, and the result is a complete space. The reals are the smallest complete space that contains the rationals.

How it works

Work through the rational numbers, with the ordinary distance d(x,y)=∣x−y∣d(x, y) = |x - y|.

  1. Pick a Cauchy sequence of rationals. Take the decimal approximations of 2\sqrt{2}: 1, 1.4, 1.41, 1.414, 1.4142, and so on. Each term is a fraction. Check: the gap between the 3rd and 4th terms is ∣1.414−1.41∣=0.004|1.414 - 1.41| = 0.004, and later gaps are smaller still.
  2. Confirm that it is Cauchy. For terms xmx_m and xkx_k with m≥km \geq k, both lie within 10−k10^{-k} of 2\sqrt{2} and on the same side of it, so ∣xm−xk∣<10−k|x_m - x_k| < 10^{-k}. Any tolerance is met after some position. Check: with tolerance 0.010.01, position k=2k = 2 already works, since the gap is below 10−210^{-2}.
  3. Ask for the limit inside the rationals. The only possible limit is 2\sqrt{2}. It is a standard fact that 2\sqrt{2} is not a fraction, so no limit exists in the space of rationals. Check: the sequence is Cauchy in Q\mathbb{Q} with no limit in Q\mathbb{Q}, so Q\mathbb{Q} is not complete.
  4. Repeat in the reals. The same sequence is Cauchy in the real numbers and converges to 2\sqrt{2}, which is a real number. Check: the space of reals contains the limit, so this sequence causes no problem.
  5. Conclude. A space is complete when every Cauchy sequence in it has its limit in the space. The rationals fail this test, and the reals pass it.

The diagram gives the test for any one sequence.

flowchart TD
  A["Take a Cauchy sequence in the space"] --> B{"Does it converge in the space?"}
  B -->|"yes, for every such sequence"| C["Space is complete"]
  B -->|"no, for some sequence"| D["Space is not complete"]

The math

Definition: Complete metric space
A metric space (X,d)(X, d) is complete if every Cauchy sequence (an)(a_n) in XX converges to some point a∈Xa \in X. The point aa must belong to XX; a limit outside XX does not count.

The definition depends on both the set and the distance. The same set can be complete with one distance and incomplete with another, as the examples show.

Step 1 in symbols: the rationals are not complete

Let xkx_k be the decimal truncation of 2\sqrt{2} to kk places. For m≥km \geq k we have xk≤xm≤2x_k \leq x_m \leq \sqrt{2} and 2−xk<10−k\sqrt{2} - x_k \lt 10^{-k}, so ∣xm−xk∣<10−k|x_m - x_k| \lt 10^{-k}. The sequence is Cauchy in Q\mathbb{Q}. If it converged to some q∈Qq \in \mathbb{Q}, then q=2q = \sqrt{2}, which contradicts the irrationality of 2\sqrt{2}.

Step 2 in symbols: the reals are complete

Let (an)(a_n) be a Cauchy sequence of real numbers. It is bounded: after some NN, every term lies within 1 of aNa_N, so every term lies between min⁡(a1,…,aN)−1\min(a_1, \ldots, a_N) - 1 and max⁡(a1,…,aN)+1\max(a_1, \ldots, a_N) + 1. Define bN=sup⁡{an:n≥N}b_N = \sup\{a_n : n \geq N\}, which exists because the set is bounded above. The sequence bNb_N is non-increasing and bounded below, so L=lim⁡N→∞bNL = \lim_{N \to \infty} b_N exists. Now take ε>0\varepsilon \gt 0 and choose NN so that ∣am−an∣<ε|a_m - a_n| \lt \varepsilon for all m,n≥Nm, n \geq N. For n≥Nn \geq N, an≤bN≤an+εa_n \leq b_N \leq a_n + \varepsilon, so bNb_N is within ε\varepsilon of every later term. Since bN→Lb_N \to L, choose M≥NM \geq N with ∣bM−L∣<ε|b_M - L| \lt \varepsilon. For n≥Mn \geq M, ∣an−L∣≤∣an−bM∣+∣bM−L∣<2ε|a_n - L| \leq |a_n - b_M| + |b_M - L| \lt 2\varepsilon, so an→La_n \to L. The key input is the least upper bound property covered in Supremum.

Step 3 in symbols: closed subsets of a complete space

If (X,d)(X, d) is complete and F⊆XF \subseteq X is closed, then FF is complete. A Cauchy sequence in FF is also Cauchy in XX, so it converges to some a∈Xa \in X. Because FF is closed, every limit of points of FF lies in FF, so a∈Fa \in F. This is why every closed interval [a,b][a, b] on the real line is complete.

Step 4 in symbols: a distance that breaks completeness

Take R\mathbb{R} with d(x,y)=∣arctan⁡x−arctan⁡y∣d(x, y) = |\arctan x - \arctan y|. This is a metric, because arctan⁡\arctan is one-to-one. The sequence xn=nx_n = n is Cauchy for this distance, since arctan⁡n\arctan n approaches π/2\pi/2. Its limit in this metric would have to be the real number xx with arctan⁡x=π/2\arctan x = \pi/2, which does not exist. So R\mathbb{R} is not complete under dd, even though it is complete under ∣x−y∣|x - y|.

Worked examples

Example
Example 1: the interval (0, 1] is not complete

Let X=(0,1]X = (0, 1] with the usual distance. Take an=1/2na_n = 1/2^n, so the terms are 0.5,0.25,0.125,…0.5, 0.25, 0.125, \ldots.

  1. For m>nm \gt n, the gap is ∣am−an∣=1/2n−1/2m<1/2n|a_m - a_n| = 1/2^n - 1/2^m \lt 1/2^n.
  2. For tolerance 0.010.01, choose N=7N = 7. Then 1/27=1/128≈0.00781/2^7 = 1/128 \approx 0.0078, which is less than 0.010.01. So the sequence is Cauchy.
  3. The terms shrink to 0, and 0 is not in X=(0,1]X = (0, 1]. So the sequence has no limit in XX.

Result: XX is not complete. Adding 0 to the set would fix it, since [0,1][0, 1] is complete.

Example
Example 2: the interval [0, 1] is complete

Let an=1−1n+1a_n = 1 - \frac{1}{n+1}, so the terms are 0,0.5,0.667,0.75,…0, 0.5, 0.667, 0.75, \ldots, all in [0,1][0, 1].

  1. For m>nm \gt n, the gap is ∣am−an∣=1n+1−1m+1<1n+1|a_m - a_n| = \frac{1}{n+1} - \frac{1}{m+1} \lt \frac{1}{n+1}.
  2. For tolerance 0.050.05, choose N=20N = 20. Then 121≈0.0476\frac{1}{21} \approx 0.0476, which is less than 0.050.05. So the sequence is Cauchy.
  3. In the reals the sequence converges to 1.
  4. The limit 1 lies in [0,1][0, 1], so the limit is inside the space.

Result: this sequence converges inside [0,1][0, 1]. Step 3 of the math says this holds for every Cauchy sequence in [0,1][0, 1].

Example
Example 3: an iteration that uses completeness

Consider the map T(x)=cos⁡xT(x) = \cos x on X=[0,1]X = [0, 1]. It sends XX into XX, because cos⁡0=1\cos 0 = 1 and cos⁡1≈0.5403\cos 1 \approx 0.5403. The distance between images is ∣cos⁡x−cos⁡y∣|\cos x - \cos y|, and by the mean value theorem this is at most sin⁡1≈0.8415\sin 1 \approx 0.8415 times ∣x−y∣|x - y|, so TT is a contraction on XX.

  1. Start at x0=1x_0 = 1. Then x1=cos⁡1≈0.5403x_1 = \cos 1 \approx 0.5403.
  2. Next, x2=cos⁡(0.5403)≈0.8576x_2 = \cos(0.5403) \approx 0.8576 and x3=cos⁡(0.8576)≈0.6543x_3 = \cos(0.8576) \approx 0.6543.
  3. The gaps are ∣x1−x0∣≈0.4597|x_1 - x_0| \approx 0.4597, ∣x2−x1∣≈0.3173|x_2 - x_1| \approx 0.3173 and ∣x3−x2∣≈0.2033|x_3 - x_2| \approx 0.2033. Each is at most 0.84150.8415 times the one before.
  4. Because [0,1][0, 1] is complete, the iterates converge to a limit x∗x^\ast in [0,1][0, 1]. The limit satisfies cos⁡x∗=x∗\cos x^\ast = x^\ast, and numerically x∗≈0.7391x^\ast \approx 0.7391.

Try it: the bound says ∣x2−x1∣≤0.8415×∣x1−x0∣|x_2 - x_1| \leq 0.8415 \times |x_1 - x_0|. Check it with the numbers above. Answer: 0.8415×0.4597≈0.38680.8415 \times 0.4597 \approx 0.3868, and 0.31730.3173 is less than 0.38680.3868, so the bound holds.

Common mistakes and tradeoffs

It is tempting to think that completeness is a property of the set alone. In fact it depends on the distance. The real line is complete under ∣x−y∣|x - y| but not under the arctan distance in Step 4, because the same Cauchy sequence can have a limit in one metric and no limit in the other.

It is tempting to think that a bounded set is complete, or that a closed set is complete on its own. In fact a set can be bounded and still hold a Cauchy sequence with no limit inside it, such as (0,1](0, 1] in Example 1. Closedness helps only when the surrounding space is complete, as Step 3 shows.

It is tempting to think that completeness means the set has no gaps at all. In fact it means only that Cauchy sequences have limits. Each Cauchy sequence is a request for a limit, and completeness promises the limit is available inside the set.

When to use it: when you need existence of limits, for example when an iteration or a construction produces a Cauchy sequence and you want it to land somewhere in the space. When not to use it: when you only need to check whether a particular sequence converges to a known point, where the ordinary limit definition is simpler. Alternative: compactness also gives limits, and every compact metric space is complete, but compactness is a stronger requirement that fails for many useful spaces such as the real line.

History

The idea of a limit that can be tested from the terms alone goes back to Augustin-Louis Cauchy's 1821 textbook. For decades the real numbers were used without a full construction. In the 1870s Georg Cantor built them from the rationals using Cauchy sequences, which turned the fact that every Cauchy sequence of reals converges into a theorem rather than an assumption. Metric spaces, the setting in which the word complete makes sense in general, were introduced in the early twentieth century. Stefan Banach proved his fixed-point theorem in 1922 for complete metric spaces, and that result made completeness a standard tool for existence proofs.

Recap

  • A metric space is complete when every Cauchy sequence in it converges to a point of the space.
  • Completeness depends on the space and on the distance. The rationals are not complete; the reals are.
  • A closed subset of a complete space is complete.
  • Completeness gives existence: the iterates of a contraction on a complete space converge, which is the Banach fixed-point theorem.
  • Next, read Contraction Mapping for the shrinking condition and Banach Fixed-Point Theorem for the result it supports.

Check yourself

QuestionRecall: what must be true of the limit of a Cauchy sequence for a metric space to be complete?Show answer
The limit must be a point of the space itself. A Cauchy sequence whose limit lies outside the space shows the space is not complete.
QuestionComputation: the sequence a_n = 1 - 1/(n+1) lies in [0, 1]. For tolerance 0.02, what is the smallest N from the bound in Example 2 that works, and why?Show answer
The bound on the gap is 1/(N+1), which must be at most 0.02 for all later pairs. So 1/(N+1) at most 0.02 requires N+1 at least 50, that is N = 49. Check: 1/50 = 0.02, and the gaps after N are strictly less than 1/(N+1), so N = 49 works.
QuestionWhy: does the rational interval [0, 1] intersected with the rationals give a complete space under the usual distance?Show answer
No. The sequence of decimal approximations to 1/sqrt(2), which is about 0.7071, is Cauchy in the rationals, but its limit is irrational. The space of rationals in [0, 1] therefore has a Cauchy sequence with no limit in the space.
QuestionApplied: a solver repeats x = T(x) on a complete space with a contraction, and the iterates converge. Which property of the space made the convergence guaranteed, and what would go wrong on the set (0, 1]?Show answer
Completeness guaranteed that the Cauchy iterates have a limit inside the space. On (0, 1] with T(x) = x/2, the iterates approach 0, which is not in the set, so the iteration has no fixed point there.

Sources