Real Analysis: Global Metric Topology

Compactness


Compactness is an important property of sets in both metric and general topology. While its definition is abstract and does not immediately lend itself to a geometric intuition, the Heine-Borel theorem shows that, under the right conditions, it is equivalent to one that does have concrete geometric meaning. We start by defining the preliminary concept of a cover.

Covers

Let $S$ be a subset of a metric space $(X, d)$. A collection of subsets $\{C_{\alpha}\}$ is a cover of $S$ if its union contains $S$. Note that sets in a cover need not be disjoint (i.e. form a partition) or obey any other property. An open cover is a cover whose sets are all open. A subcover is a subcollection of a cover that still covers the original set. Covers are also sometimes called coverings.

Compactness

A set $S$ is compact if every open cover of it has a finite subcover. Because compactness does not focus on individual elements of the set but on open sets in relation to the whole set, it is a global topological property of the set, rather than a local one.

Finiteness Is Easy To Reason About

As the cardinality of a set increases from finite to countably infinite to uncountably infinite, it often becomes harder to reason about. As a result, compactness can be understood as a property that allows us to reduce any (possibly infinite) problem space down to a finite one. Instead of associating the cardinality of a set itself with a finite number, compactness associates the cardinality of open sets covering the set with a finite number. Thus, compactness is a form of topological finiteness. Proofs that might be done in terms of finite elements of a set instead involve finite open sets that collectively cover a set.

Topology vs. Geometry

The open cover definition of compactness is "the" definition of compactness from general topology, whose primary focus lies not with geometric notions of size and length, but with open sets. Therefore, from its definition alone, compactness should be understood as a property that makes a set's topology easier to reason about, not its geometry.

To this claim there is a strong rebuttal - all the topological terms discussed so far, from interior and boundary to connectedness, nevertheless come with clear geometric intuition. Why not compactness? The answer is that the open cover definition is the most general characterization of compactness that captures the core of the topological concept. This topological core, however, was distilled out of a more geometrically based understanding of compactness.

The definition of open sets of a metric topology in terms of open balls, which in turn are defined in terms of distance, means we should in fact expect to see some fundamental connections between the two. One such connection is the Heine-Borel theorem, which holds that a subset of $\mathbb{R}^n$ under the Euclidean metric is compact if and only if it is closed and bounded.

The Heine-Borel Theorem

The Heine-Borel theorem states that a subset of $\mathbb{R}^n$ under the Euclidean metric is compact if and only if it is closed and bounded. This theorem makes valuable a connection between nice topological properties and nice geometric properties in $\mathbb{R}^n.$ Recall that closed sets also include their boundaries. A compact subset of $\mathbb{R}^n$ therefore includes all the points that are close to it (its boundary) and does not extend off infinitely in any direction.


