# The Euclidean topology of the real line (4) – Compactness

In this post we discuss several notions of compactness, which are presented in the context of the real line. This is part of a series of posts on the topology of the real line. Our goal is to use this series of posts on the real line to motivate the topological notions being discussed. For basic definitions of open intervals, open sets and closed sets of the real line, refer to these previous posts:

This is a post on introductory topology. Concepts discussed here are basic notions found in beginning topology courses and elementary analysis courses. For the readers who are taking math courses that transition their math career from calculation to proving of theorems, we encourage such readers to think about the concepts and theorems discussed here before reading the proofs.

Let $\mathbb{R}$ be the set of all real numbers. Let $\mathcal{U}$ be a collection of subsets of $\mathbb{R}$. The set $\bigcup \mathcal{U}$ denotes the union of all sets in $\mathcal{U}$ and is the set of all real numbers which belong to at least one set $U \in \mathcal{U}$.

\displaystyle \begin{aligned} \bigcup \mathcal{U}&=\bigcup \left\{U: U \in \mathcal{U}\right\}\\&=\left\{x: x \in U \text{ where }U \in \mathcal{U}\right\}\end{aligned}

Let $W \subset \mathbb{R}$. By an open cover of $W$, we mean a collection $\mathcal{U}$ of open sets of $\mathbb{R}$ such that $W \subset \bigcup \mathcal{U}$, that is, every point in $W$ belongs to some open set in $\mathcal{U}$. The subset $W$ of $\mathbb{R}$ is said to be compact if for each open cover $\mathcal{U}$ of $W$, there is a finite subcollection $\mathcal{V}$ of $\mathcal{U}$ such that $W \subset \bigcup \mathcal{V}$.

The real line $\mathbb{R}$ is not compact since $\left\{(-n,n): n=1,2,3, \cdots\right\}$ is an open cover of $\mathbb{R}$ such that no finite subcollection of which is a cover of the real line.

Any convergent sequence along with its limit is a compact set. For example, the set $A=\left\{0\right\} \cup \left\{1,\frac{1}{2},\frac{1}{3},\cdots\right\}$ is compact since any open interval containing $0$ contains all but finitely many points of the convergent sequence $\left\{1,\frac{1}{2},\frac{1}{3},\cdots\right\}$.

Any subset of the real line that is not closed can never be compact since every compact subset of the real line is closed. Thus we have the following theorem.

Theorem 1
Let $W \subset \mathbb{R}$. If $W$ is compact, then $W$ is closed in $\mathbb{R}$.

Proof
Suppose $W$ is not closed. Then there is a limit point $p$ of $W$ such that $p \notin W$. Let $\mathbb{N}$ be the set of all positive integers. Then the following is an open cover of $W$ such that it has no finite subcollection covering $W$:

$\displaystyle \left\{(-\infty,p-\frac{1}{n}):n \in \mathbb{N}\right\} \cup \left\{(p+\frac{1}{n},+\infty):n \in \mathbb{N}\right\}$

Therefore, if $W$ is compact, then $W$ must be closed. $\blacksquare$

Recall from the previous post (The Euclidean topology of the real line (2)) that open sets and closed sets are relative to the space in which they are embedded. For example, take $Y=(0,1) \cup \left\{2\right\}$. The singleton set $\left\{2\right\}$ is surely not an open subset of the whole real line. However, it is open relative to the space $Y$. The property of being closed sets is also relative. The interval $(0,1)$ is a closed set relative to the space $Y=(0,1) \cup \left\{2\right\}$. However, $(0,1)$ is not a closed set in the whole real line since both endpoints are limit points that are not in the $(0,1)$.

The notion of compactness is not a relative concept. Let $W \subset \mathbb{R}$. Let’s call the definition of $W$ being a compact set as defined above the property of being compact relative to $\mathbb{R}$. We say that $W$ is compact relative to $W$ if in the same definition of compactness above, the open cover consists of open sets relative to $W$. It turns out that these two notions are equivalent. We have the following theorem.

Theorem 2
Let $W \subset \mathbb{R}$. Then $W$ is compact relative to $W$ if and only if it is compact relative to $\mathbb{R}$.

Proof
$\Rightarrow$ Let $W$ be compact relative to $W$. We show that $W$ is compact relative to $\mathbb{R}$. To this end, let $\mathcal{U}$ be an open cover of $W$. Here $\mathcal{U}$ consists of open sets of $\mathbb{R}$. Then the following is an open cover of $W$ consisting of open sets relative to $W$.

$\displaystyle \mathcal{U^*}=\left\{U \cap W: U \in \mathcal{U}\right\}$

Since $W$ is compact relative to $W$, $\mathcal{U^*}$ has a finite subcollection that is also an open cover. The following lists out this finite subcollection:

