Skip to content

Metric Spaces

7.1 Definition

Definition. A metric space is a pair (M,d)(M, d) where MM is a set and d:M×M[0,)d : M \times M \to [0, \infty) satisfies, for all x,y,zMx, y, z \in M:

  1. Non-negativity: d(x,y)0d(x, y) \geq 0, with equality iff x=yx = y.
  2. Symmetry: d(x,y)=d(y,x)d(x, y) = d(y, x).
  3. Triangle inequality: d(x,z)d(x,y)+d(y,z)d(x, z) \leq d(x, y) + d(y, z).

Every metric induces a topology: the open sets are unions of open balls Br(p)={x:d(x,p)<r}B_r(p) = \{x : d(x, p) < r\}.

7.2 Standard Metrics

Example 7.1 (Euclidean metric). On Rn\mathbb{R}^n:

d2(x,y)=i=1n(xiyi)2.d_2(\mathbf{x}, \mathbf{y}) = \sqrt{\sum_{i=1}^{n} (x_i - y_i)^2}.

Example 7.2 (pp-norm metrics). For 1p1 \leq p \leq \infty:

dp(x,y)=(i=1nxiyip)1/p,d(x,y)=max1inxiyi.d_p(\mathbf{x}, \mathbf{y}) = \left(\sum_{i=1}^{n} |x_i - y_i|^p\right)^{1/p}, \qquad d_\infty(\mathbf{x}, \mathbf{y}) = \max_{1 \leq i \leq n} |x_i - y_i|.

All of these induce the standard topology on Rn\mathbb{R}^n.

Example 7.3 (Discrete metric). For any set XX:

d(x,y)={0if x=y,1if xy.d(x, y) = \begin{cases} 0 & \text{if } x = y, \\ 1 & \text{if } x \neq y. \end{cases}

The discrete metric induces the discrete topology.

7.3 Convergence in Metric Spaces

Definition. A sequence (xn)(x_n) in (M,d)(M, d) converges to xMx \in M (written xnxx_n \to x) if for every ε>0\varepsilon > 0 there exists NN such that d(xn,x)<εd(x_n, x) < \varepsilon for all nNn \geq N.

Proposition 7.1. In a metric space, xnxx_n \to x if and only if for every open neighbourhood UU of xx, there exists NN with xnUx_n \in U for all nNn \geq N.

Limits in metric spaces are unique (this follows from the Hausdorff property).

7.4 Completeness

Definition. A sequence (xn)(x_n) is Cauchy if for every ε>0\varepsilon > 0 there exists NN such that d(xm,xn)<εd(x_m, x_n) < \varepsilon for all m,nNm, n \geq N.

Every convergent sequence is Cauchy. The converse need not hold.

Definition. A metric space (M,d)(M, d) is complete if every Cauchy sequence converges.

Example 7.4. Rn\mathbb{R}^n with the Euclidean metric is complete.

Example 7.5. Q\mathbb{Q} with d(x,y)=xyd(x, y) = |x - y| is not complete: the Cauchy sequence 3,3.1,3.14,3.141,3.1415,3, 3.1, 3.14, 3.141, 3.1415, \ldots does not converge in Q\mathbb{Q}.

Proposition 7.2. A closed subset of a complete metric space is complete.

Definition. A Banach space is a complete normed vector space.

Example 7.6. (C([a,b]),)(C([a, b]), \|\cdot\|_\infty) — the space of continuous functions on [a,b][a, b] with the sup norm — is a Banach space.

7.5 Contraction Mapping Theorem

Definition. A map f:MMf : M \to M is a contraction if there exists 0c<10 \leq c < 1 such that d(f(x),f(y))cd(x,y)d(f(x), f(y)) \leq c \cdot d(x, y) for all x,yMx, y \in M.

Theorem 5.6 (Banach Fixed Point Theorem). If (M,d)(M, d) is a complete metric space and f:MMf : M \to M is a contraction, then ff has a unique fixed point xx^*, and for any x0Mx_0 \in M, the iteration xn+1=f(xn)x_{n+1} = f(x_n) converges to xx^*.

Proof. For any x0x_0, the sequence xn=fn(x0)x_n = f^n(x_0) is Cauchy (by repeated application of the contraction condition), hence converges to some xx^*. By continuity of ff, x=f(x)x^* = f(x^*). Uniqueness follows from the contraction condition: if x=f(x)x^* = f(x^*) and y=f(y)y^* = f(y^*), then d(x,y)=d(f(x),f(y))cd(x,y)d(x^*, y^*) = d(f(x^*), f(y^*)) \leq c \cdot d(x^*, y^*), so d(x,y)=0d(x^*, y^*) = 0. \square