2.8 Compact Sets in a Metric Space

Boundedness says a set does not run off to infinity. Total boundedness says more: it can be pinned down by finitely many small pieces at every scale. The notion in this section is stronger again, and it is the one that makes the theorems of analysis work.

Definition 2.49. Let \(X\) be any set. A family \(\xi \) of subsets \(\{G_i\}\) of \(X\) is said to form a covering of \(X\) if \[X\subset \bigcup _{G_i\in \xi }G_i.\] If \(X\) is a metric space and each \(G_i\) is an open set, then \(\xi \) is called an open covering of \(X\).

Definition 2.50. A metric space \(X\) is said to be compact if every open covering of \(X\) has a finite sub-cover. A subset \(K\) of \(X\) is compact if it is compact as a metric space in its own right, with the metric inherited from \(X\).

Note. The definition is easy to misread. It does not say that \(X\) has some finite open cover — every space has one, namely \(\{X\}\). It says that however the space is covered by open sets, finitely many of them already suffice. The force of the definition is that it applies to every cover at once, which is why it is so often used by producing an awkward cover and seeing what a finite subcover of it must give.

Theorem 2.51. Every compact subset \(K\) of a metric space \((X,d)\) is closed and bounded.

Proof.

Bounded

Fix any \(x_0\in X\). The open balls \(B(x_0;n)\), for \(n=1,2,3,\dots \), cover the whole of \(X\) and in particular cover \(K\). By compactness finitely many of them cover \(K\), and since the balls increase with \(n\) the largest of that finite collection contains the rest: \(K\subset B(x_0;N)\) for some \(N\). Hence \(K\) is bounded.

Closed

We show the complement is open. Let \(x\in X\setminus K\). For each \(y\in K\) put \[r_y = \tfrac 12\, d(x,y) > 0 ,\] which is positive precisely because \(x\notin K\) and so \(x \neq y\). The balls \(B(y;r_y)\), as \(y\) runs over \(K\), form an open cover of \(K\), so finitely many of them cover it, say \(B(y_1;r_1),\dots ,B(y_n;r_n)\) with \(r_i = r_{y_i}\). Put \[r = \min \{r_1,\dots ,r_n\} > 0 .\] Then \(B(x;r)\) meets none of these balls. For if \(z\in B(x;r)\cap B(y_i;r_i)\) then \[d(x,y_i)\leq d(x,z)+d(z,y_i) < r + r_i \leq 2r_i = d(x,y_i),\] which is absurd. So \(B(x;r)\) misses \(K\) entirely, that is \(B(x;r)\subset X\setminus K\). As \(x\) was arbitrary, \(X\setminus K\) is open and \(K\) is closed. □

Remark. The converse is false, and the counterexample is one already met. In \(l_2\) the set \(A=\{e_1,e_2,e_3,\dots \}\) of standard unit vectors is closed and bounded, every pair of its points being at distance \(\sqrt 2\); but it is not totally bounded, and by the theorem of the previous subsection no sequence in it has a Cauchy subsequence. It is therefore not compact. In an infinite-dimensional space, closed and bounded is simply not enough.

Theorem 2.52 (Heine–Borel property). Let \(E\) be a bounded and closed set in \(\mathbb {R}\), then every open covering of \(E\) has a finite sub covering.

Proof. Since \(E\) is bounded, we have \(E\subset I_1=[a,b]\), \((a,b)\). We proceed by contradiction on \(I_1\).

Suppose (if possible) there is an open covering \(\{G_i\}\) of \(I_1\) i.e \(I_1\subset \bigcup G_i\) which has no finite sub covering. Bisect \(I_1\) into two closed intervals \(I_2\) and \(I'_2\). At least one of these must have no finite sub covering. Let \(I_2\) be the part without a finite sub covering. Bisect \(I_2\) into \(I_3\) and \(I'_3\). Continuing in this way, we have a nested sequence of intervals \(I_n\) such that \(I_n\) has no finite subcover for each \(n\).

By nested sequence interval theorem \(\displaystyle {\bigcap _{n=1}^{\infty }I_n\neq \emptyset }.\) Let \(x\in I_n\). Then \(\displaystyle { x\in I_1\subset \bigcup ^{\infty }_{i=1}G_i},\hspace {0.2cm}\) so, \(x\in G_i\) for some \(i\). Since \(G_i\) is open there exist an open ball \(B_r(x)=(x-r,x+r)\subset G_i.\) Taking \(n\) large enough, we have \(I_n\subset B_r(x)=(x-r,x+r)\subset G_i.\) This means that \(I_n\) is covered by a single set \(G_i\). This contradicts that \(I_n\) has no finite sub covering. Thus our early assumption is not true. Therefore \(E\) has a finite sub covering. □

Corollary 2.53 (Heine–Borel theorem). A subset of \(\mathbb {R}^n\) is compact if and only if it is closed and bounded.

Proof. One direction is the theorem above, applied coordinatewise: a closed bounded subset of \(\mathbb {R}^n\) lies in a closed box \([a_1,b_1]\times \cdots \times [a_n,b_n]\), which is compact by repeating the bisection argument in \(n\) dimensions, and a closed subset of a compact set is compact. The other direction is the previous theorem, which holds in any metric space. □

Remark. It is worth being clear about what is special here. Compact implies closed and bounded is true in every metric space. The converse is a property of \(\mathbb {R}^n\) and fails as soon as the space is infinite-dimensional. Much of functional analysis is a response to that failure.

Example 2.54. Find an open covering of \([a,b]\) and show that it contains a finite sub covering in the absolute value metric.

Solution. Consider \(G_n=\Big (a-\dfrac {1}{n},b+\dfrac {1}{n}\Big )\hspace {0.2cm}\) then \(\displaystyle {[a,b]\subset \bigcup ^{\infty }_{n=1}G_n}\hspace {0.2cm}\) and that \([a,b]\subset (a-1,b+1)=G_1,\hspace {0.2cm}\) thus \(\{G_1\}\) is a finite sub cover of \([a,b]\).

Example 2.55. Show that \((0,1]\) is not compact in the usual metric on \(\mathbb {R}\).

Solution. Take \(\displaystyle {G_n = \Big (\frac 1n , 2\Big )}\) for \(n=1,2,3,\dots \) Each is open, and every \(x\in (0,1]\) satisfies \(x>\frac 1n\) for some \(n\), so \(\{G_n\}\) is an open cover. Any finite subfamily has a largest index \(N\), and the union of the subfamily is then \(\Big (\dfrac 1N,2\Big )\), which omits \(\dfrac {1}{N+1}\). No finite subcover exists.

The set is bounded but not closed, and the cover exhibits exactly the point that is missing. This is the standard way to prove non-compactness: produce one cover whose finite subfamilies visibly fail.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.