Problems

  1. Show that finite sets are compact.

    Consider the subset $S = \{x_1, \ldots, x_n\}$ of a metric space $(X, d).$ Let $\mathcal{C}$ be an open cover of $S.$ For each $x_i \in S,$ there exists an open set $C_i \in \mathcal{C}$ such that $x_i \in C_i.$ It follows that the set $C = \{C_1, \ldots, C_n\}$ is an open subcover of $\mathcal{C}.$ Therefore $X$ is compact.

    Show Answer
  2. Show that compact sets are bounded.

    Let $S$ be a compact subset of a metric space $(X, d).$ Consider the open ball $B_1(x)$ centered at an element $x \in S.$ The set of all such balls around each element of $S$ forms an open cover of $S.$ Since $S$ is compact, there exists a finite collection of sets $B_1(x_1), \ldots, B_1(x_n)$ that cover $S.$ Consider pair of points points $x_i$ and $x_j$ in $S$ that have the greatest distance between them of any pair of points in $S.$ It follows that the ball $B_r(x_i)$ of radius $r = d(x_i, x_j) + 1$ contains every point of $S.$ Therefore $S$ is bounded.

    Show Answer
  3. Show that compact sets are closed.

    Let $S$ be a compact subset of a metric space $(X, d).$ We show that $S^c$ is open.

    Let $x \in S^c.$ For each $y \in S,$ consider the open ball $B_{r_y}(y)$ of radius $r_y < \frac{1}{2}d(x, y).$ It follows that $\mathcal{B} = \{B_{r_y}(y) : y \in S \}$ is an open cover of $S.$ Since $S$ is compact, there are finitely many points $y_1, \ldots, y_n$ in $S$ such that $S \subseteq B = \{ B_{r_i}(y_i) : 1 \leq i \leq n\}.$ Let $A = \bigcap\limits_{i=1}^{n} B_{r_i}(x).$ It follows that $A$ is an open ball containing $x$ that does not intersect $S.$ Therefore $A \subseteq S^c,$ and so $x$ is an interior point of $S^c.$ It follows that $S^c$ is open, and thus that $S$ is closed.

    Show Answer
  4. Show that closed subsets of compact sets are compact.

    Let $S$ be a compact subset of a metric space $(X, d),$ let $T$ be a closed subset of $S,$ and let $\mathcal{C}_T$ be an open cover of $T.$ Since $T$ is closed, $T^c$ is open. It follows that the collection $\mathcal{C}_S = \mathcal{C}_T \cup \{T^c\}$ is an open cover of $S.$ Since $S$ is compact, it contains a finite subcover $C_S.$ Since $T \subseteq S,$ it follows that $C_S$ is also a finite cover of $T.$ From there it follows that $C_T = C_S - \{T^c\}$ is still a finite subcover of $T,$ as $T^c$ contains no elements of $T$ by definition. This means that $C_T \subseteq \mathcal{C}_T,$ and therefore that $T$ is compact.

    Show Answer
  5. Show that the union of two compact sets is compact.

    Let $A$ and $B$ be compact subsets of a metric space $(X, d).$ Define $C = A \cup B,$ and let $\mathcal{T}_C$ be an open cover of $C.$ It follows that $\mathcal{T}_C$ is an open cover of $A$ and an open cover of $B$. Since $A$ and $B$ are both compact, there exist finite open subcovers of $\mathcal{T}_C,$ $T_A$ and $T_B,$ that cover $A$ and $B,$ respectively. Since the union of finite sets is finite, the set $T_C = T_A \cup T_B$ is a finite open subcover of $\mathcal{T}_C.$ Therefore $C$ is compact.

    Show Answer
  6. Show that the intersection of two compact sets is compact.

    Let $A$ and $B$ be compact subsets of a metric space $(X, d).$ Since $A$ and $B$ are compact, they are closed, and therefore their intersection $A \cap B$ is closed. Since $A \cap B$ is a closed subset of the compact set $A,$ it follows that $A \cap B$ is also compact.

    Show Answer
  7. Show that natural numbers, $\mathbb{N},$ are not compact under the Euclidean metric.

    Consider the set $\mathcal{B} = \{ B_{1}(x) : x \in \mathbb{N} \},$ where $B_1(x)$ is the open ball of radius $1$ around $x.$ Since each set in $\mathcal{B}$ is open, and $\bigcup \mathcal{B} = \mathbb{N},$ it follows that $\mathcal{B}$ is an open cover of $\mathbb{N}.$ Consider any finite subset $B \subset \mathcal{B}.$ Let $y = \sup\{B\}.$ It follows that $y +1 \notin B,$ and therefore $B$ is not a subcover of $\mathcal{B}.$ Therefore $\mathbb{N}$ is not compact.

    Show Answer
  8. Show that the integers, $\mathbb{Z},$ are not compact under the Euclidean metric.

    This proof is identical in form to the proof that $\mathbb{N}$ is not compact:

    Consider the set $\mathcal{B} = \{ B_{1}(x) : x \in \mathbb{Z} \},$ where $B_1(x)$ is the open ball of radius $1$ around $x.$ Since each set in $\mathcal{B}$ is open, and $\bigcup \mathcal{B} = \mathbb{Z},$ it follows that $\mathcal{B}$ is an open cover of $\mathbb{Z}.$ Consider any finite subset $B \subset \mathcal{B}.$ Let $y = \sup\{B\}.$ It follows that $y +1 \notin B,$ and therefore $B$ is not a subcover of $\mathcal{B}.$ Therefore $\mathbb{Z}$ is not compact.

    Show Answer
  9. Show that rational numbers, $\mathbb{Q},$ are not compact under the Euclidean metric.

    Consider the set $\mathcal{S} = \{ B_1(x) \subset \mathbb{Q} : x \in \mathbb{Z} \}.$ Select any $x \in \mathbb{Q}.$ If $x \in \mathbb{Z},$ then $x \in B_1(x) \in S.$ If $x \notin \mathbb{Z},$ then let $y$ be the first integer greater than $x.$ It follows that $x \in B_1(y).$ Therefore $\mathcal{S}$ is an open cover of $\mathbb{Q}.$

    Let $S$ be any finite subset of $\mathcal{S}.$ Then $S = \{ B_1(x_i) : x_i \in \mathbb{Z} \text{ and } 1 \leq i \leq n \}$ for some $n \in \mathbb{N}.$ Pick $z = \sup\{x_i\}.$ It follows that $z + 1 \notin \cup S.$ Therefore $S$ is not a subcover of $\mathcal{S}.$ Therefore $\mathbb{Q}$ is not compact.

    Show Answer
  10. Show that the real numbers, $\mathbb{R},$ are not compact under the Euclidean metric.

    The proof here is identical in form to the proof that $\mathbb{Q}$ is not compact.

    Consider the set $\mathcal{S} = \{ B_1(x) : x \in \mathbb{Z} \}.$ Select any $x \in \mathbb{R}.$ If $x \in \mathbb{Z},$ then $x \in B_1(x) \in S.$ If $x \notin \mathbb{Z},$ then let $y$ be the first integer greater than $x.$ It follows that $x \in B_1(y).$ Therefore $\mathcal{S}$ is an open cover of $\mathbb{R}.$

    Let $S$ be any finite subset of $\mathcal{S}.$ Then $S = \{ B_1(x_i) : x_i \in \mathbb{Z} \text{ and } 1 \leq i \leq n \}$ for some $n \in \mathbb{N}.$ Pick $z = \sup\{x_i\}.$ It follows that $z + 1 \notin \cup S.$ Therefore $S$ is not a subcover of $\mathcal{S}.$ Therefore $\mathbb{R}$ is not compact.

    Show Answer
  11. Show that every closed interval in $\mathbb{R}$ is compact under the Euclidean metric.

    Hint: Use the nested interval theorem.

    Proof by contradiction.

    Let $I = [a, b]$ be a closed interval, and define $\delta = \text{Diam}(I).$ It follows that $\delta = b - a.$

    Suppose $I$ is not compact. Then there is an open cover $\mathcal{C}$ of $I$ which does not admit a finite subcover. Set $p = \frac{a + b}{2}.$ It follows that $[a, p]$ and $[p, b]$ are two subsets of $I$ whose union is $I.$ It must be that at least one of these intervals cannot be covered by a finite subcover of $\mathcal{C},$ as otherwise the union of their covers would form a finite subcover of $\mathcal{C}.$ Pick one of these intervals and call it $I_1,$ and set $\delta_1 = \text{Diam}(I_1) = \frac{1}{2}\delta.$ Repeat this process of bisection to produce additional intervals $I_2,$ $I_3,$ and so on, along with their respective diameters $\delta_1,$ $\delta_2,$ and so on. Because $I_{n+1} \subset I_n,$ it follows that $\{I_n\}$ form a nested sequence of intervals. Additionally, since $\delta_{n+1} = \frac{1}{2}\delta_{n},$ it follows that $\delta_n = 2^{-n}\delta.$

    By the nested interval theorem, there is a point $x^*$ which lies in every $I_n.$ Additionally, there is some $C \in \mathcal{C}$ such that $x^* \in C.$ Since $C$ is open, there exists some $r > 0$ such that $x^* \in B_r(x^*) \subseteq C.$ By the Archimedean property on $\mathbb{R},$ there exists an $m \in \mathbb{N}$ such that $2^{-m}\delta < r.$ However, this implies that $I_m \subseteq B_r(x^*) \subseteq C,$ which is a contradiction, since this implies that $I_m$ has a finite subcover. Therefore $I$ was compact after all.

    Show Answer
  12. Heine-Borel Theorem for $\mathbb{R}$: Show that a subset of $\mathbb{R}$ under the Euclidean metric is compact if and only if it is closed and bounded.

    First, let $S$ be a compact subset of $\mathbb{R}.$ By the preceding proofs, it is closed and bounded.

    Conversely, let $S$ be a closed and bounded subset of $\mathbb{R}.$ Since $S$ is bounded, there is some $r > 0$ such that $S \subseteq \overline{B}_r(x)$ for some $x \in S.$ Note that $\overline{B}_r(x)$ is a closed interval and is therefore compact. Since $S$ is a closed subset of the compact set $\overline{B}_r(x),$ it follows that $S$ is compact.

    Show Answer
  13. Show that every closed k-cell in $\mathbb{R}^k$ is compact under the Euclidean metric.

    Hint: Use the nested k-cell theorem.

    Proof by contradiction.

    Consider the closed k-cell $S = \overline{K}_n(\mathbf{a}, \mathbf{b}),$ and define $\delta = \text{Diam}(S).$ It follows that $\delta = d(\mathbf{a}, \mathbf{b}).$

    Suppose $S$ is not compact. Then there is an open cover $\mathcal{C}$ of $S$ which does not admit a finite subcover. Set $p_i = \frac{a_i + b_i}{2}$ for all $1 \leq i \leq n.$ Define the sets $T_1$ through $T_n$ as follows:

    $T_k = \left\{ \begin{array}{ll} \{[a_1, p_1], [p_1, b_1]\} & \text{ when } k = 1\\\{[a_k, p_k] \times t : t \in T_{k-1}\} \cup \{[p_k, b_k] \times t : t \in T_{k-1}\} & \text{ when } 1 < k \leq n \end{array} \right.$

    where $\times$ denotes the associative Cartesian product. Since the associative Cartesian product of a k-cell with an interval is another k-cell, it follows that all the elements of $T_n$ are $n$-dimensional k-cells. Furthermore, note that $[a_i, p_i] \cup [p_i, b_i] = [a_i, b_i],$ and so $\bigcup T_n = S.$

    It must be that at least one of the k-cells in $T_n$ cannot be covered by a finite subcover of $\mathcal{C},$ as otherwise the union of their subcovers would form a finite subcover of $\mathcal{C}.$ Pick one such k-cell and call it $S_1.$

    Next, define $\delta_1 = \text{Diam}(S_1).$ Since each side length of $S_1$ is half the side length in $S,$ we can see that $\delta_1 = \frac{1}{2}\delta:$

    $ \delta_1 = \sqrt{\sum\limits_{i=1}^{k} \left|\dfrac{1}{2}(b_i - a_i)\right|^2 } \\ \delta_1 = \sqrt{\sum\limits_{1=1}^{k} \dfrac{1}{4}|b_i - a_i|^2} \\ \delta_1 = \sqrt{\dfrac{1}{4}\sum\limits_{1=1}^{k} |b_i - a_i|^2} \\ \delta_1 = \dfrac{1}{2}\sqrt{\sum\limits_{1=1}^{k} |b_i - a_i|^2} \\ \delta_1 = \dfrac{1}{2}d(\mathbf{a}, \mathbf{b}) \\ \delta_1 = \dfrac{1}{2}\delta $

    Repeat this process of bisection to produce additional k-cells $S_2,$ $S_3,$ and so on, each with corresponding diameters $\delta_1, \delta_2,$ and so on. By construction, we see that $S_{n+1} \subset S_n,$ and so the sets form a nested sequence of k-cells. Since $\delta_{n+1} = \frac{1}{2}\delta_n,$ it follows that $\delta_n = 2^{-n}\delta.$

    By the nested k-cell theorem, there is a point $\mathbf{x}^*$ which lies in every $S_n.$ Likewise, there is some $C \in \mathcal{C}$ such that $\mathbf{x}^* \in C.$ Since $C$ is open, there exists some $r > 0$ such that $\mathbf{x}^* \in B_r(\mathbf{x}^*) \subseteq C.$ By the Archimedean property on $\mathbb{R},$ there exists an $m \in \mathbb{N}$ such that $2^{-m}\delta < r.$ However, this implies that $S_m \subseteq B_r(\mathbf{x}^*) \subseteq C,$ which is a contradiction, since this implies that $S_m$ has a finite subcover. Therefore $S$ was compact after all.

    Show Answer
  14. Heine-Borel Theorem for $\mathbb{R}^n$: Show that a subset of $\mathbb{R}^n$ under the Euclidean metric is compact if and only if it is closed and bounded.

    First, let $S$ be a compact subset of $\mathbb{R}^n.$ By the preceding proofs, it is closed and bounded.

    Conversely, assume $S$ is a closed and bounded subset of $\mathbb{R}^n.$ Then there is some closed k-cell $K$ defined by $\mathbf{a}, \mathbf{b} \in \mathbb{R}^n$ where $a_i \leq x_i \leq b_i$ for all $\mathbf{x} \in S.$ By the above proof, $K$ is compact. Since $S$ is a closed subset of a compact set, it is therefore compact.

    Show Answer
  15. Counterexample: Give an example of a metric space for which the Heine-Borel theorem does not hold.

    Consider $\mathbb{R}$ under the discrete metric. $\mathbb{R}$ is bounded by $\overline{B}_1(0)$ and closed by definition. The set $\{B_{\frac{1}{2}}(x) : x \in \mathbb{R} \} = \{ \{x\} : x \in \mathbb{R} \}$ forms an open cover of $\mathbb{R}$ but has no finite subcover, as any proper subset is no longer a cover. It follows that $\mathbb{R}$ is not compact under the discrete metric.

    Show Answer
  16. Counterexample: Show that the arbitrary union of compact sets is not compact.

    Consider the singleton set $\{x\} \subset \mathbb{R}.$ As shown above, finite subsets of $\mathbb{R}$ are compact. However, the union $\bigcup\limits_{x \in \mathbb{R}} \{x\} = \mathbb{R}$ is not compact.

    Show Answer