Compactness and Heine-Borel
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll learn the open-cover definition of compactness, the Heine-Borel theorem identifying compact subsets of , and sequential compactness. This is the concept that explains why “continuous on a closed bounded interval” is the hypothesis of half the theorems in calculus.
The Concept
Section titled “The Concept”Open covers
Section titled “Open covers”An open cover of is a collection of open sets whose union contains . A subcover is a subcollection that still covers .
is compact if every open cover of has a finite subcover.
Note the quantifier: every cover must admit a finite subcover. Exhibiting one cover with a finite subcover proves nothing, because every set has such covers ( alone covers anything). To prove non-compactness you produce a single cover with no finite subcover.
Why is not compact
Section titled “Why (0,1)(0,1)(0,1) is not compact”Take the cover . Every is in some member, since for large enough by the Archimedean property. So it is a genuine open cover.
But any finite subfamily has a largest , say , and then the union misses everything in - which is non-empty. No finite subcover.
The failure is at the missing endpoint. Points sneak arbitrarily close to 0 and 0 is not there to be covered along with them.
Similarly fails via the cover : finitely many have a largest and miss everything beyond it. Here the failure is unboundedness.
The Heine-Borel theorem
Section titled “The Heine-Borel theorem”is compact is closed and bounded.
Two failure modes, two hypotheses. Bounded rules out escaping to infinity; closed rules out leaking through a missing boundary point. That’s exactly what the two counterexamples above illustrate.
This is why “closed bounded interval” appears everywhere. The extreme value theorem, uniform continuity of continuous functions, Riemann integrability of continuous functions - each really requires compactness, and on that means closed and bounded.
The theorem is specific to . In general metric spaces compactness is strictly stronger than closed and bounded, and closed bounded sets can fail to be compact. Do not carry the equivalence into infinite-dimensional settings.
Sequential compactness
Section titled “Sequential compactness”is sequentially compact if every sequence in has a subsequence converging to a point of .
In (indeed in any metric space) this is equivalent to compactness.
For the proof is short and reuses what we have. If is closed and bounded, take any sequence in . It is bounded, so Bolzano-Weierstrass gives a convergent subsequence, and closedness puts the limit in . ∎
Two lessons pulling their weight at once: Bolzano-Weierstrass supplies the subsequence, closedness keeps the limit inside. That pairing is the practical content of compactness, and it is the version most proofs actually use.
Conversely, if is unbounded you can pick with , and no subsequence converges. If is not closed there is a sequence in converging to a point outside , and every subsequence has that same outside limit.
What compactness buys you
Section titled “What compactness buys you”Compactness converts “local” information into “global” information. That’s the slogan, and it’s worth unpacking.
Suppose each point of has some neighbourhood where a property holds. On a compact set, finitely many of those neighbourhoods cover everything, and a finite collection has a worst case: a smallest , a largest bound. Infinitely many neighbourhoods have no worst case, since an infimum of infinitely many positive numbers can be 0.
Finiteness is what lets you take a minimum. That single observation is the engine behind the extreme value theorem and behind continuous-implies-uniformly-continuous, both coming shortly.
Worked Examples
Section titled “Worked Examples”Example 1: Is compact?
Solution. Bounded: contained in . ✓
Closed: it’s a union of two closed sets, and a finite union of closed sets is closed. ✓
Compact, by Heine-Borel.
Compact sets need not be intervals or connected. Compactness says nothing about being in one piece.
Example 2: Is compact?
Solution. Bounded: contained in . ✓
Closed: no. The sequence lies in the set and converges to 0, which is not a member.
Not compact. An explicit bad cover: put a tiny interval around each , narrow enough to catch only that point. Any finite subfamily covers only finitely many points and misses the rest.
Adding the limit point repairs it: is closed and bounded, hence compact.
Example 3: Is compact?
Solution. Closed ✓ (shown in the previous lesson), but unbounded.
Not compact. The cover has no finite subcover, since each member contains exactly one integer and there are infinitely many.
Or sequentially: has no convergent subsequence.
Example 4: Show is not compact directly.
Solution. Consider , all open, and covering since every satisfies for some by the Archimedean property.
Any finite subfamily has union where , which misses itself.
No finite subcover. ∎
Example 5: Compactness gives a smallest delta.
Suppose for each you are given some . Must ?
Solution. Not directly - an infimum over infinitely many positive numbers can be 0. Take on ; the infimum is 0.
But compactness gives a workaround. Cover by the intervals . Finitely many suffice, say indexed by . Now
because it is a minimum of finitely many positive numbers.
That is exactly the argument used to prove uniform continuity from continuity, five lessons ahead. The whole trick is replacing an infimum with a minimum.
Example 6: A compact set with empty interior.
Solution. The Cantor set is closed and bounded, hence compact, yet contains no interval. It is also uncountable.
So compact does not mean “chunky.” Compactness controls escape to infinity and leakage at the boundary, and says nothing about size or thickness.
Example 7: Continuous image of a compact set.
Show that if is continuous on a compact then is compact.
Solution. Take an open cover of . Continuity makes each preimage open (relative to ), and these cover .
Compactness of gives finitely many, , covering . Then cover . ∎
Continuous functions preserve compactness, and this one fact will immediately give the extreme value theorem: a compact subset of is closed and bounded, so it has a maximum and minimum, and those are attained.
Real-World Applications
Section titled “Real-World Applications”Existence of optima. Every proof that an optimization problem has a solution rather than merely an infimum runs through compactness. In economics this is how equilibrium existence is established, and in engineering it is why a bounded closed design space guarantees a best design exists.
Global error bounds in numerical methods. Error estimates like “the error is at most on this interval” need a single constant valid everywhere. That constant comes from taking a maximum over a compact set, and it does not exist on an open or unbounded domain. This is why numerical analysis works on closed intervals.
Machine learning generalization. Uniform convergence bounds require compactness of the parameter space or a substitute for it, such as a covering-number condition. Covering numbers are literally counting how many small balls it takes to cover the space - the open-cover definition, quantified.
Robotics and motion planning. A robot’s configuration space is compact when joint angles are bounded and the constraint set is closed, which guarantees that if a path exists, an optimal one exists too.
Image compression. Finite covers of a compact space underlie quantization: you approximate a continuum of possible values by finitely many representatives, with a uniform error bound. Compactness is why finitely many suffice.
Numerical integration. Guarantees for quadrature rules need a bound on a derivative across the whole interval, and that bound is a maximum on a compact set. On an unbounded interval the analysis changes completely, which is why improper integrals get separate treatment.
Retrying will remove your ✅ checkmark until you pass again.