Tag Archive: metric spaces

A sequence \{x_n\} in a metric space (X, \rho) is called Cauchy if \rho(x_n, x_m)\to 0 as n, m\to\infty. A subset E of X is called complete if every Cauchy sequence in E converges and its limit is in E. For example, \mathbb R^n is complete, while \mathbb Q^n is not.


Proposition. A closed subset of a complete metric space is complete, and a complete subset of an arbitrary metric space is closed.

Proof. If X is complete, E\subset X is closed, and \{x_n\} is a Cauchy sequence in E, \{x_n\} has a limit in X. So x\in\bar{E}=E. If E\subset X is complete and x\in\bar{E}, then there is a sequence \{x_n\} in E converging to x. \{x_n\} is Cauchy, so its limit lies in E; thus E=\bar E. \Box


In a metric space (X, \rho) we can define the distance from a point to a set and the distance between two sets. Namely, if x\in X and E, F\subset X,

\rho(x, E)=\inf\{\rho(x, y): y\in E\},

\rho(E, F)=\inf\{\rho(x, y): x\in E, y\in F\}=\inf\{\rho(x, F): x\in E\}.

Note that \rho(x, E)=0 iff $x\in\bar E$. We also define the diameter of E\subset X to be

diam E=\sup\{\rho(x, y): x, y\in E\}.

E is called bounded if diam E<\infty.

If E\subset X and \{V_\alpha\}_{\alpha\in A} is a family of sets such that E \subset \cup_{\alpha\in A}V_\alpha, \{V_\alpha\}_\alpha\in A is called a cover of E, and E is said to be covered by the V_\alpha‘s. E is called totally bounded if for every \epsilon>0, E can be covered by finitely many balls of radius \epsilon. Every totally bounded set is bounded, for if x, y\in\cup_1^n B(\epsilon, z_j), say x\in B(\epsilon, z_1) and y\in B(\epsilon, z_2), then

\rho(x, y)\le\rho(x, z_1)+\rho(z_1, z_2)+\rho(z_2, y)\le 2\epsilon+\max\{\rho(z_j, z_k): 1\le j, k\le n \}.

If E is totally bounded, so is \bar E, for it is easily seen that if E\subset \cup_1^n B(\epsilon, z_j), then \bar E\subset \cup_1^n B(2\epsilon, z_j).

Theorem. If E is a subset of the metric space (X, \rho), the following are equivalent:

1) E is complete and totally bounded.

2) (The Bolzano-Weierstrass Property) Every sequence in E has a subsequence that converges to a point in E.

3) (The Heine-Borel Property) If \{V_\alpha\}_{\alpha\in A} is a cover of E by open sets, there is a finite set F\subset A such that \{V_\alpha\}_{\alpha\in A} covers E.

Proof. 1) \Rightarrow 2): Suppose that 1) holds and \{x_n\} is a sequence in E. E can be covered by finitely many balls of radius 2^{-1}, and at least one of them must contain x_n for finitely many many n: say, x_n\in B_1 for n\in N_1. E\cap B_1 can be covered by finitely many balls of radius 2^{-2}, and at least one of them must contain x_n for infinitely many n\in N_1: say x_n\in B_2 for n\in N_2. Continuing inductively, we obtain a sequence x_n\in B_j for n\in N_j. Pick n_1\in N_1, n_2\in N_2, … such that n_1<n_2<.... Then \{x_{n_j}\} is a Cauchy sequence, for \rho(x_{n_j}, x_{n_k})<2^{1-j} if $k>j$, and since E is complete, it has a limit in E.

2) \Rightarrow 1): If E is not complete, there is a Cauchy sequence \{x_n\} in E with no limit in E. No subsequence of \{x_n\} can converge in E, for otherwise the whole sequence would converge to the same limit. On the other hand, if E is not totally bounded, let \epsilon>0 be such that E cannot be covered by finitely many balls of radius \epsilon. Choose x_n\in E inductively as follows. Begin with any x_1\in E and having chosen x_1, ..., x_n, pick x_{n+1}\in E\setminus \cup_1^n B(\epsilon, x_j). Then \rho(x_n, x_m)>\epsilon for all n, m, so \{x_n\} has no convergent subsequence.

