Let (X,d)(X,d) be a metric space. A sequence (xn)\left(x_n\right) in XX is a Cauchy sequence if and only if its terms become arbitrarily close to one another.

∀ε>0 ∃N∈N:d(xm,xn)≤ε  ∀ m,n≥N\forall\varepsilon>0\,\exists N\in\mathbb{N}:d\left(x_m,x_n\right)\leq\varepsilon\,\,\forall\,m,n\geq N

Every convergent sequence is a Cauchy sequence and every Cauchy sequence is bounded. A Cauchy sequence with a convergent subsequence converges to the same limit. The metric space XX is complete if and only if every Cauchy sequence in XX converges to a point of X.X.

The real numbers are complete and so, since convergence in Rn\mathbb{R}^n is coordinatewise, is Rn\mathbb{R}^n with any norm. The rational numbers are not complete, since a sequence of rational numbers converging to 2\sqrt{2} is a Cauchy sequence with no limit in Q,\mathbb{Q}, and neither is the open interval (0,1),\left(0,1\right), in which (1n)\left(\frac{1}{n}\right) has no limit. Completeness is preserved by strong equivalence of metrics but not by equivalence. Let A⊆X.A\subseteq X. If XX is complete then the metric subspace AA is complete if and only if AA is closed in X,X, and a complete metric subspace of any metric space is closed.

A Banach space is a complete normed vector space and a Hilbert space is a complete inner product space. Every finite-dimensional normed vector space is a Banach space and Rn\mathbb{R}^n with the dot product is a Hilbert space. Every metric space XX has a completion, a complete metric space containing an isometric copy of XX as a dense subset, which is unique up to isometry; the real numbers are the completion of the rational numbers.

Let T:X→XT:X\rightarrow X be a function from a metric space to itself. A point x∗∈Xx^*\in X is a fixed point of TT if T(x∗)=x∗.T\left(x^*\right)=x^*. TT is a contraction if it is Lipschitz continuous with a constant q<1,q<1, so that it brings every pair of points closer together by at least the factor q.q.

d(T(x),T(y))≤q d(x,y)  ∀ x,y∈X,0≤q<1d\left(T(x),T(y)\right)\leq q\,d(x,y)\,\,\forall\,x,y\in X,\qquad 0\leq q<1

The contraction mapping theorem states that a contraction TT on a non-empty complete metric space has exactly one fixed point x∗,x^*, and that for any x0∈Xx_0\in X the sequence of iterates xn+1:=T(xn)x_{n+1}:=T\left(x_n\right) converges to x∗x^* with

d(xn,x∗)≤qn1−q d(x1,x0).d\left(x_n,x^*\right)\leq\frac{q^n}{1-q}\,d\left(x_1,x_0\right).

The iterates form a Cauchy sequence because d(xn+1,xn)≤qnd(x1,x0)d\left(x_{n+1},x_n\right)\leq q^n d\left(x_1,x_0\right) is summable, completeness gives the limit, continuity of TT makes the limit a fixed point and the contraction property rules out a second one. The theorem is also called the Banach fixed-point theorem. The constant q<1q<1 is essential: T(x)=x+1xT(x)=x+\frac{1}{x} on [1,∞)\left[1,\infty\right) satisfies d(T(x),T(y))<d(x,y)d\left(T(x),T(y)\right)<d(x,y) for x≠yx\neq y but has no fixed point. If TT is not a contraction but some iterate Tk=T∘⋯∘TT^k=T\circ\cdots\circ T is, then TT still has exactly one fixed point, since a fixed point of TkT^k is unique and TT maps it to another fixed point of Tk.T^k.