$\displaystyle U_1 \cap W, \ U_2 \cap W, \ \cdots, \ U_n \cap W$

Then $\left\{U_1,U_2, \cdots, U_n\right\} \subset \mathcal{U}$ and covers $W$.

$\Leftarrow$ Let $W$ be compact relative to $\mathbb{R}$. We show that $W$ is compact relative to itself. To this end, let $\mathcal{V}$ be an open cover of $W$ consisting of open sets relative to $W$. Note that each set in $\mathcal{V}$ is of the form $V \cap W$ where $V$ is an open subset of $\mathbb{R}$. So consider the following:

$\displaystyle \mathcal{V^*}=\left\{V: V \cap W \in \mathcal{V} \text{ and } V \text{ is open subset of } \mathbb{R}\right\}$

Note that $\mathcal{V^*}$ is an open cover of $W$. Since $W$ is compact relative to $\mathbb{R}$, we have a finite subcollection $\mathcal{F}=\left\{V_1, \cdots, V_n\right\} \subset \mathcal{V^*}$ such that $\mathcal{F}$ is a cover of $W$. Consider the following:

$\mathcal{G}=\left\{V_1 \cap W, V_2 \cap W, \cdots, V_n \cap W\right\}$

Note that $\mathcal{G}$ is a cover of $W$ and is a finite subcollection of $\mathcal{V}$. $\blacksquare$

The above theorem shows that compactness does not depend on the space in which the compact set is embedded. A subset of the real line is compact in its own right as well as compact relative to the real line. This same thinking applies in topological spaces in general.

Theorem 3
Let $W \subset \mathbb{R}$. Suppose that $W$ is a compact set. Then if $\mathcal{C}$ is a collection of compact subsets of $W$ such that the intersection of every finite subcollection of $\mathcal{C}$ is nonempty, then $\bigcap \mathcal{C} \ne \phi$.

Proof
Suppose $\mathcal{C}$ is a collection of compact subsets of $W$ with the property indicated in the theorem (called the finite intersection property). We want to show that $\bigcap \mathcal{C} \ne \phi$. Suppose $\bigcap \mathcal{C} = \phi$. Then the following is an open cover of the compact set $W$.

$\displaystyle \mathcal{U}=\left\{W-C: C \in \mathcal{C}\right\}$

Since $W$ is compact, there exists $\left\{C_1,C_2, \cdots, C_n\right\} \subset \mathcal{C}$ such that $\left\{W-C_1, \cdots, W-C_n\right\}$ covers $W$. This means $\bigcap \limits_{i=1}^n C_i=\phi$, contradicting that the collection $\mathcal{C}$ has the finite intersection property. $\blacksquare$

There are other notions of compactness that are equivalent in Euclidean spaces (the real line in particular) and some in metric spaces in general. Let $W \subset \mathbb{R}$. The set $W$ is said to be countably compact if every countable open cover $\left\{U_1,U_2,U_3,\cdots\right\}$ of $W$ has a finite subcollection that is also a cover of $W$, i.e. there exists some positive integer $n$ such that $W \subset U_1 \cup \cdots \cup U_n$. The set $W$ is said to have the Bolzano-Weierstrass property if $W$ is closed relative to $\mathbb{R}$ and every infinite subset of $W$ has a limit point. The set $W$ is said to be sequentially compact if $W$ is closed relative to $\mathbb{R}$ and every sequence of points of $W$ has a subsequence that converges.

Lemma 4
Let $\mathcal{U}$ be a collection of open subsets of $\mathbb{R}$. Then there is a countable subcollection $\mathcal{V} \subset \mathcal{U}$ such that $\bigcup \mathcal{V}=\bigcup \mathcal{U}$.

Proof. Note that there are only countably many open intervals with rational endpoints. Thus we can enumerate these open intervals in a sequence:

$\displaystyle \left\{B_1,B_2,B_3, \cdots\right\}$

Let $W=\bigcup \mathcal{U}$. For each $x \in W$, there is an open set $U_x \in \mathcal{U}$ such that $x \in U_x$. Furthermore, there is an open interval $B_j=(a,b)$ such that the endpoints are rational numbers and $x \in B_j \subset U_x$. Each $B_j$ is associated with at least one $U \in \mathcal{U}$ such that $B_j \subset U$. Thus for each $B_j$, we choose one $U_j \in \mathcal{U}$ such that $B_j \subset U_j$. Then $\mathcal{V}=\left\{U_j: j=1,2,3,\cdots\right\}$ is the desired subcollection. $\blacksquare$

Remark
By definition, any compact subset of the real line is also countably compact (this is also true in any topological spaces). The above lemma indicates that in the real line, the notion of compactness is equivalent to the notion of countably compactness. Outside of Euclidean spaces, there are classes of spaces in which these two notions coincide. But the topological structure along does not guarantee that these two notions of compactness coincide.