1) + 2) \Rightarrow 3): If suffices to show that if 2) holds and \{V_\alpha\}_{\alpha\in A} is a cover of E by open sets, \exists\epsilon>0 such that every ball of radius \epsilon that intersects E is contained in some V_\alpha, for E can be covered by finitely many such balls by 1). Suppose to the contrary that for each n\in\mathbb N, $\exists$ a ball B_n of radius 2^{-n} such that B_n\cap E\not=\emptyset and B_n is contained in no V_\alpha. Pick x_n\in B_n\cap E; by passing to a subsequence we may assume that \{x_n\} converges to some x\in E. We have x\in V_\alpha for some \alpha, and since V_\alpha is open, \exists\epsilon>0 such that B(\epsilon, x)\subset V_\alpha. But if n is large enough so that \rho(x_n, x)<\epsilon/3 and 2^{-n}<\epsilon/3, then B_n\subset B(\epsilon, x)\subset V_\alpha, contradicting the assumption on B_n.

3) \Rightarrow 2): If \{x_n\} is a sequence in E with no convergent subsequence, for each x\in E there is a ball B_x centered at x that contains x_n for only finitely many n. Then \{B_x\}_{x\in E} is a cover of E by open sets with no finite sub-cover. \Box

A set E can possesses the properties 1)-3) is called compact. Every compact set is closed and bounded, and the converse is false.

Proposition. Every closed and bounded subset of \mathbb R^n is compact.

Proof. Since closed subsets of \mathbb R^n are complete, it suffices to show that bounded subsets of \mathbb R^n are totally bounded. Since every bounded set is contained in some cube

Q=[-R, R]^n=\{x\in\mathbb R^n: \max(|x_1|,..., |x_n|)<R\},

it is enough to show that Q is totally bounded. Given \epsilon>0, pick an integer k>R\sqrt{n}/\epsilon, and express Q as the union of k^n congruent subcubes by dividing the interval [-R, R] into k equal pieces. The side length of these subcubes is 2R/k and hence their diameter is \sqrt{n}(2R/k)<2\epsilon, so they are contained in the balls of radius \epsilon about their centers. \Box

Two metrics \rho_1 and \rho_2 on a set X are called equivalent if

C\rho_1\le\rho_2\le C'\rho_1 for some C, C'>0.

Equivalent metrics define the same open, closed and compact sets, the same convergent and Cauchy sequence, and the same continuous and uniformly continuous mappings. Consequently, most results concerning metric spaces depend not on the particular metric chosen but only on its equivalent class.

“As you simplify your life, the laws of the universe will be simpler; solitude will not be solitude, poverty will not be poverty, nor weakness, weakness.” ~ Henry David Thoreau


[1] Gerald B. Folland, Real Analysis: Modern Techniques and Their Applications, 2ed, page 15-16.

[2] Purpose Fairy’s 21-Day Happiness Challenge, http://www.jrmstart.com/wordpress/wp-content/uploads/2014/10/Free+eBook+-+PurposeFairys+21-Day+Happiness+Challenge.pdf.

Definition. A metric on a set X is a function: \rho: X\times X\to[0, \infty) such that

1) \rho(x, y)=0 iff x=y;

2) \rho(x, y)=\rho(y, x) for all x, y\in X;

3) \rho(x, x)\le\rho(x, y)+\rho(y, z) for all x, y, z\in X.

A set equipped with a metric is called a metric space.


Examples. 1)  The Euclidean distance \rho(x, y)=|x-y| is a metric on \mathbb R^n.

2) \rho_1(x, y)=\int_0^1|f(x)-g(x)|dx and \rho_\infty(f, g)=\sup_{0\le x\le 1}|f(x)-g(x)| are metrics on the space of continuous functions on [0, 1].

3) If \rho is a metric on X and A\subset X, then \rho|(A\times A) is a metric on A.

4) If (X_1, \rho_1) and (X_2, \rho_2) are metric spaces, the product metric \rho on X_1\times X_2 is given by

\rho((x_1, x_2),(y_1, y_2))=\max(\rho_1(x_1, y_1), \rho_2(x_2, y_2)).

5) Some other metrics used on X_1\times X_2:

\rho_1(x_1, y_1)+\rho_2(x_2, y_2), [\rho_1(x_1, y_1)^2+\rho_2(x_2, y_2)^2]^{1/2}.

