ACE 328/Chapter 7

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 (X,τ)(X, \tau), specializing to metric or Euclidean settings where indicated.

DefinitionOpen Cover and Subcover

Let AXA \subseteq X. A family U={Uα}αI\mathcal{U} = \{U_\alpha\}_{\alpha \in I} of open sets is an open cover of AA if AαIUα.A \subseteq \bigcup_{\alpha \in I} U_\alpha. A subcover of U\mathcal{U} is a subfamily {Uα}αJ\{U_\alpha\}_{\alpha \in J} (with JIJ \subseteq I) that still covers AA. A finite subcover is a subcover with finitely many sets.

Remark.

Intuition: An open cover is a blanket of open sets laid over AA -- every point of AA 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 AA. This is a strong "finiteness" requirement on the set AA itself; it has nothing to do with the size of the index set of the cover.

DefinitionCompact Set

A subset KXK \subseteq X is compact if every open cover of KK has a finite subcover. Equivalently, for every family {Uα}αI\{U_\alpha\}_{\alpha \in I} of open sets with KαUαK \subseteq \bigcup_\alpha U_\alpha, there exist α1,,αnI\alpha_1, \ldots, \alpha_n \in I with KUα1Uαn.K \subseteq U_{\alpha_1} \cup \cdots \cup U_{\alpha_n}.

Remark.

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.

Example

The open interval (0,1)(0,1) is not compact in R\mathbb{R}. Consider the open cover U={(1n,1):nZ>0}.\mathcal{U} = \left\{ \left(\tfrac{1}{n}, 1\right) : n \in \mathbb{Z}_{>0} \right\}. Every x(0,1)x \in (0,1) lies in (1/n,1)(1/n, 1) once n>1/xn > 1/x, so this is an open cover. But any finite subcollection (1/n1,1),,(1/nk,1)(1/n_1, 1), \ldots, (1/n_k, 1) has union (1/N,1)(1/N, 1) with N=maxniN = \max n_i, which misses every point in (0,1/N](0, 1/N]. So no finite subcover exists.

Example

The set R\mathbb{R} itself is not compact: the cover {(n,n):nZ>0}\{(-n, n) : n \in \mathbb{Z}_{>0}\} has no finite subcover, since finitely many of these intervals have bounded union.

Finite Sets Are Compact

TheoremEvery Finite Set Is Compact

If A={x1,,xn}XA = \{x_1, \ldots, x_n\} \subseteq X is finite, then AA is compact.

Remark.

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

TheoremClosed Subsets of Compact Sets Are Compact

Let KXK \subseteq X be compact and let FKF \subseteq K be closed in XX (equivalently, closed in the subspace topology on KK). Then FF is compact.

Remark.

Intuition: Closed subsets inherit compactness because being closed is a "sealed edges" condition. When you cover FF by open sets, you can add the one extra open set FcF^c to cover all of KK, use KK's compactness to extract finitely many sets, and then discard FcF^c -- it wasn't covering any point of FF 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 XX is Hausdorff (or T2T_2) if for every pair of distinct points xyx \neq y in XX, there exist disjoint open sets U,VU, V with xUx \in U and yVy \in V. Metric spaces are Hausdorff (take U=Br/2(x)U = B_{r/2}(x), V=Br/2(y)V = B_{r/2}(y) with r=d(x,y)r = d(x,y)).

TheoremCompact Subsets of Hausdorff Spaces Are Closed

Let XX be a Hausdorff topological space and let KXK \subseteq X be compact. Then KK is closed in XX.

Remark.

Intuition: The Hausdorff property lets us "separate" yy from each xKx \in K 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 τ={,X}\tau = \{\emptyset, X\} every subset is compact but only \emptyset and XX are closed. In metric spaces, which are always Hausdorff, compactness does imply closedness, which is a key ingredient of Heine-Borel.

CorollaryCompact Sets in Metric Spaces Are Closed and Bounded

Let (X,d)(X, d) be a metric space and KXK \subseteq X compact. Then KK is closed in XX and KK is bounded (contained in some ball BR(x0)B_R(x_0)).

Remark.

Intuition: In a metric space, compactness is at least as strong as being closed and bounded. The Heine-Borel theorem shows that in Rn\mathbb{R}^n the converse also holds. In general metric spaces (e.g. infinite-dimensional ones) it does not: the closed unit ball of 2\ell^2 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 Rn\mathbb{R}^n are exactly the compact ones. We build up to it with two lemmas.

LemmaClosed Bounded Intervals Are Compact

Every closed bounded interval [a,b]R[a, b] \subseteq \mathbb{R} is compact.

Remark.

