$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# 4.6: Compact Sets

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

We now pause to consider a very important kind of sets. In Chapter 3, §16, we showed that every sequence $$\left\{\overline{z}_{m}\right\}$$ taken from a closed interval $$[\overline{a}, \overline{b}]$$ in $$E^{n}$$ must cluster in it (Note 1 of Chapter 3, §16). There are other sets with the same remarkable property. This leads us to the following definition.

Definition: sequentially compact

A set $$A \subseteq(S, \rho)$$ is said to be sequentially compact (briefly compact) iff every sequence $$\left\{x_{m}\right\} \subseteq A$$ clusters at some point $$p$$ in $$A .$$

If all of $$S$$ is compact, we say that the metric space $$(S, \rho)$$ is compact.

Example $$\PageIndex{1}$$

(a) Each closed interval in $$E^{n}$$ is compact (see above).

(a') However, nonclosed intervals, and $$E^{n}$$ itself, are not compact.

For example, the sequence $$x_{n}=1 / n$$ is in $$(0,1] \subset E^{1},$$ but clusters only at $$0,$$ outside $$(0,1] .$$ As another example, the sequence $$x_{n}=n$$ has no cluster points in $$E^{1} .$$ Thus $$(0,1]$$ and $$E^{1}$$ fail to be compact (even though $$E^{1}$$ is complete); similarly for $$E^{n}\left(^{*} \text { and } C^{n}\right) .$$

(b) Any finite set $$A \subseteq(S, \rho)$$ is compact. Indeed, an infinite sequence in such a set must have at least one infinitely repeating term $$p \in A .$$ Then by definition, this $$p$$ is a cluster point (see Chapter 3, §14, Note 1).

(c) The empty set is "vacuously" compact (it contains no sequences).

(d) $$E^{*}$$ is compact. See Example $$(\mathrm{g})$$ in Chapter 3, §14.

Other examples can be derived from the theorems that follow.

Theorem $$\PageIndex{1}$$

If a set $$B \subseteq(S, \rho)$$ is compact, so is any closed subset $$A \subseteq B$$.

Proof

We must show that each sequence $$\left\{x_{m}\right\} \subseteq A$$ clusters at some $$p \in A$$. However, as $$A \subseteq B,\left\{x_{m}\right\}$$ is also in $$B,$$ so by the compactness of $$B,$$ it clusters at some $$p \in B .$$ Thus it remains to show that $$p \in A$$ as well.

Now by Theorem 1 of Chapter $$3, §16,\left\{x_{m}\right\}$$ has a subsequence $$x_{m_{k}} \rightarrow p$$. As $$\left\{x_{m_{k}}\right\} \subseteq A$$ and $$A$$ is closed, this implies $$p \in A$$ (Theorem 4 in Chapter $$3,$$ $$§16) . \quad \square$$

Theorem $$\PageIndex{2}$$

Every compact set $$A \subseteq(S, \rho)$$ is closed.

Proof

Given that $$A$$ is compact, we must show (by Theorem 4 in Chapter 3, §16) that $$A$$ contains the limit of each convergent sequence $$\left\{x_{m}\right\} \subseteq A$$.

Thus let $$x_{m} \rightarrow p,\left\{x_{m}\right\} \subseteq A .$$ As $$A$$ is compact, the sequence $$\left\{x_{m}\right\}$$ clusters at some $$q \in A,$$ i.e., has a subsequence $$x_{m_{k}} \rightarrow q \in A .$$ However, the limit of the subsequence must be the same as that of the entire sequence. Thus $$p=q \in A$$; i.e., $$p$$ is in $$A,$$ as required. $$\square$$

Theorem $$\PageIndex{3}$$

Every compact set $$A \subseteq(S, \rho)$$ is bounded.

Proof

By Problem 3 in Chapter 3, §13, it suffices to show that $$A$$ is contained in some finite union of globes. Thus we fix some arbitrary radius $$\varepsilon>0$$ and, seeking a contradiction, assume that $$A$$ cannot by any finite number of globes of that radius.

Then if $$x_{1} \in A,$$ the globe $$G_{x_{1}}(\varepsilon)$$ does not cover $$A,$$ so there is a point $$x_{2} \in A$$ such that

$x_{2} \notin G_{x_{1}}(\varepsilon), \text{ i.e., } \rho\left(x_{1}, x_{2}\right) \geq \varepsilon$

By our assumption, $$A$$ is not even covered by $$G_{x_{1}}(\varepsilon) \cup G_{x_{2}}(\varepsilon) .$$ Thus there is a point $$x_{3} \in A$$ with

$x_{3} \notin G_{x_{1}}(\varepsilon) \text{ and } x_{3} \notin G_{x_{2}}(\varepsilon), \text{ i.e., } \rho\left(x_{3}, x_{1}\right) \geq \varepsilon \text{ and } \rho\left(x_{3}, x_{2}\right) \geq \varepsilon.$

Again, $$A$$ is not covered by $$\bigcup_{i=1}^{3} G_{x_{i}}(\varepsilon),$$ so there is a point $$x_{4} \in A$$ not in that union; its distances from $$x_{1}, x_{2},$$ and $$x_{3}$$ must therefore be $$\geq \varepsilon$$.

Since $$A$$ is never covered by any finite number of $$\varepsilon$$ -globes, we can continue this process indefinitely (by induction) and thus select an infinite sequence $$\left\{x_{m}\right\} \subseteq A,$$ with all its terms at least $$\varepsilon$$ -apart from each other.

Now as $$A$$ is compact, this sequence must have a convergent subsequence $$\left\{x_{m_{k}}\right\},$$ which is then certainly Cauchy (by Theorem 1 of Chapter 3, §17). This is impossible, however, since its terms are at distances $$\geq \varepsilon$$ from each other, contrary to Definition 1 in Chapter 3, §17. This contradiction completes the proof. $$\square$$

Note 1. We have actually proved more than was required, namely, that no matter how small $$\varepsilon>0$$ is, $$A$$ can be covered by finitely many globes of radius $$\varepsilon$$ with centers in $$A .$$ This property is called total boundedness (Chapter 3, §13, Problem 4).

Note 2. Thus all compact sets are closed and bounded. The converse fails in metric spaces in general (see Problem 2 below). In $$E^{n}\left(^{*} \text { and } C^{n}\right),$$ however, the converse is likewise true, as we show next.

Theorem $$\PageIndex{4}$$

In $$E^{n}\left(^{*} \text { and } C^{n}\right)$$ a set is compact iff it is closed and bounded.

Proof

In fact, if a set $$A \subseteq E^{n}\left(^{*} C^{n}\right)$$ is bounded, then by the Bolzano-Weierstrass theorem, each sequence $$\left\{x_{m}\right\} \subseteq A$$ has a convergent subsequence $$x_{m_{k}} \rightarrow p .$$ If $$A$$ is also closed, the limit point $$p$$ must belong to $$A$$ itself.

Thus each sequence $$\left\{x_{m}\right\} \subseteq A$$ clusters at some $$p$$ in $$A,$$ so $$A$$ is compact.

The converse is obvious. $$\square$$

Note 3. In particular, every closed globe in $$E^{n}\left(^{*} \text { or } C^{n}\right)$$ is compact since it is bounded and closed (Chapter 3, §12, Example $$(6) ),$$ so  theorem 4 applies.

The converse is obvious. $$\square$$

Theorem $$\PageIndex{5}$$

(Cantor's principle of nested closed sets). Every contracting sequence of nonvoid compact sets

$F_{1} \supseteq F_{2} \supseteq \cdots \supseteq F_{m} \supseteq \cdots$

in a metric space $$(S, \rho)$$ has a nonvoid intersection; i.e., some $$p$$ belongs to all $$F_{m} .$$

For complete sets $$F_{m},$$ this holds as well, provided the diameters of the sets $$F_{m}$$ tend to $$0 : d F_{m} \rightarrow 0 .$$

Proof

We prove the theorem for complete sets first.

As $$F_{m} \neq \emptyset,$$ we can pick a point $$x_{m}$$ from each $$F_{m}$$ to obtain a sequence $$\left\{x_{m}\right\}, x_{m} \in F_{m} .$$ since $$d F_{m} \rightarrow 0,$$ it is easy to see that $$\left\{x_{m}\right\}$$ is a Cauchy sequence. (The details are left to the reader.) Moreover,

$(\forall m) \quad x_{m} \in F_{m} \subseteq F_{1}.$

Thus $$\left\{x_{m}\right\}$$ is a Cauchy sequence in $$F_{1},$$ a complete set (by assumption).

Therefore, by the definition of completeness (Chapter 3, §17), $$\left\{x_{m}\right\}$$ has a limit $$p \in F_{1} .$$ This limit remains the same if we drop a finite number of terms, say, the first $$m-1$$ of them. Then we are left with the sequence $$x_{m}, x_{m+1}, \ldots,$$ which, by construction, is entirely contained in $$F_{m}$$ (why?), with the same limit P. Then, however, the completeness of $$F_{m}$$ implies that $$p \in F_{m}$$ as well. As $$m$$ is arbitrary here, it follows that $$(\forall m) p \in F_{m},$$ i.e.,

$p \in \bigcap_{m=1}^{\infty} F_{m}, \text{ as claimed.}$

The proof for compact sets is analogous and even simpler. Here $$\left\{x_{m}\right\}$$ need not be a Cauchy sequence. Instead, using the compactness of $$F_{1},$$ we select from $$\left\{x_{m}\right\}$$ a subsequence $$x_{m_{k}} \rightarrow p \in F_{1}$$ and then proceed as above. $$\square$$

Note 4. In particular, in $$E^{n}$$ we may let the sets $$F_{m}$$ be closed intervals (since they are compact). Then Theorem 5 yields the principle of nested intervals: Every contracting sequence of closed intervals in $$E^{n}$$ has a nonempty intersection. (For an independent proof, see Problem 8 below.)