Compactness
The generalization of "finite" for infinite sets. Every open cover has a finite subcover. In metric spaces: equivalent to sequential compactness and total boundedness. The Heine-Borel theorem.
Introduction
Compactness is arguably the most important finiteness condition in analysis and topology. Roughly, a compact set behaves like a finite set: a continuous function on a compact set attains its extreme values, every sequence has a convergent subsequence, and the set cannot "escape to infinity" or "accumulate at the boundary." The definition via open covers looks abstract at first, but it is exactly the right notion to make these useful properties fall out cleanly. In Euclidean space the story collapses to a slogan — closed and bounded — via the Heine-Borel theorem. In more general metric spaces compactness is equivalent to being complete and totally bounded, and in a general topological space it is equivalent to every open cover admits a finite subcover, nothing more.
This chapter develops all three characterizations in parallel, proves the major consequences (extreme value theorem, uniform continuity, Tychonoff), and shows why compactness is sometimes called "the next best thing to finiteness."
Open Covers and Compactness
We work in a topological space , specializing to metric or Euclidean settings where indicated.
Let . A family of open sets is an open cover of if A subcover of is a subfamily (with ) that still covers . A finite subcover is a subcover with finitely many sets.
Intuition: An open cover is a blanket of open sets laid over -- every point of lies in at least one set of the family. The blanket may use uncountably many pieces. The question compactness asks is whether, no matter how wastefully the blanket is chosen, we can always pull out finitely many of its pieces and still cover every point of . This is a strong "finiteness" requirement on the set itself; it has nothing to do with the size of the index set of the cover.
A subset is compact if every open cover of has a finite subcover. Equivalently, for every family of open sets with , there exist with
Intuition: Compactness is a universal-quantifier statement: every open cover must admit a finite subcover. To show a set is compact, you start with an arbitrary cover and must whittle it down to finitely many sets. To show a set is not compact, you need to exhibit just one open cover with no finite subcover. This asymmetry is typical: universal statements are proved by carefully controlling an arbitrary input; existential refutations need only one counterexample.
The open interval is not compact in . Consider the open cover Every lies in once , so this is an open cover. But any finite subcollection has union with , which misses every point in . So no finite subcover exists.
The set itself is not compact: the cover has no finite subcover, since finitely many of these intervals have bounded union.
Finite Sets Are Compact
If is finite, then is compact.
Intuition: Finite sets are the trivial case: you just pick one open set per point. This is the template for all compactness arguments -- reduce an arbitrary cover to a finite one by making finitely many choices. More interesting compact sets mimic this by forcing a finiteness condition (total boundedness, sequential behavior) that lets us choose finitely many sets even when the set itself is infinite.
Stability Properties of Compactness
Closed Subsets of Compact Sets
Let be compact and let be closed in (equivalently, closed in the subspace topology on ). Then is compact.
Intuition: Closed subsets inherit compactness because being closed is a "sealed edges" condition. When you cover by open sets, you can add the one extra open set to cover all of , use 's compactness to extract finitely many sets, and then discard -- it wasn't covering any point of anyway. The trick is that the complement of a closed set is open and thus available for use in an open cover.
Compact Subsets of Hausdorff Spaces Are Closed
Recall that is Hausdorff (or ) if for every pair of distinct points in , there exist disjoint open sets with and . Metric spaces are Hausdorff (take , with ).
Let be a Hausdorff topological space and let be compact. Then is closed in .
Intuition: The Hausdorff property lets us "separate" from each individually. Compactness then allows us to combine these infinitely many separations into a single finite one. Without Hausdorff, compact sets need not be closed: in the trivial topology every subset is compact but only and are closed. In metric spaces, which are always Hausdorff, compactness does imply closedness, which is a key ingredient of Heine-Borel.
Let be a metric space and compact. Then is closed in and is bounded (contained in some ball ).
Intuition: In a metric space, compactness is at least as strong as being closed and bounded. The Heine-Borel theorem shows that in the converse also holds. In general metric spaces (e.g. infinite-dimensional ones) it does not: the closed unit ball of is closed and bounded but not compact, because sequences can escape via high-frequency oscillations that admit no convergent subsequence.
The Heine-Borel Theorem
The deepest elementary result about compactness in Euclidean space is the Heine-Borel theorem: closed and bounded subsets of are exactly the compact ones. We build up to it with two lemmas.
Every closed bounded interval is compact.
Intuition: The proof is a "least upper bound sweeps right" argument, using the completeness of crucially (step 3 is where sup is used). The set tracks how far to the right we can cover from with a finite subcover; we show we can always push the boundary a bit further, so it must reach . This is the only compactness proof in this chapter that genuinely uses the order structure of ; everything else in reduces to products of intervals.
If and are compact, then is compact.
Intuition: The "tube lemma" packaged inside this proof is the key idea: if is covered by a set , then a whole "tube" around is also covered (for some open neighborhood of ), provided is compact. You prove this by using compactness of to get a finite subcover and intersecting the corresponding s. Once you have tubes, you cover by tubes and reduce to finitely many using compactness of . The argument is a template for Tychonoff's theorem in infinite products.
For a subset , the following are equivalent: (i) is compact; (ii) is closed and bounded; (iii) every sequence in has a subsequence converging to a point of ; (iv) every infinite subset of has a nonconstant convergent sequence with limit in .
Three classical theorems from MATH/MTHE 281, all phrased here via Heine-Borel for subsets of (and remaining true for with the Euclidean topology):
- Heine-Borel: is compact is closed and bounded.
- Sequential compactness (infinite-subset form): is compact every infinite subset of contains a nonconstant convergent sequence with limit in .
- Closed subsets of compact sets: if is compact and is closed, then is compact.
Intuition: Heine-Borel is the bridge between the clean abstract definition of compactness and the concrete recognition test for subsets of . In , compactness is exactly closed and bounded, a condition you can usually check by inspection. This equivalence fails in infinite-dimensional spaces, which is why functional analysis needs finer notions like weak compactness. The route through products of intervals is characteristic: compactness questions in reduce to the one-dimensional case by induction on dimension.
Sequential Compactness
There is a parallel notion of compactness that talks about sequences rather than covers.
A subset of a topological space is sequentially compact if every sequence in has a subsequence converging to some point of .
Intuition: Sequential compactness is the dynamic cousin of compactness: it says sequences cannot escape. Every infinite list of points in has an accumulation point still inside . This is often the most useful form in analysis, since we reason about convergence constantly. In general topological spaces, compactness and sequential compactness are not equivalent -- there are compact spaces whose sequences do not all admit convergent subsequences, and sequentially compact spaces that are not compact. In metric spaces, the two notions coincide (proved below).
Let be a metric space and . Then is compact if and only if is sequentially compact.
We prove this via two passes, postponing the second until after we introduce total boundedness and completeness.
Intuition: The forward direction is a covering argument: if no subsequence converges, each point has a "quarantine ball" missing most of the sequence, and finitely many quarantine balls cannot hold the whole sequence. The reverse direction needs to show open-cover compactness from a hypothesis that controls only sequences, which requires building a dense structure of "small" approximations -- that is where total boundedness enters.
Total Boundedness and Completeness
Let be a metric space. A subset is totally bounded (or precompact) if for every there exist finitely many points (equivalently, in ) such that Such a finite set is called an -net for .
Intuition: Total boundedness is a quantitative refinement of boundedness. "Bounded" says fits in one big ball; "totally bounded" says for every resolution , can be blanketed by finitely many tiny balls of radius . The finite -net is a kind of low-resolution approximation of . In the two notions coincide: a bounded set is totally bounded because a big cube can be partitioned into finitely many small cubes. In infinite dimensions they differ sharply -- the unit ball of is bounded but not totally bounded, because the orthonormal basis vectors are pairwise at distance and can never be covered by finitely many small balls.
In , every bounded set is totally bounded. Suppose with , and let . Partition the cube into finitely many sub-cubes of side length less than ; their centers form an -net for since any point in a sub-cube is within of its center.
If is a metric space and is compact, then is totally bounded.
Let be a metric space and sequentially compact. Then is totally bounded and complete (every Cauchy sequence in converges to a point of ).
Intuition: Sequential compactness prevents two bad behaviors at once. It forbids escape to infinity (forces boundedness, indeed total boundedness), and it forbids leaking through gaps (forces completeness). A space that is sequentially compact is thus "small in all directions and sealed tight."
Complete + Totally Bounded ⇒ Sequentially Compact
Let be a metric space and be complete (as a subspace) and totally bounded. Then is sequentially compact.
Intuition: This is the key existence theorem for convergent subsequences. The finite -nets give us pigeonhole rooms of shrinking radius; a sequence with infinitely many terms is forced to concentrate in one such room at each scale, and the Cantor diagonal argument then picks a single subsequence that concentrates at every scale. Completeness then delivers the limit. The argument is the quantitative content of Bolzano-Weierstrass.
In a metric space, a subset is compact if and only if it is complete and totally bounded.
Intuition: This is the "metric space" version of Heine-Borel. In completeness is automatic (every closed subset is complete) and total boundedness reduces to boundedness, recovering the classical "closed and bounded" slogan. The general statement is indispensable in infinite-dimensional analysis: to show a set in a Banach space is compact, you usually check that it is closed and show it is totally bounded directly (often via an equicontinuity argument, as in Arzelà-Ascoli).
The Lebesgue Number Lemma
To finish the equivalence of compactness and sequential compactness in metric spaces we need a remarkable fact.
Let be a metric space and sequentially compact. For every open cover of there exists (a Lebesgue number of the cover) such that every subset with diameter less than is contained in some single .
Intuition: Any open cover of a sequentially compact set has a "universal scale" : anything smaller than is small enough to be hidden inside a single set of the cover. This fails on non-compact sets -- the cover of has no Lebesgue number, because near the sets of the cover become arbitrarily thin. The lemma is the tool that lets us upgrade "locally the cover is nice" to "uniformly the cover is nice."
Let be a metric space and sequentially compact. Then is compact.
Intuition: Total boundedness gives us finitely many small balls covering , and the Lebesgue number lemma says each small ball fits inside some single . Combining, finitely many 's cover . Sequential compactness gives both ingredients -- the finite-net structure and the uniform scale at which open covers become "well-behaved." Together with the earlier direction, this establishes: in a metric space, the three conditions compact, sequentially compact, and complete + totally bounded are all equivalent.
Continuous Images of Compact Sets
Let be topological spaces, compact, and continuous (restricted to ). Then is compact.
Intuition: Compactness is preserved by continuous maps, the same way connectedness and path-connectedness are. This makes compactness a topological invariant and an extremely robust property -- once you have one compact set, applying any continuous map gives another. This is the origin of many applications: we produce compact sets by applying continuous maps to known compact sets such as closed intervals.
The Extreme Value Theorem
Let be compact and continuous. Then attains a maximum and a minimum: there exist with
Intuition: This is perhaps the single most useful consequence of compactness. Continuous real-valued functions on compact sets attain their extremes -- the infimum and supremum are not just approached, they are achieved at actual points of the domain. The theorem fails without compactness: on has and , neither attained; on has , never attained. Compactness is the right hypothesis: it prevents both the domain from "escaping" (so suprema exist) and the supremum from "slipping out" (so they are attained).
Uniform Continuity on Compact Sets
Let and be metric spaces, compact, and continuous. Then is uniformly continuous on : for every there exists such that for all .
Intuition: Pointwise continuity means the you need may depend on the point -- near a steep part of the graph you need a smaller . Uniform continuity means one works everywhere. On a compact domain, finitely many local s suffice (by compactness), so you can take their minimum and get a uniform . This is another instance of compactness upgrading local control to global control. An alternative proof uses the Lebesgue number lemma on the cover by -preimage balls directly.
Tychonoff's Theorem
Tychonoff's theorem is the crown jewel of point-set topology: it says that compactness is preserved under arbitrary products. We state it in full generality and prove the finite-dimensional case.
Let be any family of compact topological spaces, and let carry the product topology (the coarsest topology making all projections continuous). Then is compact.
Intuition: The full statement allows any indexing set, including uncountable ones. It uses the axiom of choice in an essential way (in fact it is equivalent to the axiom of choice over ZF). The theorem is the foundation for the abstract approach to compactness in functional analysis (e.g. Banach-Alaoglu, which says the closed unit ball of a dual Banach space is weak* compact, is proved via Tychonoff on a product of closed intervals).
If are compact topological spaces, then with the product topology is compact.
Intuition: The finite case is essentially the same tube argument used for Heine-Borel, and it needs no choice. The infinite case genuinely requires deeper machinery (Alexander subbase theorem, ultrafilters, or Zorn's lemma). For this course the finite case is enough -- it is already enough to deduce that is compact and hence to conclude Heine-Borel.
Summary
Compactness in metric spaces admits three equivalent characterizations:
- Topological: every open cover has a finite subcover.
- Sequential: every sequence has a convergent subsequence with limit in the set.
- Metric-structural: the set is complete and totally bounded.
Compactness is preserved by continuous images and by finite products; the Heine-Borel theorem identifies compact subsets of as the closed and bounded ones. The three major consequences -- continuous functions attain extreme values, are automatically uniformly continuous, and preserve compactness -- are workhorses throughout analysis.
The key technical tools are the Lebesgue number lemma (uniform scale of an open cover) and total boundedness (finite -nets). Both reveal that compactness is a finiteness condition in disguise: at every scale , a compact set looks finite. That is why, as we said at the outset, compactness is "the next best thing to finiteness."