Intuition: The proof is a "least upper bound sweeps right" argument, using the completeness of R\mathbb{R} crucially (step 3 is where sup SS is used). The set SS tracks how far to the right we can cover from aa with a finite subcover; we show we can always push the boundary a bit further, so it must reach bb. This is the only compactness proof in this chapter that genuinely uses the order structure of R\mathbb{R}; everything else in Rn\mathbb{R}^n reduces to products of intervals.

LemmaProducts of Compact Sets Are Compact

If K1RmK_1 \subseteq \mathbb{R}^m and K2RnK_2 \subseteq \mathbb{R}^n are compact, then K1×K2Rm+nK_1 \times K_2 \subseteq \mathbb{R}^{m+n} is compact.

Remark.

Intuition: The "tube lemma" packaged inside this proof is the key idea: if {x}×K2\{x\} \times K_2 is covered by a set UU, then a whole "tube" V×K2V \times K_2 around xx is also covered (for some open neighborhood VV of xx), provided K2K_2 is compact. You prove this by using compactness of K2K_2 to get a finite subcover and intersecting the corresponding VVs. Once you have tubes, you cover K1K_1 by tubes and reduce to finitely many using compactness of K1K_1. The argument is a template for Tychonoff's theorem in infinite products.

TheoremHeine-Borel Theorem

For a subset KRnK \subseteq \mathbb{R}^n, the following are equivalent: (i) KK is compact; (ii) KK is closed and bounded; (iii) every sequence in KK has a subsequence converging to a point of KK; (iv) every infinite subset of KK has a nonconstant convergent sequence with limit in KK.

Remark.

Three classical theorems from MATH/MTHE 281, all phrased here via Heine-Borel for subsets of R\mathbb{R} (and remaining true for Rn\mathbb{R}^n with the Euclidean topology):

  1. Heine-Borel: KRK \subseteq \mathbb{R} is compact     \iff KK is closed and bounded.
  2. Sequential compactness (infinite-subset form): KRK \subseteq \mathbb{R} is compact     \iff every infinite subset of KK contains a nonconstant convergent sequence with limit in KK.
  3. Closed subsets of compact sets: if KRK \subseteq \mathbb{R} is compact and FKF \subseteq K is closed, then FF is compact.
Remark.

Intuition: Heine-Borel is the bridge between the clean abstract definition of compactness and the concrete recognition test for subsets of Rn\mathbb{R}^n. In Rn\mathbb{R}^n, 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 Rn\mathbb{R}^n 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.

DefinitionSequentially Compact Set

A subset KK of a topological space XX is sequentially compact if every sequence (xn)(x_n) in KK has a subsequence (xnk)(x_{n_k}) converging to some point of KK.

Remark.

Intuition: Sequential compactness is the dynamic cousin of compactness: it says sequences cannot escape. Every infinite list of points in KK has an accumulation point still inside KK. 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).

TheoremIn Metric Spaces, Compact ⇔ Sequentially Compact

Let (X,d)(X, d) be a metric space and KXK \subseteq X. Then KK is compact if and only if KK is sequentially compact.

We prove this via two passes, postponing the second until after we introduce total boundedness and completeness.

Remark.

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

DefinitionTotally Bounded Set

Let (X,d)(X, d) be a metric space. A subset AXA \subseteq X is totally bounded (or precompact) if for every ε>0\varepsilon > 0 there exist finitely many points x1,,xnXx_1, \ldots, x_n \in X (equivalently, in AA) such that Ai=1nBε(xi).A \subseteq \bigcup_{i=1}^n B_\varepsilon(x_i). Such a finite set {x1,,xn}\{x_1, \ldots, x_n\} is called an ε\varepsilon-net for AA.

Remark.

Intuition: Total boundedness is a quantitative refinement of boundedness. "Bounded" says AA fits in one big ball; "totally bounded" says for every resolution ε\varepsilon, AA can be blanketed by finitely many tiny balls of radius ε\varepsilon. The finite ε\varepsilon-net is a kind of low-resolution approximation of AA. In Rn\mathbb{R}^n 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 2\ell^2 is bounded but not totally bounded, because the orthonormal basis vectors are pairwise at distance 2\sqrt 2 and can never be covered by finitely many small balls.

Example

In Rn\mathbb{R}^n, every bounded set is totally bounded. Suppose ABR(0)A \subseteq B_R(0) with R>0R > 0, and let ε>0\varepsilon > 0. Partition the cube [R,R]n[-R, R]^n into finitely many sub-cubes of side length less than ε/n\varepsilon / \sqrt n; their centers form an ε\varepsilon-net for AA since any point in a sub-cube is within ε/2\varepsilon/2 of its center.

TheoremCompact Implies Totally Bounded (in metric spaces)

If (X,d)(X, d) is a metric space and KXK \subseteq X is compact, then KK is totally bounded.

TheoremSequentially Compact Implies Totally Bounded and Complete

