16 Compact
16 Compact
Compactness
1 Motivation
While metrizability is the analyst’s favourite topological property, compactness is surely the
topologist’s favourite topological property. Metric spaces have many nice properties, like being
first countable, very separative, and so on, but compact spaces facilitate easy proofs. They allow
you to do all the proofs you wished you could do, but never could.
The definition of compactness, which we will see shortly, is quite innocuous looking. What
compactness does for us is allow us to turn infinite collections of open sets into finite collections
of open sets that do essentially the same thing. Compact spaces can be very large, as we will
see in the next section, but in a strong sense every compact space acts like a finite space. This
behaviour allows us to do a lot of hands-on, constructive proofs in compact spaces. For example,
we can often take maxima and minima where in a non-compact space we would have to take
suprema and infima. We will be able to intersect “all the open sets” in certain situations and
end up with an open set, because finitely many open sets capture all the information in the
whole collection.
We will specifically prove an important result from analysis called the Heine-Borel theorem
that characterizes the compact subsets of Rn . This result is so fundamental to early analysis
courses that it is often given as the definition of compactness in that context.
Definition 2.1. Let (X, T ) be a topological space, and let U ⊆ T be a collection of open subsets
S
of X. We say U is an open cover of X if X = U.
If U is an open cover of X and V ⊆ U is a subcollection of U that is also an open cover of
X, we say V is a subcover of U.
Though the technical term is open cover, we will often refer to “covers” since open covers
are the only sorts of covers we will discuss.
Example 2.2. Just a few examples here. We will save most of the discussion for after we have
given the main definition.
Note that U1 is an uncountable cover, and has many redundant sets from the point of view
of covering R. You can remove any finite number of sets, or even uncountably many sets,
and still end up with a cover since for example V1 = { (−n, n) : n ∈ N } is a subcover of
U1 . Note however that no finite subcollection of U1 can cover R (be sure to prove this to
yourself).
U2 on the other hand is a countable cover and has no subcovers at all. As soon as you
remove the interval (6, 8), for example, the point 7 is no longer covered by any set in U2 .
2. Along similar lines as U1 above, { B (x) : x ∈ Rn , > 0 } is a cover of Rnusual that has
countable subcovers but no finite subcovers.
3. In RSorgenfrey , { [−x, x) : x > 0 } is a cover like U1 above that has many countable subcovers
but no finite subcovers.
4. Let X be a nonempty set with its discrete topology. Then { {x} : x ∈ X } is a cover that
has no subcovers.
Definition 2.3. A topological space (X, T ) is said to be compact if every open cover of X has
a finite subcover.
We will often refer to subsets of topological spaces being compact, and in such a case we are
technically referring to the subset as a topological space with its subspace topology. However in
such situations we will talk about covering the subset with open sets from the larger space, so
as not to have to intersect everything with the subspace at every stage of a proof.
Definition 2.4. A topological space (X, T ) is said to be Lindelöf if every open cover of X has
a countable subcover.
Obviously every compact space is Lindelöf, but the converse is not true.
Exercise 2.5. Show that every compact space is Lindelöf, and find an example of a topological
space that is Lindelöf but not compact.
Some examples:
Example 2.6.
1. Rusual is not compact. We have already shown this, since the covers U1 and U2 defined in
Example 2.2.1 have no finite subcovers. Rusual turns out to be Lindelöf, though the proof
is not obvious.
2. An open interval in Rusual , such as (0, 1), is not compact. You should expect this since
even though we have not mentioned it, you should expect that compactness is a topological
invariant.
3. Similarly, Rnusual is not compact, as we have also already seen. It is Lindelöf, though again
this is not obvious.
4. If X is a set, then (X, Tdiscrete ) is compact if and only if X is finite, and Lindelöf if and
only if X is countable. More generally, any finite topological space is compact and any
countable topological space is Lindelöf.
6. [0, 1] with its usual topology is compact. This is not obvious at all, but we will prove it
shortly.
7. ω + 1 is compact. To see this, first recall that we have already seen that any nontrivial
basic open set containing the top point ω must be of the form (n, ∞) = (n, ω] for some
n ∈ N. Now let U be any open cover of ω + 1, and let Uω ∈ U be any set that contains ω.
By the previous discussion, Uω must contain a basic open set of the form (n, ω] for some
n ∈ N. Then for each k ≤ n, pick some Uk ∈ U that contains k. Then {U1 , U2 , . . . , Un , Uω }
is a finite subcover of U.
8. As a generalization of the previous example, let (X, T ) be a topological space, and let
{xn }n∈N be a sequence in X that converges to a point x ∈ X. Then { xn : n ∈ N } ∪ {x}
is compact (with its subspace topology inherited from T ). Spaces like this are somehow
the “minimal” infinite compact spaces.
9. ω1 with its order topology is not Lindelöf, and therefore not compact. To see this, consider
the cover { (−∞, α] : α ∈ ω1 }. Convince yourself that this is an open cover, and that it
has no countable subcovers.
10. ω1 + 1 with its order topology is compact. Proving this will be an exercise on the Big List.
3 Basic results
As you would expect, both of the properties defined in the previous section are topological
invariants. In fact, we can do even better:
Proposition 3.1. Let (X, T ) be a compact (respectively Lindelöf ) topological space, let (Y, U) be
a topological space, and suppose f : X → Y is a continuous surjection. Then (Y, U) is compact
(respectively Lindelöf ).
Proof. We give the proof for compactness. Suppose U is an open cover of Y . Then since f is
continuous, V = f −1 (U ) : U ∈ U is an open cover of X. Since (X, T ) is compact there is a
finite subcover
{f −1 (U1 ), f −1 (U2 ), . . . , f −1 (Un )}.
A topologist would describe the result of the previous proposition as “continuous images of
compact sets are compact”, and so on.
Proof. We already know this from previous examples. For example (0, 1) is a non-compact subset
of the compact space [0, 1]. Also N is a non-compact subset of the compact space ω + 1.
The previous exercise should lead you to think about defining “hereditary compactness”.
That property does come up occasionally, but it is extremely strong. So strong as to be almost
useless. You will explore this a little bit during a Big List problem.
Again, this should lead you to considering “hereditarily Lindelöf” spaces. This is a very
interesting property indeed. The relationship between this property and hereditary separability
is of particular interest, but it falls outside the scope of this introductory course.
How productive these properties are is an interesting question, which we will explore in
a later section. For now, here are a few very simple results that showcase the usefulness of
compactness.
Proposition 3.4. Let (X, T ) be a compact topological space and C ⊆ X a closed subset. Then
C is compact (with its subspace topology).
Proof. Let U be an open cover of C. Then by definition of the subspace topology, each U ∈ U is
of the form U = C ∩VU for some open set VU ∈ T . But then V := { VU : U ∈ U }∪{ X \C } is an
open cover of X. Since X is compact V has a finite subcover of the form { VU1 , VU2 , . . . , VUn , X \
C }. But then { U1 , U2 , . . . , Un } is a finite subcover of U, as required.
Proposition 3.5. Let (X, T ) be a compact Hausdorff space. Then (X, T ) is regular.
Proof. Let x ∈ X and let C ⊆ X be a closed set not containing x. For each c ∈ C, let Uc and
Vc be disjoint open sets containing c and x, respectively. We can find these because (X, T ) is
The previous proof seems simple, but the notable feature should be what compactness did
for us. This is the same proof we wished we could do to show a Hausdorff space is regular, but
in the general case we could have infinitely many Vc ’s to intersect, which might result in a set
V that is not open. Since C is compact, we were able to reduce what could have been a very
large intersection to a finite one.
In fact, we can do even better than this.
Proposition 3.6. Let (X, T ) be a compact Hausdorff space. Then (X, T ) is normal.
Proof. Exercise. Use the previous result, and do what you wish would work. Then notice that
it actually does work because the space is compact.
If we carefully examine the argument in the proof of Proposition 3.5, we find that we actually
proved the following fact as well.
Proposition 3.7. Let (X, T ) be a Hausdorff topological space, and let K ⊆ X be compact. Then
K is closed.
The following result should strike you as impressive, given how nice homeomorphisms are.
Its proof is a simple combination of the results in this section.
Proposition 3.8. Let (X, T ) be a compact topological space and let (Y, U) be a Hausdorff
topological space. Then any continuous bijection f : X → Y is a homeomorphism.
Proof. The statement of the proposition amounts to saying that any continuous bijection f :
X → Y is open, or equivalently closed.
So let C ⊆ X be a closed set. We want to show that f (C) is closed in Y . By Proposition 3.4
C is compact, and therefore f (C) is compact by Proposition 3.1. By Proposition 3.7, we have
that f (C) is closed, finishing the proof.
4 Compactness and Rn
The main goal of this section is to prove the Heine-Borel theorem, which says that a subset of
Rnusual is compact if and only if it is closed and bounded. This is a condition that any student
who has taken multivariable calculus has likely seen as the definition of compactness in that
context. We now know the true definition of compactness, but it will still be useful to see that
this condition is equivalent. We will approach this result through a few smaller results.
In particular, we start by proving something we promised in Example 2.6.6, which is that
[0, 1] is compact. This result is of course subsumed by the Heine-Borel theorem, but its proof is
beautiful and worthy of independent study and appreciation.
Proof. This proof is sometimes called a “creeping along proof’, for reasons that will soon become
clear.
Let U be an open cover of [0, 1], which we think of as a collection of open subsets of Rusual .
Our task is to find a finite subcover. Define the following set:
Having defined this, our task is now to simply show that 1 ∈ B. Obviously 0 ∈ B (since
[0, 0] = {0} and some element of U must contain 0) and B is bounded above by 1, so B has a
least upper bound. Call this least upper bound b.
Claim. b ∈ B.
Proof. Obviously b ∈ [0, 1], and so some U ∈ U must contain b. Then by definition of the usual
topology there is some > 0 such that (b − , b + ) ⊆ U . There must exist an s ∈ (b − , b] ∩ B,
or else any such s would be an upper bound of B smaller than b. So fix such an s. Then by
definition of B there is some finite subcollection {U1 , U2 , . . . , UN } ⊆ U that covers [0, s]. But
then {U1 , U2 , . . . , UN , U } covers [0, b], and therefore b ∈ B as required.
Here is the “creeping along” part, from which we will deduce that b = 1.
Proof. To see this, fix s ∈ B such that s < 1. Then by definition of B there is some finite
subcollection {U1 , U2 , . . . , UN } ⊆ U that covers [0, s]. Without loss of generality, assume s ∈ UN .
By definition of the usual topology there is some > 0 such that s ∈ B (s) ⊆ UN , and by using
a smaller if necessary, we may assume that this is small enough that B (x) ⊆ (0, 1). Let
t = s + 2 . Then we have that [s, t] ⊆ UN , and therefore
Claim. b = 1.
Proof. We know b ≤ 1, so suppose for the sake of contradiction that it is strictly less than 1.
b ∈ B by the first claim, and therefore by the second claim there is some t > b in B. But this
contradicts the fact that b = sup B.
This is a very simple-looking argument. Read it closely, and try to see all the moving parts.
In particular, try to do the same proof with other bounded sets that are not compact, like (0, 1),
[0, 1] ∩ Q, etc. and see where the techniques used in the proof break down.
If we examine this proof carefully, we can abstract away from the specifics of the usual metric
topology on R and prove a more general result about complete linear orders (“complete” in this
context means something different than it does in the context of metric spaces). We will save
this for the Big List.
Now, as promised, the Heine-Borel theorem. At the moment, we only state and prove it for
Rusual . It turns out that we have done essentially all of the work already.
Theorem 4.2 (Heine-Borel theorem for R). A subset of Rusual is compact if and only if it is
closed and bounded.
Proof. (⇒). Suppose K ⊆ R is compact. Since Rusual is Hausdorff, Proposition 3.7 implies that
K is closed. It only remains to show that it is bounded.
The collection { (−n, n) : n ∈ N } is an open cover of R, and so U = { K ∩ (−n, n) : n ∈ N }
is an open cover of K (in its subspace topology). Since K is compact, there is some finite
S
collection F ⊆ N of natural numbers such that K ⊆ n∈F (−n, n). Of course, these open balls
around the origin are all nested, so if we let N = max(F ), we have that K ⊆ (−N, N ). In other
words, K is bounded.
Corollary 4.3. Let (X, T ) be a compact topological space, and let f : X → Rusual be a continuous
function. Then f is bounded, and in fact it achieves a minimum and a maximum.
Proof. Exercise.
Corollary 4.4 (Extreme Value Theorem from first year calculus). Let f : [a, b] → R be a
continuous function. Then f achieves a minimum and a maximum.
Proof. Exercise.
The full general form of the Heine-Borel theorem, which says that a subset of Rnusual is
compact if and only if it is closed and bounded, requires a result analogous to Theorem 4.1
about [0, 1]n . We discuss that result here, because its proof is also interesting. We could have
given this sort of proof for [0, 1], but the creeping along proof was too good to pass up.
Theorem 4.5. [0, 1]n ⊆ Rnusual is compact.
Proof. Let K0 = [0, 1]n , and suppose for the sake of contradiction that K0 is not compact.
Then there is an open cover U of K0 with no finite subcover. K0 should be thought of as an
n-dimensional cube with side length 1, and so by bisecting each side of this cube we can divide
K0 into 2n n-dimensional cubes of side length 21 .
If each of these 2n cubes can be covered by finitely many sets from U, then all of K0 could
be covered by finitely many sets from U, contradicting our assumption that U has no finite
subcovers. So let K1 be one of these 2n cubes with the property that no finite collection of sets
from U covers K1 .
Continuing in the same way, by bisecting each side of the n-dimensional cube K1 we produce
2 even smaller n-dimensional cubes of side length 14 , one of which must not be able to be
n
K0 ⊃ K1 ⊃ K2 ⊃ · · ·
where Kn is a cube with side length 21n with the property that no finite collection of sets from
U can cover any of the Kn ’s. For each n, pick any point xn ∈ Kn . Then {xn }n∈N is a Cauchy
sequence in Rn and therefore converges to some point x ∈ n∈N Kn .
T
Since U covers K0 , there is some U ∈ U that contains x, and by definition of the usual
topology on Rn there is some > 0 such that x ∈ B (x) ⊆ U . Then we can pick N so large that
KN ⊆ U , contradicting the fact that KN cannot be covered by finitely many sets from U.
5 Productivity
In the next section of notes we are going to prove a tremendously powerful result about the
productivity of compactness. In contrast to the somewhat non-constructive proof to come, we
will give a very hands-on proof here that compactness is finitely productive.
Theorem 5.1. Let (X, T ) and (Y, U) be compact topological spaces. Then X ×Y with its product
topology is compact. In other words, compactness is finitely productive.
We will prove this in two parts. The first is a general fact about finite products involving
a compact space. Then we will use that fact to prove the theorem. The reader is strongly
encouraged to draw some pictures along the way, as the proof makes a lot more sense with a
picture accompanying it.
The following lemma says that if we have an open subset O of a product of two spaces
containing a “slice” of the space, then there is an entire open “tube” containing that slice inside
O.
Lemma 5.2. Let (X, T ) and (Y, U) be topological spaces, and suppose Y is compact. Let a ∈ X,
and let O be an open subset of X × Y that contains {a} × Y , which is the “slice” at a. Then
there is an open set U ⊆ X containing a such that U × Y ⊆ O.
S
Proof. O is a union of basic open sets, so write O = { Uα × Vα : α ∈ I }, where I is some
indexing set. The subspace {a} × Y is homeomorphic to Y , and therefore is compact. That
means some finite subcollection Uα1 ×Vα1 , . . . , Uαn ×Vαn covers {a}×Y . We may assume without
loss of generality that a ∈ Uαk for all k = 1, . . . , n, since any other sets would be disjoint from
the slice.
Let U = Uα1 ∩ · · · ∩ Uαn . Then a ∈ U and Y = Vα1 ∪ · · · ∪ Vα1 , so it is easy to see that
n
[
U ×Y ⊆ (Uαk × Vαk ) ⊆ O
k=1
Before we go on, note that what we did with O is another notable use of compactness turning
an infinite intersection of open sets into a finite intersection. O was an open set that contained
some compact set, and O is necessarily a union of basic open sets, but compactness allowed us
to focus only on finitely many basic open sets, and in turn to take a finite intersection.
Proof of Theorem 5.1. Let U be an open cover of X × Y . For each a ∈ X, the slice {a} × Y is
compact and therefore some finite subcollection { U1 , U2 , . . . , Un } ⊆ U covers it. The union of
these sets:
Oa := U1 ∪ · · · ∪ Un
is an open set containing {a} × Y , and therefore by the previous lemma there is an open set
Ua ⊆ X containing a such that Ua × Y ⊆ Oa . In particular, note that the open tube Uα × Y
can be covered by finitely many sets from U.
corresponding tubes:
[k
X ×Y = (Uai × Y ).
i=1
Since each of these tubes can be covered by finitely many sets from U, we are done.