Complete metric space

In mathematical analysis, a metric space $M$ is called complete (or a Cauchy space) if every Cauchy sequence of points in $M$ has a limit that is also in $M$.

Intuitively, a space is complete if there are no "points missing" from it (inside or at the boundary). For instance, the set of rational numbers is not complete, because e.g. $\sqrt{2}$ is "missing" from it, even though one can construct a Cauchy sequence of rational numbers that converges to it (see further examples below). It is always possible to "fill all the holes", leading to the completion of a given space, as explained below.

Definition
Cauchy sequence

A sequence $$x_1, x_2, x_3, \ldots$$ in a metric space $$(X, d)$$ is called Cauchy if for every positive real number $$r > 0$$ there is a positive integer $$N$$ such that for all positive integers $$m, n > N,$$ $$d(x_m, x_n) < r.$$

Complete space

A metric space $$(X, d)$$ is complete if any of the following equivalent conditions are satisfied:
 * Every Cauchy sequence of points in $$X$$ has a limit that is also in $$X.$$
 * Every Cauchy sequence in $$X$$ converges in $$X$$ (that is, to some point of $$X$$).
 * Every decreasing sequence of non-empty closed subsets of $$X,$$ with diameters tending to 0, has a non-empty intersection: if $$F_n$$ is closed and non-empty, $$F_{n+1} \subseteq F_n$$ for every $$n,$$ and $$\operatorname{diam}\left(F_n\right) \to 0,$$ then there is a unique point $$x \in X$$ common to all sets $$F_n.$$

Examples
The space Q of rational numbers, with the standard metric given by the absolute value of the difference, is not complete. Consider for instance the sequence defined by $$x_1 = 1$$ and $$x_{n+1} = \frac{x_n}{2} + \frac{1}{x_n}.$$ This is a Cauchy sequence of rational numbers, but it does not converge towards any rational limit: If the sequence did have a limit $$x,$$ then by solving $$x = \frac{x}{2} + \frac{1}{x}$$ necessarily $$x^2 = 2,$$ yet no rational number has this property. However, considered as a sequence of real numbers, it does converge to the irrational number $$\sqrt{2}$$.

The open interval $(0,1)$, again with the absolute difference metric, is not complete either. The sequence defined by $$x_n = \tfrac{1}{n}$$ is Cauchy, but does not have a limit in the given space. However the closed interval $[0,1]$ is complete; for example the given sequence does have a limit in this interval, namely zero.

The space R of real numbers and the space C of complex numbers (with the metric given by the absolute difference) are complete, and so is Euclidean space Rn, with the usual distance metric. In contrast, infinite-dimensional normed vector spaces may or may not be complete; those that are complete are Banach spaces. The space C$[a, b]$ of continuous real-valued functions on a closed and bounded interval is a Banach space, and so a complete metric space, with respect to the supremum norm. However, the supremum norm does not give a norm on the space C$(a, b)$ of continuous functions on $(a, b)$, for it may contain unbounded functions. Instead, with the topology of compact convergence, C$(a, b)$ can be given the structure of a Fréchet space: a locally convex topological vector space whose topology can be induced by a complete translation-invariant metric.

The space Qp of p-adic numbers is complete for any prime number $$p.$$ This space completes Q with the p-adic metric in the same way that R completes Q with the usual metric.

If $$S$$ is an arbitrary set, then the set $S^{N}$ of all sequences in $$S$$ becomes a complete metric space if we define the distance between the sequences $$\left(x_n\right)$$ and $$\left(y_n\right)$$ to be $$\tfrac{1}{N}$$ where $$N$$ is the smallest index for which $$x_N$$ is distinct from $$y_N$$ or $$0$$ if there is no such index. This space is homeomorphic to the product of a countable number of copies of the discrete space $$S.$$

Riemannian manifolds which are complete are called geodesic manifolds; completeness follows from the Hopf–Rinow theorem.

Some theorems
Every compact metric space is complete, though complete spaces need not be compact. In fact, a metric space is compact if and only if it is complete and totally bounded. This is a generalization of the Heine–Borel theorem, which states that any closed and bounded subspace $$S$$ of $R^{n}$ is compact and therefore complete.

Let $$(X, d)$$ be a complete metric space. If $$A \subseteq X$$ is a closed set, then $$A$$ is also complete. Let $$(X, d)$$ be a metric space. If $$A \subseteq X$$ is a complete subspace, then $$A$$ is also closed.

If $$X$$ is a set and $$M$$ is a complete metric space, then the set $$B(X, M)$$ of all bounded functions $f$ from $X$ to $$M$$ is a complete metric space. Here we define the distance in $$B(X, M)$$ in terms of the distance in $$M$$ with the supremum norm $$d(f, g) \equiv \sup\{d[f(x), g(x)]: x \in X\}$$

If $$X$$ is a topological space and $$M$$ is a complete metric space, then the set $$C_b(X, M)$$ consisting of all continuous bounded functions $$f : X \to M$$ is a closed subspace of $$B(X, M)$$ and hence also complete.