Let (X,d)(X, d) be a metric space and KXK \subseteq X sequentially compact. Then KK is totally bounded and complete (every Cauchy sequence in KK converges to a point of KK).

Remark.

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

TheoremComplete + Totally Bounded ⇒ Sequentially Compact

Let (X,d)(X, d) be a metric space and KXK \subseteq X be complete (as a subspace) and totally bounded. Then KK is sequentially compact.

Remark.

Intuition: This is the key existence theorem for convergent subsequences. The finite (1/k)(1/k)-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.

CorollaryCompact ⇔ Complete + Totally Bounded (metric spaces)

In a metric space, a subset KK is compact if and only if it is complete and totally bounded.

Remark.

Intuition: This is the "metric space" version of Heine-Borel. In Rn\mathbb{R}^n 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.

LemmaLebesgue Number Lemma

Let (X,d)(X, d) be a metric space and KXK \subseteq X sequentially compact. For every open cover U={Uα}αI\mathcal{U} = \{U_\alpha\}_{\alpha \in I} of KK there exists δ>0\delta > 0 (a Lebesgue number of the cover) such that every subset AKA \subseteq K with diameter less than δ\delta is contained in some single UαU_\alpha.

Remark.

Intuition: Any open cover of a sequentially compact set has a "universal scale" δ\delta: anything smaller than δ\delta is small enough to be hidden inside a single set of the cover. This fails on non-compact sets -- the cover {(1/(n+1),1/n):n1}{(1/2,2)}\{(1/(n+1), 1/n) : n \ge 1\} \cup \{(1/2, 2)\} of (0,1](0, 1] has no Lebesgue number, because near 00 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."

TheoremSequentially Compact Implies Compact (metric spaces)

Let (X,d)(X, d) be a metric space and KXK \subseteq X sequentially compact. Then KK is compact.

Remark.

Intuition: Total boundedness gives us finitely many small balls covering KK, and the Lebesgue number lemma says each small ball fits inside some single UαU_\alpha. Combining, finitely many UαU_\alpha's cover KK. 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

TheoremContinuous Image of a Compact Set Is Compact

Let X,YX, Y be topological spaces, KXK \subseteq X compact, and f:XYf : X \to Y continuous (restricted to KK). Then f(K)Yf(K) \subseteq Y is compact.

Remark.

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

TheoremExtreme Value Theorem

Let KXK \subseteq X be compact and f:KRf : K \to \mathbb{R} continuous. Then ff attains a maximum and a minimum: there exist u,vKu, v \in K with f(u)f(x)f(v)for all xK.f(u) \le f(x) \le f(v) \quad \text{for all } x \in K.

Remark.

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: f(x)=xf(x) = x on (0,1)(0, 1) has inf=0\inf = 0 and sup=1\sup = 1, neither attained; f(x)=arctanxf(x) = \arctan x on R\mathbb{R} has sup=π/2\sup = \pi/2, 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

TheoremHeine-Cantor Theorem

Let (X,dX)(X, d_X) and (Y,dY)(Y, d_Y) be metric spaces, KXK \subseteq X compact, and f:KYf : K \to Y continuous. Then ff is uniformly continuous on KK: for every ε>0\varepsilon > 0 there exists δ>0\delta > 0 such that dX(x,x)<δ    dY(f(x),f(x))<εd_X(x, x') < \delta \implies d_Y(f(x), f(x')) < \varepsilon for all x,xKx, x' \in K.

Remark.

Intuition: Pointwise continuity means the δ\delta you need may depend on the point -- near a steep part of the graph you need a smaller δ\delta. Uniform continuity means one δ\delta works everywhere. On a compact domain, finitely many local δ\deltas suffice (by compactness), so you can take their minimum and get a uniform δ\delta. This is another instance of compactness upgrading local control to global control. An alternative proof uses the Lebesgue number lemma on the cover by ε/2\varepsilon/2-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.

TheoremTychonoff's Theorem (full statement)

Let {Xα}αI\{X_\alpha\}_{\alpha \in I} be any family of compact topological spaces, and let X=αIXαX = \prod_{\alpha \in I} X_\alpha carry the product topology (the coarsest topology making all projections πα:XXα\pi_\alpha : X \to X_\alpha continuous). Then XX is compact.

Remark.

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).

TheoremTychonoff for Finite Products

If K1,,KnK_1, \ldots, K_n are compact topological spaces, then K1××KnK_1 \times \cdots \times K_n with the product topology is compact.

Remark.

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 [R,R]n[-R, R]^n 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 Rn\mathbb{R}^n 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 ε\varepsilon-nets). Both reveal that compactness is a finiteness condition in disguise: at every scale ε\varepsilon, a compact set looks finite. That is why, as we said at the outset, compactness is "the next best thing to finiteness."