© 2026 Neckpinch · www.neckpinch.com · All rights reserved.
Course 2Book 2B: Spaces, Functions and ChangeChapter 3
Compactness
Compact sets, the contradiction–compactness method, and the three ways compactness is lost.
Read with Tao, Analysis II, chapter "Metric spaces", section "Compact metric spaces"; and chapter "Continuous functions on metric spaces", sections "Continuity and product spaces" and "Continuity and compactness".
In this chapter · 10 sections
- 3.1A soap film that snaps
- 3.2Compact means almost finite
- 3.3Sequential compactness
- 3.4Complete and totally bounded
- 3.5Open covers
- 3.6Continuous functions on compact spaces
- 3.6.1Minimisers need compactness
- 3.7The contradiction–compactness template, in full
- 3.8Three ways to lose compactness
- 3.8.1Getting compactness back
- 3.9History
- 3.10Exercises
- ↗Free resources
Completeness (2B.2 Completeness and Contraction) produces solutions as limits of sequences that we construct, step by step, to be Cauchy. Compactness produces solutions in a different way. It takes any sequence, possibly one that wanders without settling, and extracts from it a subsequence that converges. We don't need to know in advance where the limit is, or build the sequence carefully. We only need the sequence to live in a compact space.
On the real line, compactness was the Bolzano–Weierstrass theorem (2A.6 Sequences), and it gave the maximum principle and uniform continuity (2A.9 Continuous Functions). This chapter makes it a property of metric spaces, proves that three quite different definitions agree, and puts it to work. It then states in full the proof pattern that the guidebook follows all the way to Perelman, the contradiction–compactness template of 2A.5 Quantifiers and the Shape of a Proof, and works through it on a model case where every step is visible. Finally it lists the three ways in which compactness can fail. Those three failures, in increasingly sophisticated forms, are the ways a Ricci flow can develop a singularity.
By the end of this chapter you will be able to:
- prove that a set is compact or not, using sequences, total boundedness or open covers, whichever is easiest;
- use compactness to show that a maximum exists, that a continuous function is uniformly continuous, that a positive quantity has a positive lower bound, and that a nearest point exists;
- prove that products of compact spaces are compact, and that nested nonempty compact sets have a common point;
- run the contradiction–compactness template: negate, normalise, extract a limit, contradict;
- prove that all norms on are equivalent, and say why the proof fails in infinite dimensions;
- recognise the three ways a sequence can fail to have a convergent subsequence.
A soap film that snaps
Dip two equal wire rings, held parallel and coaxial, into soap solution and draw them apart slowly. A film forms between them, shaped like a cooling tower with a narrow waist. Surface tension pulls the film to the shape of least area among nearby shapes, and for coaxial rings that shape is a catenoid: the surface traced out by rotating the curve about the axis, where is the radius of the waist.
As the rings separate, the waist narrows. Then, suddenly, at a separation of about times the ring radius, the waist collapses to a point and the film snaps into two flat discs, one in each ring. Nothing gradual happens at the moment of snapping: a whole family of shapes simply stops existing.
The mathematics locates the snap exactly. With rings of radius at heights , a catenoid fits the rings when , that is, when
So a film with waist exists exactly when the separation is a value of . The function is continuous on , with and as , so it extends to a continuous function on the compact interval . By the maximum principle it attains a maximum, which a computation puts at , with
Below this separation there are two catenoids (a fat stable one and a thin unstable one, Figure 3.1); at they merge; beyond it there are none, and the film has no choice but to break. The existence of the critical separation is a compactness argument, and the snap is the first neckpinch in this guidebook: a waist shrinking to zero radius in finite time, separating one surface into two. Ricci flow does the same thing to necks in a 3-manifold (11B.5 Singularities), which is where this site's name comes from.
A finer point, which a real experiment shows: for separations between about and , two flat discs have less total area than the fat catenoid, yet the film stays a catenoid until . The catenoid there is a local minimum of area but not the global one. Which local minimum a physical system sits in depends on its history, a theme that returns with the calculus of variations (6A.11 Calculus of Variations and Gradient Flows) and with min–max methods (10A.11 Min–Max and Width).
Compact means almost finite
Before the definitions, it helps to know what compactness is for. A finite set has three properties that analysis would love to have everywhere.
- Every real function on a finite set has a largest value.
- Every sequence in a finite set takes some value infinitely often, so it has a constant, and in particular convergent, subsequence.
- If each point of a finite set has a property with some margin (a positive distance to a wall, a bound valid nearby), then the smallest margin is still positive: a minimum of finitely many positive numbers is positive.
On an infinite set all three can fail. The function on has no largest value; the sequence in has no convergent subsequence; and on each point has a positive margin to , namely itself, while the margins have infimum . Compactness is the property of an infinite set that rescues all three. Each of the three definitions below captures one of them: sequential compactness the second; total boundedness the idea that the set looks finite at every resolution; and open covers the third, "finitely many local margins suffice". The theorems of this chapter say that, for metric spaces, the three rescues come together.
Compactness turns local or pointwise information into uniform information, by reducing an infinite set to finitely many pieces at every scale. Whenever a proof needs one constant that works at every point at once, look for a compact set.
Sequential compactness
A metric space is compact if every sequence in has a subsequence that converges to a point of . A subset is compact if it is compact with the restricted metric, that is, if every sequence in has a subsequence converging to a point of .
Tao takes this sequential definition as primary, as we do. Its first consequences are quick.
Let be a compact subset of a metric space . Then is closed in and bounded (it lies inside some ball). A closed subset of a compact set is compact.
Proof. Closed. If and , a subsequence converges to a point of ; but every subsequence converges to , so . Bounded. If not, fix and pick with . A convergent subsequence would have bounded, which is false. Closed subsets. If is closed and , a subsequence converges to some , and because is closed.
In the converse holds.
A subset of is compact if and only if it is closed and bounded.
Proof. One direction is Proposition 3.2. For the other, let be closed and bounded and let be a sequence in . Its first coordinates form a bounded sequence of reals, which has a convergent subsequence by Bolzano–Weierstrass (2A.6 Sequences). Along that subsequence, the second coordinates are bounded, so a further subsequence makes them converge too. After such steps we have a subsequence along which every coordinate converges, so the points converge in . The limit lies in because is closed.
The proof of Heine–Borel used a pattern worth isolating: extract a subsequence for one coordinate, then a further subsequence for the next. The same pattern shows that compactness survives products.
If and are compact, then is compact with the metric .
Proof. Let be a sequence in . By compactness of , some subsequence converges to some . The sequence lies in the compact space , so it has a further subsequence . Along this further subsequence, still (a subsequence of a convergent sequence), so .
The same metric with instead of the sum, or with the square root of the sum of squares, gives the same convergent sequences, so the choice doesn't matter. By induction, a product of finitely many compact spaces is compact. This is what the rehearsal exercise Exercise 3.29 uses, for .
(a) The closed unit disc, the unit sphere, a closed box in : closed (preimages of closed sets under continuous functions, 2B.1 Metric Spaces) and bounded, hence compact by Heine–Borel.
(b) The graph of a continuous function on . is the image of the compact interval under the continuous map , so it is compact by Theorem 3.14 below. (Alternatively, it is closed and bounded in .)
(c) A convergent sequence with its limit. If in any metric space, then is compact. Given a sequence in : either it takes some value infinitely often, giving a constant subsequence, or it visits infinitely many different 's, and then a subsequence runs through terms with , which converge to .
(d) Not compact: an open interval. is bounded but not closed in ; the sequence has no subsequence converging in .
In general metric spaces "closed and bounded" is not enough.
(a) An infinite set with the discrete metric is closed (in itself) and bounded (every distance is at most ). But a sequence of distinct points has no convergent subsequence, since convergent sequences in the discrete metric are eventually constant.
(b) In with the sup metric, the closed unit ball is closed and bounded. Consider . Its pointwise limit is on and at , which is not continuous. Any uniformly convergent subsequence would converge to a continuous function equal to this pointwise limit (2B.5 Uniform Convergence and Arzelà–Ascoli), which is impossible. So has no convergent subsequence, and the ball is not compact.
Identify matrices with points of , so that Heine–Borel applies.
The orthogonal group is compact. It is closed, because is continuous (its entries are polynomials in the entries of ) and is the preimage of the single point . It is bounded, because the columns of an orthogonal matrix are unit vectors, so every entry has absolute value at most . The rotation group , cut out of by the further closed condition , is compact too.
The general linear group of invertible matrices is not compact. It is not bounded (it contains for every ), and it is not closed either: is invertible for every but converges to the zero matrix, which isn't. Both failures are on show at once.
The special linear group , for , is closed but not compact. It is the preimage of under the continuous function , hence closed, but it contains for every , so it is unbounded. Its elements can stretch without limit in one direction as long as they shrink in another.
Compactness of is used throughout geometry. It is why a continuous function of a rotation always has a best rotation, why averaging over the rotation group makes sense (8A.5 Lie Groups and Group Actions), and why the isometries of a compact Riemannian manifold form a compact group.
Two measurements of the same protein give two lists of atom positions and in , in different orientations. To compare the shapes, structural biologists move both centroids to the origin and find the rotation that brings the first list closest to the second, minimising
over . They report the root-mean-square deviation at the best . That a best rotation exists is the maximum principle: is a continuous function on the compact space , so it attains its minimum. Computing it is linear algebra, solved in closed form through a singular value decomposition by Wolfgang Kabsch in 1976, and standard in protein-structure software since. Over a non-compact set of matrices the question could lose its answer, and over all of , which can squash the molecule, it would no longer be a comparison of shapes anyway.
Both examples have something in common: points that stay a fixed distance apart, with no way of being grouped into finitely many small clusters. That observation is the content of the next characterisation.
Complete and totally bounded
A metric space is totally bounded if for every it can be covered by finitely many balls of radius . The centres of such a cover form an ε-net: every point of is within of one of them.
Totally bounded means "finite at every resolution". However fine a resolution you choose, finitely many probes suffice to see every point to within . In , a bounded set is totally bounded: put it in a cube and use the points of a fine grid. In the discrete example, it fails at , since each ball of radius contains a single point.
To monitor a region with sensors that each detect anything within range , you need an -net of , and the smallest number of sensors is the least size of an -net, called the covering number . For a bounded region of the plane, grows like as : halve the range and you need about four times as many sensors (Figure 3.2). For a region in it grows like . This scaling is used in reverse to define dimension for irregular sets (the box-counting dimension of a coastline or a fractal). Covering numbers also appear in statistical learning theory, where the number of -distinguishable hypotheses controls how much data a learning method needs. Total boundedness is exactly the statement that is finite for every .
A metric space is compact if and only if it is complete and totally bounded.
Proof. Compact ⇒ complete. A Cauchy sequence has a convergent subsequence, so it converges (2B.2 Completeness and Contraction).
Compact ⇒ totally bounded. Suppose that for some no finite collection of -balls covers . Pick ; then pick outside ; then outside ; and so on, which never stops. The points satisfy for , so no subsequence is Cauchy, and none converges.
Complete and totally bounded ⇒ compact. Let be any sequence. Cover by finitely many balls of radius . One of them contains for infinitely many ; keep only those terms, a subsequence . Cover by finitely many balls of radius ; one of them contains infinitely many terms of ; keep those, a subsequence . Continue with radii . Now take the diagonal: the first term of , the second term of , the third of , and so on (each later one chosen further along than the previous). From the -th term on, the diagonal sequence lies in , inside one ball of radius , so any two of those terms are within . The diagonal sequence is Cauchy, and by completeness it converges.
The diagonal argument in the last step, "refine infinitely often, then take the diagonal", is a technique to remember. It reappears in the proof of the Arzelà–Ascoli theorem (2B.5 Uniform Convergence and Arzelà–Ascoli) and in every compactness theorem built on it.
Open covers
There is a third characterisation, which looks nothing like the other two. It is the one that generalises to spaces without a metric (7A.2 Compactness and Compactification), and it is often the most convenient for proofs that patch local information together.
An open cover of a metric space is a collection of open sets whose union is . A finite subcover is a finite subcollection that still covers .
A metric space is compact if and only if every open cover has a finite subcover.
The proof uses a lemma that is worth knowing on its own.
If is compact and is an open cover of , there is a (a Lebesgue number) such that every ball of radius lies inside a single .
Proof. Suppose not. Then for each there is a ball lying in no single . A subsequence converges to some . This lies in some , which contains a ball . For large, and , so , a contradiction.
Proof. Sequentially compact ⇒ finite subcovers. Let be a Lebesgue number for the cover, and take a finite -net , by total boundedness. Each ball lies in some , and the balls cover , so cover .
Finite subcovers ⇒ sequentially compact. Suppose has no convergent subsequence. Then each point has a ball containing for only finitely many (otherwise we could extract a subsequence converging to , taking radii ). These balls cover . A finite subcover would contain for only finitely many in total, but it covers every . Contradiction.
From local to global. The open-cover form is the natural tool when information is local: true near each point, with a neighbourhood that varies from point to point. Here is the simplest instance. Suppose a function on a compact space is locally bounded: every point has an open ball on which . The balls cover , so finitely many of them, , already do, and then everywhere. A maximum of finitely many bounds is a bound. On the function is locally bounded and not bounded, because the balls on which it is bounded have no finite subcover near .
The proof has the same shape every time: get a local statement with a local constant, cover, take a finite subcover, take the worst of finitely many constants. Partitions of unity (8A.2 Partitions of Unity) push the idea further, gluing local constructions rather than local bounds, and on a compact manifold they need only finitely many charts for exactly this reason.
A Lebesgue number, computed. Cover by and . A ball of radius about is the interval . Points near the ends have plenty of room, and the hardest point is the middle of the overlap, , whose ball fits in only if and in only if . So the largest Lebesgue number is , half the width of the overlap. The general lesson is visible here: the Lebesgue number measures how generously the sets of the cover overlap, and compactness says that the generosity cannot shrink to zero.
Which form to use. The sequential form suits proofs by contradiction, where a sequence of worse and worse counterexamples is extracted and passed to a limit; the template below is of this kind. The cover form suits direct proofs that patch local facts together. Total boundedness suits counting and approximation: it is what one checks to prove that a set of functions is compact in 2B.5 Uniform Convergence and Arzelà–Ascoli, and what one estimates to measure the size of a set. Since the three are equivalent for metric spaces, a good analyst moves between them freely, choosing whichever makes the current proof shortest.
One more consequence of compactness is used so often that it deserves a name. It is the abstract form of the nested intervals in the proof of Bolzano–Weierstrass (2A.6 Sequences).
Let be nonempty compact subsets of a metric space. Then is nonempty. If moreover the diameters tend to , the intersection is a single point.
Proof. Choose . All lie in the compact set , so a subsequence converges to some . For each fixed , the terms with lie in , and is closed, so the limit lies in . Hence . If the diameters tend to , two points of the intersection satisfy for every , so .
Compactness is needed: the nested closed sets in have empty intersection (escape to infinity), and so do the nested sets in the space (a missing point).
Continuous functions on compact spaces
Continuity between metric spaces was defined in 2B.1 Metric Spaces, together with its equivalent forms: by and , by sequences ( implies ), and by preimages of open or closed sets. The sequential form is the one that combines most easily with compactness.
Let be compact and continuous. Then:
- is compact.
- If , then attains a maximum and a minimum (the maximum principle).
- is uniformly continuous: for every there is a single with whenever .
Proof. (1) A sequence in has the form . A subsequence converges to some , and by continuity .
(2) is a compact subset of , so it is closed and bounded and contains its supremum and infimum.
(3) Suppose not. Then for some and every there are with but . Pass to a subsequence along which ; then too. By continuity both and tend to , so their distance tends to , contradicting .
Part 3 is Heine–Cantor (2A.9 Continuous Functions) in general, with the same proof. Part 2 is the maximum principle of 2A.9 Continuous Functions, now valid for continuous functions on any compact space: on a closed square, on a sphere, on the space of positions of a mechanical linkage, or on a compact manifold, which is the setting of Hamilton's maximum principle (11A.7 Maximum Principles under Ricci Flow).
Let be a nonempty compact subset of a metric space .
- For every there is a point nearest to : .
- If is closed and disjoint from , then there is with for all and .
Proof. (1) The function is continuous on (it is -Lipschitz), so it attains its minimum by the maximum principle. (2) The function is continuous (2B.1 Metric Spaces) and positive on : it is zero only at points of , and misses . A positive continuous function on a compact set has a positive minimum .
Both parts fail without compactness. In , the closed sets and are disjoint, but the gap between them shrinks to as . And in the space there is no point nearest to . Part 2 is used constantly to keep a definite distance between a compact set and the boundary of a region containing it, for instance to fit a whole ball of fixed radius around every point of a compact set (Exercise 3.28).
Minimisers need compactness
The maximum principle is the simplest existence theorem for minimisers: a continuous function on a compact space attains its minimum. Physics and geometry are full of minimisation problems (least area, least energy, shortest path), and the nineteenth century often took for granted that each has a solution. That assumption was wrong, and the reason it was wrong is compactness.
Among continuously differentiable functions on with and , minimise
Certainly . Try the functions , which rise steeply near and are nearly flat elsewhere. Writing , which tends to as ,
and the last integral is , so , using . So , and the infimum of is . But no admissible has : that would force , so away from , and then everywhere by continuity of , so would be constant, contradicting .
Read the example through the three ways of losing compactness listed at the end of this chapter. The minimising sequence is trying to converge to the step function that jumps from to at , where the weight makes steepness free. That limit is not in the space: a minimising sequence approaching a missing point.
Karl Weierstrass gave an example of this kind in 1870, against the Dirichlet principle, the assumption, used by Riemann among others, that a natural energy always has a minimiser. Repairing the principle took decades. The modern repair, the direct method of the calculus of variations (6A.11 Calculus of Variations and Gradient Flows), is the maximum principle with each hypothesis rebuilt: enlarge the space (to Sobolev spaces, 4A.10 Sobolev Spaces) until minimising sequences have convergent subsequences in a weaker sense (4A.7 Weak Convergence and the Direct Method), and prove that the energy cannot jump up in the limit, so that the limit is no worse than the sequence. Compactness is the heart of it, and it is the reason those later books spend so long on compactness.
A fourth consequence is that a continuous bijection from a compact space has a continuous inverse (Exercise 3.23). This is the reason compact manifolds can be recognised by building a continuous bijection, without checking the inverse separately.
The contradiction–compactness template, in full
In 2A.5 Quantifiers and the Shape of a Proof the contradiction–compactness template was stated in words, and 2A.9 Continuous Functions used it once, to show that a continuous positive function on has a positive lower bound. Here is the full template, and a case with all its steps, including the one that the earlier example did not need: normalisation.
To prove a uniform estimate:
- Suppose it fails. Negate the quantifiers to get, for each , a counterexample that is " times worse".
- Normalise. Rescale each counterexample so that it lies in a fixed compact set, without changing the failure.
- Extract a limit. By compactness, a subsequence converges.
- Pass to the limit. Use continuity to find what the limit satisfies.
- Contradict. Show that no such limit can exist.
A norm on is a function with only for , , and . Each norm gives a metric, , and the three metrics of 2B.1 Metric Spaces come from the norms , and . We saw there that those three are uniformly equivalent. In fact all norms are.
For every norm on there are constants with
Proof. The upper bound is direct. Write in the standard basis. Then . Call the constant . In particular , so is continuous on with its usual metric.
The lower bound, by the template.
- Suppose it fails. Then no works, so for each (taking ) there is with . Necessarily .
- Normalise. Both sides scale the same way under . So replace by : then and . The lie on the unit sphere , which is closed and bounded, hence compact by Heine–Borel.
- Extract a limit. A subsequence converges to some with (the sphere is closed).
- Pass to the limit. is continuous, so .
- Contradict. A norm vanishes only at , but .
Every step was needed. Without normalisation, the could run off to infinity or shrink to , and no compactness theorem would apply. Without compactness of the sphere, there would be no limit. Without continuity, the limit wouldn't inherit the smallness of . The pattern of the proof is drawn in Figure 3.4.
The theorem pays off immediately on any finite-dimensional space, not only on itself, because a choice of basis turns such a space into .
Let be the space of real polynomials of degree at most , a vector space of dimension with the coefficients as coordinates. Two natural norms on it are
Each is a norm. The only subtle axiom is positivity, and if then on and , so . By Theorem 3.17, applied through the coordinates, there is a constant with
A polynomial of bounded degree cannot wiggle quickly without also being large. For general smooth functions nothing of the kind is true: has maximum and derivative as large as . The restriction to degree is a restriction to finitely many dimensions, and that is what the compactness argument used.
The template proves that exists, and says nothing about its size. The best constant was found by A. A. Markov in 1889: , attained by the Chebyshev polynomial defined by , whose derivative at is . Finding it took a separate and much more delicate argument.
Compactness arguments are non-constructive. They prove that a constant exists by showing that its non-existence leads to a contradiction, and they give no way of computing it. A reader who meets "there is a constant depending only on " after a compactness argument should not expect to find its value anywhere, and in geometric analysis often nobody knows it. When an explicit constant matters, a different proof is needed, and finding one is frequently a research problem of its own.
Why it fails in infinite dimensions. On , the sup norm and the area norm are both norms, and they are not equivalent (2B.1 Metric Spaces). Run the template and see where it breaks. Counterexamples are the tents , with and , already normalised. Step 3 needs a convergent subsequence on the unit sphere , and there isn't one: the sup-norm unit sphere of is not compact. That is the whole difference between finite and infinite dimensions. A large part of functional analysis, from weak compactness to the Rellich theorem (4A.7 Weak Convergence and the Direct Method, 4A.11 Sobolev Embeddings and Critical Exponents), is about finding substitutes for step 3 when the unit sphere is not compact.
The failure is not special to . It happens in every infinite-dimensional normed space, and the proof uses nothing beyond this chapter.
The closed unit ball of a normed vector space is compact if and only if the space is finite-dimensional.
Proof. Finite dimensions. A basis identifies the space with , and by Theorem 3.17 the norm is equivalent to the Euclidean one, so the closed unit ball is closed and bounded in , hence compact by Heine–Borel.
Infinite dimensions. The key step is Riesz's lemma: if is a finite-dimensional subspace of a normed space and , there is a unit vector with for every . To prove it, note first that is closed in : by the equivalence of norms it is complete, and complete subsets are closed (2B.2 Completeness and Contraction). Pick . Since is closed, . Choose with and set . For any , the vector lies in , so
Now build a sequence. Start with any unit vector . Given , their span is finite-dimensional and, since the space is infinite-dimensional, not everything. Riesz's lemma gives a unit vector at distance at least from , and in particular from each of . The unit vectors are pairwise at least apart, so no subsequence is Cauchy, and the unit ball is not compact.
Read the proof as the third way of losing compactness, oscillation in infinitely many directions, made systematic: in infinitely many dimensions there is always a new direction, at a definite distance from all the old ones, to escape into. Frigyes Riesz proved the theorem in 1918. It says that the compactness theorems of later books, such as Arzelà–Ascoli (2B.5 Uniform Convergence and Arzelà–Ascoli) and Rellich (4A.11 Sobolev Embeddings and Critical Exponents), can never apply to a whole ball. They apply to sets cut down by extra conditions, typically bounds on derivatives, which forbid the endless supply of new directions.
The equivalence of norms is used constantly and silently: it is why convergence in doesn't depend on the norm, and it is the first step in showing that every finite-dimensional normed space behaves like (4A.1 Banach Spaces and Bounded Operators). The template itself returns in heavier armour. In 4A.11 Sobolev Embeddings and Critical Exponents it proves Poincaré's inequality, with Rellich's theorem doing step 3. In 9B.4 Convergence of Manifolds it gives uniform geometric estimates on families of manifolds, with Cheeger–Gromov compactness doing step 3. In 12B.5 The Canonical Neighbourhood Theorem it proves Perelman's canonical neighbourhood theorem, where step 2 is parabolic rescaling by the curvature, step 3 is Hamilton's compactness theorem for Ricci flows, and step 5 uses the classification of κ-solutions.
Three ways to lose compactness
When a sequence has no convergent subsequence, it is worth asking how it escapes. In practice there are three ways, and it pays to recognise each on sight.
- Escape to infinity. In , the sequence leaves every bounded set. The space is complete, but not bounded.
- Approaching a missing point. In , the sequence is Cauchy and heads for , which isn't there. The space is bounded, but not complete.
- Oscillation in infinitely many directions. In , take bumps of height with disjoint supports, say supported on . Then for : the sequence is bounded and lives in a complete space, but its terms point in infinitely many independent directions, and no two are close. The space is complete and bounded, but not totally bounded.
The three modes match the three conditions of Theorem 3.9 (bounded, complete, totally bounded), and in later books they reappear in disguise:
- In 2A.11 The Riemann Integral and 3A.3 The Lebesgue Integral, area under a sequence of functions escapes by moving to infinity, by concentrating at a point, or by spreading thin. Concentration is a "missing point" phenomenon in a function space.
- In Sobolev spaces (4A.11 Sobolev Embeddings and Critical Exponents), compactness of embeddings fails exactly through translation (escape) and through concentration under rescaling.
- In Riemannian geometry (9B.3 Collapsing and Noncollapsing), a sequence of manifolds with bounded curvature can fail to converge because points run off to infinity, because the curvature blows up somewhere (a singularity), or because the manifolds collapse: they become thinner and thinner in some direction, like a cylinder whose circumference shrinks to zero. Perelman's κ-noncollapsing theorem (12A.4 κ-Noncollapsing) rules out the third mode for Ricci flow, and it is the step that makes his compactness arguments work.
Getting compactness back
Each failure suggests its own repair, and the later books use all three.
- Against escape: follow the sequence. If runs off to infinity, look at the sequence from where it is. Instead of asking whether the points converge, translate each configuration so that a chosen point sits at the origin, and ask whether the translated configurations converge. For a single point this is trivial, but for a sequence of functions or of spaces it is the key idea: a bump that slides off to infinity converges perfectly well once we slide along with it. The limits of Ricci flows in 11B.3 Compactness of Ricci Flows are taken this way, as pointed limits, each flow centred at a chosen point.
- Against a missing point: add it, or stay away from it. One can enlarge the space so that the missing limit exists: the completion of 2B.2 Completeness and Contraction, or the compactifications of 7A.2 Compactness and Compactification, which add points at infinity. Or one can prove an estimate that keeps the sequence a definite distance from the hole, as κ-noncollapsing keeps a Ricci flow away from collapse (12A.4 κ-Noncollapsing).
- Against oscillation: pay with derivatives. Bounds on derivatives forbid the wild new directions that Riesz's theorem supplies. This is the content of Arzelà–Ascoli (2B.5 Uniform Convergence and Arzelà–Ascoli), and of Hamilton's compactness theorem for Ricci flows, which turns bounds on the curvature and all its derivatives into convergent subsequences (11B.3 Compactness of Ricci Flows).
There is also a fourth move, used when a problem has symmetry: divide by the symmetry. A sequence of shapes that are all congruent to one another need not converge, since they can be moved about, but the sequence of their congruence classes is constant. In Riemannian geometry the symmetries are all diffeomorphisms, and convergence of manifolds is always meant up to diffeomorphism (9B.4 Convergence of Manifolds). Concentration and rescaling are the analogue for problems with a scaling symmetry: when a sequence concentrates at a point, blowing up by the right factor turns the concentrating piece into a fixed-size picture that can converge. That is exactly what a blow-up at a singularity of Ricci flow is (11B.5 Singularities).
History
Bernard Bolzano (1817) and Karl Weierstrass (in lectures from the 1860s) used the principle that bounded sequences of reals have convergent subsequences. Eduard Heine's 1872 proof of uniform continuity contained the covering idea implicitly; Émile Borel proved in 1895 that a countable cover of a closed bounded interval by open intervals has a finite subcover, and Henri Lebesgue extended it to arbitrary covers. The word "compact" is Maurice Fréchet's, from his 1906 thesis, the same work that introduced metric spaces (2B.1 Metric Spaces). Weierstrass's 1870 criticism of the Dirichlet principle showed that minimisation problems need compactness, and David Hilbert's rehabilitation of the principle around 1900 began the long programme that became the direct method. Riesz's theorem of 1918 explained why compactness is scarce in infinite dimensions. The contradiction–compactness method has no single inventor. It is the standard way analysts turn qualitative compactness into quantitative estimates, and it runs through geometric analysis from Gromov's work in the 1980s to Perelman's in the 2000s.
A metric space is compact if every sequence has a convergent subsequence; equivalently, if it is complete and totally bounded; equivalently, if every open cover has a finite subcover. In , compact means closed and bounded, but in function spaces it means much more. Continuous functions on compact spaces have compact images, attain their extremes, and are uniformly continuous. The contradiction–compactness template (negate, normalise, extract, pass to the limit, contradict) turns compactness into uniform estimates, as in the equivalence of norms on . Compactness fails by escape, by approach to a missing point, or by oscillation in infinitely many directions. 2B.4 Connectedness turns to a different topological property, connectedness, and 2B.5 Uniform Convergence and Arzelà–Ascoli returns to compactness in the space where the guidebook needs it most, .
Exercises
Which of these are compact? (a) ; (b) ; (c) ; (d) ; (e) the unit sphere of with the great-circle metric; (f) with the sup metric.
Solution
(a) Yes: closed (a preimage of under a continuous function) and bounded (). (b) Yes: every sequence either takes some value infinitely often or has terms with , converging to . (c) No: , which is missing. (d) No: not closed in (a sequence of rationals can converge to ). (e) Yes: the great-circle metric is equivalent to the chordal metric from (Exercise 3.21), and the sphere is closed and bounded in . (f) No: Example 3.6.
Show that for unit vectors, the chord length and the angle satisfy , and deduce . So the great-circle metric is uniformly equivalent to the chordal metric.
Solution
. For , (the sine is concave there), and apply with .
Show that is continuous if and only if is open in for every open .
Solution
This is the equivalence of forms 1 and 3 in the theorem on continuity in 2B.1 Metric Spaces. In brief: if is continuous and , a ball pulls back to a ball ; conversely, if preimages of open sets are open, the preimage of is an open set containing , so it contains a ball , which is the – condition.
Let be compact and a continuous bijection. Show that is continuous. (Show that maps closed sets to closed sets, using Proposition 3.2 and Theorem 3.14.) Then show that is a continuous bijection from onto the circle whose inverse is not continuous. Which hypothesis fails?
Solution
A closed is compact; is compact, hence closed in . So is closed for every closed , which (taking complements) is continuity of by Exercise 3.22. For the circle: points with slightly less than are close to , but their preimages are near , far from . Here is not compact.
Let be compact and continuous with for every . Prove, by the contradiction–compactness template, that there is with for all . Give an example on a non-compact set where no such exists.
Solution
If not, there are with . A subsequence converges to some , and by continuity , a contradiction. (No normalisation is needed here.) Counterexample: and on .
Let be compact, and let be continuous functions that decrease pointwise to : and for every . Prove that uniformly, by the template: suppose for infinitely many , extract , and use monotonicity to show for every . Show that on is a counterexample when is not compact.
Solution
For fixed and , . Let : by continuity of , . This holds for all , contradicting . On , decreases to pointwise but for every .
Show that the unit square (Euclidean metric) has an -net with at most points, and that any -net has at least points. Conclude that the covering number satisfies .
Hint
Upper bound: a square of side lies in the ball of radius around its centre. Lower bound: compare areas.
Solution
Upper bound. Let , and cut into small squares of side . A square of side has half-diagonal , so each small square lies within of its centre: the centres form an -net. Lower bound. If discs of radius cover the square, their total area is at least the area of the square: . Limit. So . Taking logarithms and dividing by , both bounds tend to as .
Show that a union of finitely many compact subsets of a metric space is compact, and that an intersection of any number of compact subsets is compact. Give an example of a countable union of compact sets that is not compact.
Solution
Union of : a sequence in the union has infinitely many terms in some (pigeonhole), and those terms have a subsequence converging in . Intersection: it is a closed subset of any one of the compact sets (compact sets are closed, and an intersection of closed sets is closed), so it is compact by Proposition 3.2. Countable union: , or .
Let be a compact subset of an open set . Show that there is such that the closed ball of radius around every point of lies in . Show by an example that this fails for a closed but non-compact .
Solution
If any works. Otherwise is closed, nonempty and disjoint from , so by Corollary 3.15 there is with for all , . Take : a point within of some is not in , so it is in . Counterexample: and , closed in ; as the points of approach the boundary of , so no single radius works.
Let be compact, and let be a continuous map from to the symmetric matrices such that each is positive definite: for . Prove that there is with
(Normalise to the unit sphere, and apply the template on the compact set .) This is uniform ellipticity. A second-order operator with positive definite at each point of a compact manifold is automatically uniformly elliptic, and uniform ellipticity is the hypothesis behind every estimate for the heat equation in Course 6 and for the DeTurck–Ricci flow in 11A.4 Short-Time Existence and Uniqueness.
Solution
If not, there are and with . Normalise : . The product is compact (a sequence has a subsequence converging in the first coordinate, and a further subsequence converging in the second), so with . The function is continuous, so , contradicting positive definiteness of .
Free resources for this chapter
Chosen for what this chapter covers, and all free to read or watch. Where a lecture covers more than this chapter, the minutes to watch are given, and the link starts there when it can. Links checked Nov 6, 2026.
Read
- Book §7.4 Completeness and compactnessJiří Lebl, Basic Analysis I & II (free textbook)Sequential compactness and total boundedness in metric spaces.
- Notes Notes C: Connected Spaces, Compact SpacesMIT OpenCourseWare 18.901 Introduction to Topology (Fall 2004)Compactness in topological spaces, the setting after metric spaces.
- Reference Compact spaceWikipediaThe equivalent definitions and how they diverge outside metric spaces.
Watch 4 lectures and talks
- Video Lecture 13: Open and Closed Sets; Coverings; CompactnessMIT OpenCourseWare 18.100B Real Analysis (Spring 2025), Tobias Colding · 51:28 to the end (compactness)Open covers and the definition of compactness.
- Video Lecture 14: Sequential Compactness; Bolzano–Weierstrass Theorem in a Metric SpaceMIT OpenCourseWare 18.100B Real Analysis (Spring 2025), Tobias ColdingSequential compactness, and Bolzano–Weierstrass in a metric space.
- Video Lecture 11: Compact SetsFrancis Su, Real Analysis lectures (Harvey Mudd College, 2010)Compactness by open covers, with examples of how it fails.
- Video Lecture 13: Compactness and the Heine-Borel TheoremFrancis Su, Real Analysis lectures (Harvey Mudd College, 2010)Heine–Borel: the compact sets of ℝⁿ are the closed bounded ones.
© 2026 Neckpinch (www.neckpinch.com). All content in the guidebook (text, mathematics, figures and exercises) is protected by copyright. All rights reserved. No part may be copied, republished or redistributed without written permission.