Compactness Has a Simple Characterization on the Real Line
In “Compact Sets,” we proved that every compact subset of \(\mathbb{R}\) is closed, and earlier in the course we established that every compact subset of \(\mathbb{R}\) is bounded. These are necessary conditions for compactness. On the real line, they are also sufficient: a set is compact exactly when it is both closed and bounded. This characterization is special to the setting of \(\mathbb{R}\); it turns the open-cover definition into a practical test using familiar properties of sets.
The proof of sufficiency uses the compactness of every closed bounded interval \([a,b]\). To see this directly from the open-cover definition, suppose an open cover of \([a,b]\) has no finite subcover. Repeatedly bisect the interval and choose a closed half with no finite subcover; this gives nested closed intervals with lengths tending to zero and a common point \(c\). A member of the cover containing \(c\) contains a neighborhood of \(c\), so a sufficiently small one of these intervals lies in that member, a contradiction. A closed bounded set \(E\) fits inside such an interval, and the result on closed subsets of compact sets then applies. Together, these facts give the Heine–Borel theorem.
Proof. Suppose first that \(K\) is compact. By the results established in “What Is Compactness?” and “Compact Sets,” every compact subset of \(\mathbb{R}\) is bounded and closed.
Conversely, suppose that \(K\) is closed and bounded. If \(K=\varnothing\), it is compact, since every open cover of the empty set has the empty finite subcover. Now suppose \(K\neq\varnothing\). Since \(K\) is bounded, there are real numbers \(a\leq b\) such that \(K\subseteq[a,b]\). The interval \([a,b]\) is compact by the open-cover argument above, and \(K\) is a closed subset of \(\mathbb{R}\) contained in \([a,b]\). The theorem on closed subsets of a compact set therefore implies that \(K\) is compact. This proves both directions. \(\square\)
The proof separates the two directions for a reason. Compactness itself gives closedness and boundedness. For the reverse implication, the key is not merely that \(K\) is closed: it must be placed inside a compact interval, where the closed-subset result can be used. Boundedness supplies that interval.
Applying the Closed-and-Bounded Test
The theorem makes many compactness questions straightforward. To prove that a set is compact, verify that it is closed and bounded. To show that a set is not compact, it is enough to establish that it fails one of those conditions. The following examples illustrate both uses.
Worked Example: A Union of Closed Intervals
Consider \(K=[-4,-2]\cup[1,3]\). Each interval is closed, and a finite union of closed sets is closed, so \(K\) is closed. Also, \(K\subseteq[-4,3]\), so \(K\) is bounded. The Heine–Borel theorem now gives that \(K\) is compact.
This conclusion concerns the union as a whole, including the gap between the intervals. There is no need to find a separate finite subcover for each possible open cover: the closed-and-bounded test already guarantees that every open cover of \(K\) has a finite subcover. In particular, both endpoints \(-4\) and \(3\) belong to \(K\), and the gaps do not affect compactness.
Worked Example: A Bounded Set That Is Not Compact
Let \(E=(0,1]\). This set is bounded, but it is not closed in \(\mathbb{R}\), because \(0\) is a limit point of \(E\) and \(0\notin E\). The Heine–Borel theorem implies that \(E\) is not compact. We can also see the failure directly from an open cover.
For each integer \(n\geq1\), let \(U_n=(1/n,2)\). These sets are open in \(\mathbb{R}\) and cover \(E\). Indeed, if \(x\in(0,1]\), the Archimedean property gives an integer \(n>1/x\), so \(1/n<x\leq1<2\), and hence \(x\in U_n\).
Take any nonempty finite selection of these cover members, and let \(N\) be the largest selected index. Since \(n\leq N\) implies \(1/n\geq1/N\), every selected interval is contained in \((1/N,2)\). The point \(1/(2N)\) belongs to \(E\), but it is not in \((1/N,2)\), since \(1/(2N)<1/N\). Thus this finite selection does not cover \(E\). The empty selection does not cover \(E\) either, as \(E\) is nonempty. No finite subcover exists.
Worked Example: A Closed Set That Is Not Compact
The integers \(\mathbb{Z}\) form a closed, unbounded subset of \(\mathbb{R}\). Closedness follows, for example, because \(\mathbb{Z}\) is uniformly separated: distinct integers have distance at least \(1\). Since \(\mathbb{Z}\) is unbounded, the Heine–Borel theorem says that it is not compact.
For a direct open-cover check, consider \(V_n=(-n,n)\) for integers \(n\geq1\). These open intervals cover \(\mathbb{Z}\): given an integer \(m\), choose \(n>|m|\), so \(-n<m<n\). For any nonempty finite selection, let \(N\) be its largest index. All selected intervals are contained in \((-N,N)\), which misses the integer \(N+1\). Thus no finite selection covers \(\mathbb{Z}\). This example shows why closedness alone is not enough.
Compact Sets Attain Their Extreme Values
The closed-and-bounded characterization also yields an important consequence about the order structure of \(\mathbb{R}\). Every nonempty compact set has a largest and a smallest element. Boundedness gives a supremum and an infimum, while closedness ensures those bounds belong to the set. This conclusion would fail without closedness: for example, the bounded set \((0,1)\) has a supremum and an infimum, but neither belongs to the set.
Proof. Since \(K\) is compact, it is bounded and closed. Because \(K\) is nonempty and bounded above, the least-upper-bound property of \(\mathbb{R}\) gives \(s=\sup K\). We show that \(s\in K\). Let \(r>0\). The number \(s-r\) cannot be an upper bound for \(K\), since \(s\) is the least upper bound. Consequently, there is some \(x\in K\) with \(s-r<x\). Also, \(x\leq s\), because \(s\) is an upper bound. Therefore \(x\in(s-r,s+r)\), so every open ball centered at \(s\) meets \(K\). It follows that \(s\in\overline K\). Since \(K\) is closed, \(\overline K=K\), and hence \(s\in K\). Thus \(s\) is the maximum of \(K\).
Apply the same argument to the nonempty set \(-K=\{-x:x\in K\}\), which is bounded and has a supremum. Equivalently, the greatest lower bound \(t=\inf K\) exists, and every open ball centered at \(t\) meets \(K\): for each \(r>0\), \(t+r\) cannot be a lower bound, so some \(x\in K\) satisfies \(x<t+r\), while \(t\leq x\). Thus \(t\in\overline K=K\), and \(t\) is the minimum of \(K\). \(\square\)
Worked Example: Finding the Extreme Values of a Compact Set
Let \(K=\{x\in\mathbb{R}: |x-2|\leq3\}\). The inequality is equivalent to \(-3\leq x-2\leq3\), and adding \(2\) throughout gives \(-1\leq x\leq5\). Therefore \(K=[-1,5]\), which is closed and bounded, so it is compact by the Heine–Borel theorem.
The extreme-value theorem gives a minimum and maximum in \(K\). In this case they are \(-1\) and \(5\). Both satisfy the defining condition: \(|-1-2|=3\) and \(|5-2|=3\). Every \(x\in K\) satisfies \(-1\leq x\leq5\), so no smaller element or larger element can belong to \(K\). The supremum and infimum are therefore attained at the endpoints.
What the Characterization Does—and Does Not—Say
On \(\mathbb{R}\), closedness and boundedness together are equivalent to compactness, but either condition by itself is insufficient. The examples above demonstrate both failures: \((0,1]\) is bounded but not closed, while \(\mathbb{Z}\) is closed but unbounded. The empty set is a harmless edge case: it is compact, closed, and bounded, so the theorem includes it without requiring any special exception in its statement.
| Property | What it contributes | What it cannot guarantee alone |
|---|---|---|
| Closedness | Contains its limit points, including any supremum or infimum that is a limit point. | It does not prevent a set from extending without bound, as \(\mathbb{Z}\) shows. |
| Boundedness | Places the set inside some finite interval \([a,b]\). | It does not ensure the set contains its limit points, as \((0,1]\) shows. |
| Closedness and boundedness together | By Heine–Borel, they guarantee compactness in \(\mathbb{R}\). | The equivalence is specific to this setting and should not be assumed in every space. |
A useful proof strategy follows directly from the theorem. When the goal is compactness, check closedness and boundedness separately. When the goal is noncompactness, a single failure is sufficient. If using the open-cover definition instead, be precise about the quantifiers: to disprove compactness, one must provide an open cover for which every finite selection fails to cover the set.
Find finite real numbers \(a\leq b\) with \(K\subseteq[a,b]\), or show that no such interval can contain \(K\).
Verify that limit points belong to the set, or identify a missing limit point.
If both properties hold, conclude that \(K\) is compact. If either fails, conclude that \(K\) is not compact.
For a nonempty compact set, the supremum and infimum belong to the set and are its maximum and minimum.
Check Your Understanding
Use the Heine–Borel theorem and the proofs in this tutorial to answer the following questions.
- Which earlier results give the two necessary conditions in the forward direction of the Heine–Borel theorem?
- Why can a closed bounded set be placed inside a compact interval, and which result then implies it is compact?
- For the cover \(U_n=(1/n,2)\) of \((0,1]\), why does every nonempty finite selection miss \(1/(2N)\), where \(N\) is its largest selected index?
- Give the open cover used to show that \(\mathbb{Z}\) is not compact, and identify a point missed by a finite selection.
- In the proof that a compact set has a maximum, why must every open ball centered at \(\sup K\) meet \(K\)?