The Heine-Borel Theorem
Why can every continuous function on a closed bounded interval attain a maximum? Why does the same fail on an open interval? The Heine–Borel theorem is the precise answer hiding behind this asymmetry. In Euclidean space, compactness is the property that makes extreme-value theorems work. It also underlies uniform continuity and finite-covering arguments. This property turns out to be exactly equivalent to being closed and bounded. This is a remarkable simplification. The definition of compactness via open covers is a purely topological condition. It seems hard to check. But "closed and bounded" is an elementary, checkable, metric condition. The importance of this theorem is that it converts an abstract existential statement into two concrete, verifiable conditions. That statement is: every open cover has a finite subcover. This idea is the engine behind the extreme value theorem. It also drives the existence of minimal-energy configurations in calculus of variations. It underlies compactness arguments in Fourier analysis. And it supports finite-dimensionality arguments throughout analysis and geometry. The bigger picture is that compactness is a topological invariant. It behaves well under continuous maps. It is intrinsically defined without reference to any ambient metric. The Heine–Borel theorem tells us something special about with its Euclidean metric. In this setting, this intrinsic notion collapses to two simple extrinsic conditions. This collapse is a genuinely special feature of finite-dimensional Euclidean space. It fails dramatically in infinite-dimensional normed spaces. This fact will illuminate exactly what hypotheses are doing the work. This article gives the precise statement and a complete, self-contained proof. It works through two concrete non-trivial examples. It shows exactly what breaks when a hypothesis is dropped. It also situates the theorem historically and across the sciences. It also sets up the natural next topic. That topic is the equivalence of compactness with sequential compactness in metric spaces.
- Compact subsets of are precisely those that are closed and bounded.
- "Bounded" alone is not enough; "closed" alone is not enough — both are needed together.
- The proof splits into two independent directions: compact closed & bounded (general metric spaces), and closed & bounded compact (uses finite dimensionality of via nested boxes).
- The theorem fails in infinite-dimensional normed spaces: the closed unit ball is closed and bounded but never compact.
- It underlies the Extreme Value Theorem, uniform continuity results, and finite-covering arguments across analysis.
- Key idea: in , the abstract open-cover definition of compactness reduces to two checkable metric conditions, closedness and boundedness.
Where this lives today
The Extreme Value Theorem — every continuous real-valued function on a nonempty compact set attains a maximum and minimum — is proved directly from Heine–Borel: continuous images of compact sets are compact, and a compact subset of is closed and bounded, hence contains its supremum and infimum. This single fact underlies optimization theory, the existence of best approximations, and the foundations of the calculus of variations. In real analysis, uniform continuity of continuous functions on closed bounded domains (a strengthening of pointwise continuity essential for interchange-of-limits arguments and for defining the Riemann integral rigorously) follows from Heine–Borel via a covering argument. In differential geometry, compactness of closed bounded submanifolds of (spheres, tori embedded in Euclidean space, level sets of proper functions) guarantees existence of extremal geodesics, critical points of curvature functionals, and well-posedness of many variational problems. In numerical analysis and optimization, compactness of feasible regions (closed, bounded constraint sets in ) guarantees that optimization algorithms searching for minima are searching over a space where a minimum actually exists, a prerequisite for convergence proofs of algorithms like gradient descent on constrained domains. In complex analysis, Montel's theorem and normal families arguments rely on compactness properties of closed bounded families of functions, echoing the same closed-and-bounded intuition in function space (though there compactness needs an extra equicontinuity hypothesis, precisely because function spaces are infinite-dimensional, as flagged by the counterexample above). In statistics and machine learning, compactness of parameter spaces (often closed bounded boxes in ) is a standard regularity assumption ensuring maximum likelihood estimators or empirical risk minimizers exist. In cryptography and coding theory, finite-dimensional lattice-based arguments frequently invoke closed-bounded-compact reasoning when analyzing shortest-vector problems over bounded regions.
Ask the tutor: How does the equivalence between compactness and sequential compactness in metric spaces extend or fail to extend the Heine–Borel picture to infinite-dimensional settings?
Let be a metric space and .
Open cover / compactness. A collection of open subsets of is an open cover of if . The set is compact if every open cover of admits a finite subcover: there exist finitely many indices with
Closed. is closed in if its complement is open, equivalently if contains all its limit points, equivalently if every convergent sequence of points of has its limit in .
Bounded. is bounded if there exists such that , where is the Euclidean norm. The Heine–Borel theorem asserts that for (with the Euclidean metric), a subset is compact if and only if is closed and bounded.
Intuition
The word "compact" should evoke the idea that a set cannot "leak" mass off to infinity and cannot have "holes" or "missing endpoints" that a sequence could march toward without ever arriving. Boundedness rules out escape to infinity: an unbounded set like itself can be covered by intervals for , and no finite subcollection of these ever covers all of , because any finite subcollection has a largest and misses everything beyond it. Closedness rules out missing boundary points: the open interval can be covered by the sets for , and again no finite subcollection works, because points arbitrarily close to are always left out by any finite choice of 's. The genuinely deep part of the theorem is the converse direction: that closed and bounded is enough. The intuition is a divide-and-conquer, or "no escape by bisection," argument. Suppose a closed bounded set could be covered by open sets with no finite subcover. Enclose it in a large closed cube. Cut the cube into smaller sub-cubes (in each dimension, cut in half). If every sub-cube's intersection with the set had a finite subcover, then gluing these finitely many finite subcovers together would give a finite subcover of the whole set — a contradiction. So at least one sub-cube must also fail to have a finite subcover. Repeating this indefinitely produces an infinite nested sequence of shrinking cubes, each stubbornly resisting a finite subcover, whose diameters shrink to zero. Nested closed bounded sets in with diameters going to zero must intersect in exactly one point (this is where completeness of enters), and that point lies in some single open set of the original cover — which then covers an entire small cube from some stage onward, giving the finite subcover after all. This contradiction is the heart of the proof.
Let and let , equipped with the Euclidean metric . Then is compact if and only if is closed (as a subset of ) and bounded.
Let be a metric space and compact. Then is closed in and bounded (i.e. has finite diameter, contained in some ball).
Technique: direct construction of covers witnessing non-compactness if failed to be closed or bounded (proof by contrapositive/contradiction using the open-cover definition). Boundedness. Fix any point . The collection of open balls
covers all of , since every point satisfies once (Archimedean property of ). In particular covers . Since is compact, finitely many of these balls cover , say . Let . Since balls of this form are nested ( for ), we get . Hence is bounded. Closedness. We show is open. Let be arbitrary; we must find an open ball around disjoint from . For each , since , let , and consider the two disjoint open balls
These are disjoint: if then and , so by the triangle inequality , a contradiction. As ranges over , the sets form an open cover of . By compactness, finitely many suffice: for some . Let
Then , and since each is disjoint from (the part of covered by ), and every point of lies in some , the ball is disjoint from entirely. (Explicitly: if , then for some , but also , contradicting .) Thus , proving is open, so is closed.
∎Let be a nested sequence of nonempty closed boxes (products of closed intervals) in with as . Then consists of exactly one point.
Technique: reduce to the one-dimensional Nested Interval Property (a consequence of completeness of , via the least upper bound axiom), then take a Cartesian product. Write where each is a closed interval, and nesting of the forces nesting in each coordinate: for each fixed . Existence of a common point. Fix . The sequence is non-decreasing and bounded above (by ), so by the least upper bound axiom for it converges to . Since for all (any lower endpoint is below any upper endpoint of a nested interval), we get for every , and also by definition of supremum. Hence for every , so . Setting , we get for every , so ; the intersection is nonempty. Uniqueness. If , then for every , , so , i.e. .
∎Proof of the Heine–Borel Theorem. We prove both directions.
() Compact implies closed and bounded. with the Euclidean metric is a metric space, so this direction is exactly Lemma: Compact metric subsets are closed and bounded applied with , .
() Closed and bounded implies compact. Technique: proof by contradiction using bisection to build a nested sequence of shrinking boxes, then invoking the Nested Box Lemma to locate a limit point and derive a contradiction. Let be closed and bounded. Since is bounded, choose with , a closed box (cube) of side length . Suppose, for contradiction, that is an open cover of with no finite subcover. Step 1: Bisection produces a nested sequence of "bad" boxes. We construct closed boxes , each a translate/scaling of , such that:
- , and
- has no finite subcover from (call such a box bad).
is bad by assumption. Suppose has been constructed and is bad. Bisect each of the side-intervals of at its midpoint; this partitions into closed sub-boxes, each of half the side length of , whose union is . If every one of these sub-boxes satisfied " has a finite subcover from ," then taking the union of these (at most ) finite subcovers over all sub-boxes would give a single finite subcollection of covering
contradicting that is bad. Hence at least one sub-box is bad; let be such a sub-box. By construction and . This inductively defines the whole sequence. Step 2: Locate the limit point. Each is a nonempty closed box, nested, with . By the Nested Box Lemma (nested closed boxes with shrinking diameter), there is a unique point
Step 3: . Each is bad, in particular for every (the empty set trivially has a finite — namely empty — subcover, so a bad box cannot have empty intersection with ). Choose for each . Since , we have , so . Since is closed and is a sequence in converging to , we conclude (closed sets contain limits of their convergent sequences — this is immediate from the open-complement definition: if then is an open neighborhood of containing no for large , contradicting ). Step 4: Derive the contradiction. Since covers and , there exists some with . Since is open, there is with . Choose large enough that (possible since the right side tends to ). Since and every point satisfies , we get . Hence
so alone is a finite (in fact single-set) subcover of from . This contradicts the fact that was chosen to be bad (no finite subcover exists for ). This contradiction shows our assumption was false: every open cover of has a finite subcover. Hence is compact.
∎Worked examples
Example 1: The set . We verify compactness both via Heine–Borel and directly via covers, to see the theorem in action. Closed: The set of limit points of is exactly (since and all other points are isolated: for , the interval with small enough contains no other point of ). Since , contains all its limit points, so is closed. Bounded: Every element of lies in , so ; bounded. By Heine–Borel, is compact. Let's confirm directly with an open cover, which illustrates why the point being included is essential. Let be any open cover of . Since , some contains , and being open it contains an interval for some . By the Archimedean property, choose with ; then for all (infinitely many points swallowed by a single set). Only the finitely many remaining points need individual open sets from the cover, say with . Then
a finite subcover. This matches the theorem's prediction exactly, and shows concretely how boundedness (all points in ) and closedness (the accumulation point is included) conspire to make the "escaping mass" get captured by one open set.
Example 2: The closed unit disk boundary union a spiraling arc: , i.e. the unit circle traced twice — but let's instead take a genuinely asymmetric non-trivial set. Let
This is a solid ellipse (semi-axes and ) with a small open disk removed near the point — but is outside the ellipse entirely (since the ellipse only reaches ), so in fact the removed disk doesn't intersect the ellipse at all, and is just the closed elliptical region:
(We include this seemingly-elaborate description precisely to illustrate a subtlety: one must actually check whether a "closed set minus an open set" is closed, since removing an open set from a closed set removes a closed set of points and can be checked as intersecting with a closed complement.) In general, for a closed set and open set , is an intersection of two closed sets, hence closed. Here, since the removed disk is disjoint from anyway, exactly. Closed: is the preimage of the closed set under the continuous function , hence closed (preimages of closed sets under continuous maps are closed). Bounded: If then and , so , giving . So . By Heine–Borel, is compact. As a check of the theorem's use: consider (real part of ) restricted to . Since is continuous and is compact, the Extreme Value Theorem (itself proved using Heine–Borel: continuous image of compact is compact, and compact subsets of are closed and bounded hence contain their sup and inf) guarantees attains a maximum and minimum on — a conclusion that requires exactly the closed-and-bounded package Heine–Borel supplies, and would fail if we instead used the open elliptical region , where has no maximum on the set (values increase toward the missing boundary without attaining a top value there).
The direction "compact closed and bounded" holds in every metric space (we proved this with no dimension hypothesis at all). The direction "closed and bounded compact" is where finite-dimensionality of was essential — specifically, we used that is a finite product of copies of , allowing the bisection-into--pieces argument and the Nested Box Lemma. Let's see this hypothesis fail concretely. Let , the space of real sequences with , equipped with the norm (a complete normed vector space, i.e. a Banach space, of infinite dimension). Consider the closed unit ball
is closed: it is the preimage of under the continuous norm function . is bounded: trivially, by definition. is not compact. Let denote the sequence with a in position and elsewhere (); each since . For ,
Consider the open cover built to cover the rest of arbitrarily (concretely one can cover all of by balls of radius centered at a countable dense subset, using separability of ; the key point is only about the 's). Since for , the balls are pairwise disjoint, and each contains exactly one of the points . Any subcover of must therefore include, for every , at least one open set from containing ; since the balls are the only cover-elements meeting the corresponding (having engineered the rest of the cover to avoid the points , or simply noting a finite subcollection can only contain finitely many of the disjoint balls and hence misses infinitely many 's), no finite subcollection of covers . More simply: the sequence lies entirely in but has no convergent subsequence at all, since any two distinct terms are at distance apart — violating sequential compactness, which (as the next natural topic shows) is equivalent to compactness in metric spaces. So is closed and bounded but not compact. This shows precisely why finite-dimensionality could not be removed from the closed-and-bounded direction: the bisection/nested-box argument crucially used that is built from finitely many real coordinate axes, a structural fact with no analogue in .
Scope, edge cases & common traps
| Situation | Compact? | Why |
|---|---|---|
| Yes | closed and bounded | |
| No | bounded but not closed | |
| itself | No | closed but not bounded |
| No | closed but not bounded | |
| Finite set in | Yes | trivially closed and bounded |
| Closed unit ball in | No | closed & bounded, infinite-dimensional |
| closed and bounded in , arbitrary but finite | Yes | Heine–Borel |
| No | bounded but not closed in (misses irrational limit points) |
The mathematician behind it
Origins · 1 minÉmile Borel and how this was discovered
Émile Borel, working in Paris at the turn of the twentieth century, proved the covering property for closed intervals as a lemma in his 1895 thesis on complex function theory, in the course of studying convergence properties of series. Eduard Heine, a German analyst working several decades earlier, had used a closely related covering idea implicitly in his study of uniform continuity of continuous functions on closed intervals, though the modern topological formulation with open covers and finite subcovers came later, refined and generalized by Henri Lebesgue and others into the shape used today. The theorem's name honors both contributions even though neither stated it in the exact modern topological language.
Does Heine–Borel hold for subsets of , viewed as a metric space in its own right?
No. Consider . As a subset of with the usual metric, is closed in (its complement in is open) and bounded, yet is not compact: the sequence of rational truncations of lies in but has no limit within , so no convergent subsequence exists in , violating sequential compactness (equivalent to compactness in metric spaces). The theorem genuinely needs completeness of the ambient space, which has and lacks; this is hidden inside the least-upper-bound step of the nested box lemma.
Is "closed and bounded" the same as "compact" for subsets of any complete metric space?
No, completeness alone is not sufficient; is complete (a Banach space) yet its closed unit ball is not compact, as shown in the counterexample. What actually characterizes compactness in a complete metric space is being closed and totally bounded (for every , coverable by finitely many balls of radius ), a strictly stronger condition than plain boundedness in infinite dimensions. In , boundedness and total boundedness coincide, which is precisely why ordinary Heine–Borel works there but fails to generalize verbatim.
How does Heine–Borel relate to sequential compactness?
In any metric space, compactness (every open cover has a finite subcover) is equivalent to sequential compactness (every sequence has a convergent subsequence with limit in the set); this is a general theorem about metric spaces, not special to . Heine–Borel then gives, specifically in , the further reduction to a simple checkable pair of conditions. Historically and pedagogically, the Bolzano–Weierstrass theorem (every bounded sequence in has a convergent subsequence) is the sequential shadow of Heine–Borel and is often proved by essentially the same bisection technique used here.
Why does the proof need both "bisect into halves" and "shrinking diameters," rather than some other decomposition?
The two ingredients serve different roles. Bisection into finitely many () sub-boxes is what lets us pass from "no finite subcover for a big box" to "no finite subcover for at least one small sub-box," using only finite additivity of unions of finite covers. Shrinking diameters (going to zero) is what forces the nested intersection to be a single point rather than a whole subset, via the Nested Box Lemma. If the boxes did not shrink to a point (e.g. if we only ever cut off a fixed corner without shrinking), the intersection could be an entire smaller box, and we could not conclude a single open set from the cover contains an entire tail .
Does the theorem give an explicit bound on how many sets are needed in the finite subcover?
No, the proof is non-constructive: it proves finiteness exists by contradiction, without producing an explicit finite list or bound on its size, and in general no uniform bound independent of the specific cover can be given. For particular well-structured covers (e.g. covering by intervals of a fixed length ) one can compute an explicit finite subcover size, but the general theorem only guarantees existence.
Is the empty set compact, and is it closed and bounded, consistent with Heine–Borel?
Yes on all counts, vacuously. The empty set is bounded (contained in any ball, vacuously) and closed (its complement, all of , is open). It is compact because any cover of has the empty subcollection as a finite subcover, since the union of no sets is , which contains . This trivial case is consistent with, and often used as the base case in, inductive arguments involving Heine–Borel.
Does Heine–Borel say every closed bounded set in is connected, or does compactness imply connectedness?
No — compactness and connectedness are entirely independent properties. A finite set of two points is compact (closed and bounded) but totally disconnected. Conversely itself is connected but not compact (unbounded). Heine–Borel says nothing about connectedness; it is purely about the closed-and-bounded characterization of compactness.