There are also other topological notions at work in this lemma, namely the Lindelof property and the property of having a countable base. A topological space is Lindelof if every open cover of the space has a countable subcollection that is also an open cover. The proof for lemma 4 essentially shows that any space whose topology is generated by a countable base is Lindelof. Furthermore, the Lindelof property is hereditary (any subspace is also Lindelof).

Theorem 5
Let $W \subset \mathbb{R}$. The following are equivalent:

1. $W$ is compact.
2. $W$ is countably compact.
3. $W$ is closed and bounded.
4. $W$ has the Bolzano-Weierstrass property.
5. $W$ is sequentially compact.

Proof
$1 \Leftrightarrow 2$ This follows from definition and lemma 3. See the remark right below lemma 3.

$2 \Rightarrow 3$ Suppose that $W$ is countably compact. The fact that it is a closed set of $\mathbb{R}$ follows from the same proof in Theorem 1. We only need to show $W$ is bounded. Suppose not. Then no open interval $(-n,+n)$ contains $W$ where $n$ is positive integer. So $\mathcal{U}=\left\{(-n,+n): n \in\mathbb{N}\right\}$ is an open cover of $W$ such that no finite subset of $\mathcal{U}$ can cover $W$, implying that $W$ is not countably compact. So if $W$ is countably compact, it must be bounded.

$3 \Rightarrow 4$ Suppose that $W$ is closed and bounded. The Bolzano-Weierstrass property follows from condition 4 of the main theorem in the previous post (The Euclidean topology of the real line (3) – Completeness).

$4 \Rightarrow 5$ Suppose that $W$ has the Bolzano-Weierstrass property. We claim that $W$ is a bounded set. Once we show that it is bounded, the property that $W$ is sequentially compact follows from the direction of $4 \rightarrow 5$ in the main theorem in the previous post (The Euclidean topology of the real line (3) – Completeness).

Suppose that $W$ is not bounded. Then for each positive integer $n$, there is some $x_n \in W$ such that $\lvert x_n \lvert>n$. The set $A=\left\{x_n: n \in \mathbb{N}\right\}$ is an infinite set. Note that $A$ is unbounded and every infinite subset of $A$ is also unbounded. By the Bolzano-Weierstrass property, $A$ has a limit point $p$. Then every open interval containing $p$ contains infinitely many points of $A$, contradicting the fact that every infinite subset of $A$ is unbounded.

$5 \Rightarrow 2$ Suppose that $W$ is sequentially compact. Suppose that $W$ is not countably compact. Then there is an open cover $\mathcal{U}=\left\{U_1,U_2,U_3,\cdots\right\}$ such that no finite subset of $\mathcal{U}$ can cover $W$. Then for each $n$, choose $x_n \in W$ such that $x_n \notin U_1 \cup \cdots \cup U_n$.

By the assumption of sequential compactness, the sequence $\left\{x_n\right\}$ has a convergent subsequence $\left\{x_n\right\}_{n \in S}$ where $S$ is an infinite subset of $\mathbb{N}$. Any convergent sequence of real numbers is bounded, contradicting the fact that the orginal sequence $\left\{x_n\right\}$ and any infinite subsequence of it are unbounded. $\blacksquare$

As consequence of Theorem 3 and theorem 5, we have the following corollary.

Corollary 6
Suppose we have closed intervals $\left\{[a_n,b_n]\right\}$ such that $\displaystyle [a_1,b_1] \supset [a_2,b_2] \supset \cdots$.

Then $\bigcap \limits_{n=1}^{\infty} [a_n,b_n] \ne \phi$.

Remark
In Theorem 5, the direction $3 \Rightarrow 1$ is the Heine-Borel theorem. Theorem 5 completely characterizes the compact subsets of the real line, namely the subsets that are closed and bounded (closed relative to the real line). By the theorem, closed intervals $[a,b]$ and closed subsets of $[a,b]$ are the only compact subsets of the real line. The theorem also holds in higher Euclidean spaces $\mathbb{R}^n$.

Of the properties 2 through 5 listed in Theorem 5, it is a great topology exercise to find out which of the conditions are equivalent to compactness when considering spaces other than Euclidean spaces. What if we venture outside of Euclidean spaces? For example, what if we just consider abstract metric spaces? What if we only consider topological spaces? In cases where countably compact does not imply compactness, what kind of additional conditions would make countably compactness equivalent to compactness?

Reference

1. Rudin, W., Principles of Mathematical Analysis, Third Edition, 1976, McGraw-Hill, Inc, New York.
2. Steen, L. A. and Seebach, J. A., Counterexamples in Topology, 1995, Dover Publications, Inc, New York.
3. Willard, S., General Topology, 1970, Addison-Wesley Publishing Company.