The Baire category theorem says that every complete metric space is a Baire space. That is, the union of countably many nowhere dense subsets of the space has empty interior.

The Banach fixed-point theorem states that a contraction mapping on a complete metric space admits a fixed point. The fixed-point theorem is often used to prove the inverse function theorem on complete metric spaces such as Banach spaces.

$$

Completion
For any metric space M, it is possible to construct a complete metric space M′ (which is also denoted as $$\overline{M}$$), which contains M as a dense subspace. It has the following universal property: if N is any complete metric space and f is any uniformly continuous function from M to N, then there exists a unique uniformly continuous function f′ from M′ to N that extends f. The space M' is determined up to isometry by this property (among all complete metric spaces isometrically containing M), and is called the completion of M.

The completion of M can be constructed as a set of equivalence classes of Cauchy sequences in M. For any two Cauchy sequences $$x_{\bull} = \left(x_n\right)$$ and $$y_{\bull} = \left(y_n\right)$$ in M, we may define their distance as $$d\left(x_{\bull}, y_{\bull}\right) = \lim_n d\left(x_n, y_n\right)$$

(This limit exists because the real numbers are complete.) This is only a pseudometric, not yet a metric, since two different Cauchy sequences may have the distance 0. But "having distance 0" is an equivalence relation on the set of all Cauchy sequences, and the set of equivalence classes is a metric space, the completion of M. The original space is embedded in this space via the identification of an element x of M' with the equivalence class of sequences in M converging to x (i.e., the equivalence class containing the sequence with constant value x). This defines an isometry onto a dense subspace, as required. Notice, however, that this construction makes explicit use of the completeness of the real numbers, so completion of the rational numbers needs a slightly different treatment.

Cantor's construction of the real numbers is similar to the above construction; the real numbers are the completion of the rational numbers using the ordinary absolute value to measure distances. The additional subtlety to contend with is that it is not logically permissible to use the completeness of the real numbers in their own construction. Nevertheless, equivalence classes of Cauchy sequences are defined as above, and the set of equivalence classes is easily shown to be a field that has the rational numbers as a subfield. This field is complete, admits a natural total ordering, and is the unique totally ordered complete field (up to isomorphism). It is defined as the field of real numbers (see also Construction of the real numbers for more details). One way to visualize this identification with the real numbers as usually viewed is that the equivalence class consisting of those Cauchy sequences of rational numbers that "ought" to have a given real limit is identified with that real number. The truncations of the decimal expansion give just one choice of Cauchy sequence in the relevant equivalence class.

For a prime $$p,$$ the $p$-adic numbers arise by completing the rational numbers with respect to a different metric.

If the earlier completion procedure is applied to a normed vector space, the result is a Banach space containing the original space as a dense subspace, and if it is applied to an inner product space, the result is a Hilbert space containing the original space as a dense subspace.

Topologically complete spaces
Completeness is a property of the metric and not of the topology, meaning that a complete metric space can be homeomorphic to a non-complete one. An example is given by the real numbers, which are complete but homeomorphic to the open interval $(0,1)$, which is not complete.

In topology one considers completely metrizable spaces, spaces for which there exists at least one complete metric inducing the given topology. Completely metrizable spaces can be characterized as those spaces that can be written as an intersection of countably many open subsets of some complete metric space. Since the conclusion of the Baire category theorem is purely topological, it applies to these spaces as well.

Completely metrizable spaces are often called topologically complete. However, the latter term is somewhat arbitrary since metric is not the most general structure on a topological space for which one can talk about completeness (see the section Alternatives and generalizations). Indeed, some authors use the term topologically complete for a wider class of topological spaces, the completely uniformizable spaces.

A topological space homeomorphic to a separable complete metric space is called a Polish space.

Alternatives and generalizations
Since Cauchy sequences can also be defined in general topological groups, an alternative to relying on a metric structure for defining completeness and constructing the completion of a space is to use a group structure. This is most often seen in the context of topological vector spaces, but requires only the existence of a continuous "subtraction" operation. In this setting, the distance between two points $$x$$ and $$y$$ is gauged not by a real number $$\varepsilon$$ via the metric $$d$$ in the comparison $$d(x, y) < \varepsilon,$$ but by an open neighbourhood $$N$$ of $$0$$ via subtraction in the comparison $$x - y \in N.$$

A common generalisation of these definitions can be found in the context of a uniform space, where an entourage is a set of all pairs of points that are at no more than a particular "distance" from each other.

It is also possible to replace Cauchy sequences in the definition of completeness by Cauchy nets or Cauchy filters. If every Cauchy net (or equivalently every Cauchy filter) has a limit in $$X,$$ then $$X$$ is called complete. One can furthermore construct a completion for an arbitrary uniform space similar to the completion of metric spaces. The most general situation in which Cauchy nets apply is Cauchy spaces; these too have a notion of completeness and completion just like uniform spaces.