Definition. Let (X, \rho) be a metric space. If x\in X and r>0, the (open) ball of radius r about x is B(r, x)=\{y\in X: \rho(x, y)<r\}.

A set E\subset X is open if for every x\in E, \exists r>0 such that B(r, x)\subset E, and closed if the complement is open.

Remark. X and \emptyset are both open and closed. The union of any family of open sets is open, and the intersection of any family of closed sets is closed. The intersection (resp. union) of any finite family of open (resp. closed) sets is open (resp. closed). Indeed, if U_1, U_2, ..., U_n are open and x\in\cap_1^n U_j, for each j, $\exists r_j>0$ such that B(r_j, x)\subset U_j, and then B(r, x)\subset\cap_1^n U_j where r=\min(r_1, ..., r_n), so \cap_1^n U_j is open.

Definition. If E\subset X, then the interior of E, denoted by E the union of all open sets U\subset E is the largest open set contained in E, which is called the interior of E and is denoted by E^0. The intersection of all closed sets F\supset E is the smallest closed set containing E; it is called the closure of E and is denoted by \bar{E}. E is said to be dense in X if \bar{E}=X, and nowhere dense if \bar{E} has empty interior. X is called separable if it has a countable dense subset. (For example, \mathbb Q^n is a countable dense subset of \mathbb R^n.) A sequence \{x_n\} in X converges to x\in X (symbolically: x_n\to x or \lim x_n=x) if \lim_{n\to\infty}\rho(x_n, x)=0.

Proposition. If X is a metric space, E\subset X, and x\in X, the following are equivalent:

1) x\in\bar{E}.

2) B(r, x)\cap E\not=\emptyset for all r>0.

3) There is a sequence \{x_n\} in E that converges to x.

Proof. If B(r, x)\cap E=\emptyset, then B(r, x)^c is a closed set containing E but not x, so x\not\in\bar{E}. Conversely, if $x\not\in\bar{E}$, since (\bar{E})^c is open $\exists r>0$ such that B(r, x)\subset(\bar E)^c\subset E^c. Thus 1) is equivalent to 2). If 2) holds, for each n\in\mathbb N, $\exists x_n\in B(n^{-1}, x)\cap E$, so that x_n\to x. On the other hand, if B(r, x)\cap E=\emptyset, then \rho(y, x)\ge r for all y\in E, so no sequence of E can converge to x. Thus 2) is equivalent to 3). \Box

Remark. If (X_1, \rho_1) and (X_2, \rho_2) are metric spaces, a map f: X_1\to X_2 is called continuous at x\in X_1 if for every \epsilon>0, \exists \delta>0 such that \rho_2(f(y), f(x))<\epsilon whenever \rho_1(x, y)<\delta. In other words, f^{-1}(B(\epsilon, f(x)))\supset B(\delta, x). The map f is called continuous if it is continuous at each x\in X_1 and uniformly continuous if the \delta in the definition of continuity can be chosen independent of x.

Proposition. f: X_1\to X_2 is continuous iff f^{-1}(U) is open in X_1 for every open U\subset X_2.

Proof. If the latter condition holds, then for every x\in X_1 and \epsilon>0, the set f^{-1}(B(\epsilon, f(x))) is open and contains x, so it contains some ball about x; this means that f is continuous at x. Conversely, suppose that f is continuous and U is open in X_2. For each y\in U, \exists \epsilon_y>0 such that B(\epsilon_y, y)\subset U, and for each x\in f^{-1}(\{y\}), \exists\delta_x such that B(\delta_x, x)\subset f^{-1}(B(\epsilon_y, y))\subset f^{-1}(U). Thus f^{-1}(U)=\cup_{x\in f^{-1}}B(\delta_x, x) is open. $\Box$

“I understand now that the vulnerability I’ve always felt is the greatest strength a person can have. You can’t experience life without feeling life. What I’ve learned is that being vulnerable to somebody you love is not a weakness, it is strength.” ~ Elisabeth Shue


[1] Gerald B. Folland, Real Analysis: Modern Techniques and Their Applications, 2ed, page 13-14.

[2] Purpose Fairy’s 21-Day Happiness Challenge, http://www.jrmstart.com/wordpress/wp-content/uploads/2014/10/Free+eBook+-+PurposeFairys+21-Day+Happiness+Challenge.pdf.