We’ve arrived at possibly the most confusing notion in topology/analysis. First, we wish to fulfil an earlier promise: to prove that if *C* is a closed and bounded subset of **R** and *f* : **R** → **R** is continuous, then *f*(*C*) is closed and bounded. [ As a corollary, if *f* : **R** → **R** is continuous, then the image *f*([*a*, *b*]) is closed and bounded and thus attains a minimum and maximum. We saw that this has huge implications in optimisation problems. ]

To do that, we define the following.

Definition. A topological space X is said to besequentially compactif every sequence has a convergent subsequence.

Thus, a sequentially compact space is one which is so constrained that an infinite sequence must have infinitely many terms clustering around a point.

For example, **R** is not sequentially compact since *x _{n }*=

*n*clearly has no convergent subsequence. Also,

*X*= (0, 1) is not sequentially compact since

*x*= 1/

_{n }*n*has no subsequence which converges in

*X*. In the former case, problem occurs because the points keep getting further. In the latter case, the sequence really ought to converge to 0, but that limit is not found in the space.

This observation inspires the following result.

Proposition 1. Let (X, d) be a metric space.

- If X is sequentially compact, then it’s bounded.
- If Y is a sequentially compact subspace of X, then Y is closed in X.

**Proof**.

Suppose *X* is not bounded; fix

- We claim that the collection of
*d*(*x*,*y*), for*y*in*X*, is not bounded; indeed, if it were bounded by*B*, any*y*and*z*in*X*would give*d*(*y*,*z*) ≤*d*(*y*,*x*) +*d*(*x*,*z*) ≤ 2*B*, which is a contradiction. - Pick
- The resulting sequence is not even Cauchy since for any
*n*, the set of for various*m*is not bounded, so there exists*m*>*n*for which

For the second statement, by theorem 1 here, we only need to show any sequence in *Y* converging to must satisfy But by sequential compactness of *Y* we must have a subsequence which converges to an element of *Y*. Thus indeed. ♦

**Exercise**

Attempt to prove the second statement of proposition 1 for a topological space *X*. What additional assumption do you need? [ Answer: *X* has to be Hausdorff. ]

The next result tells us how to construct new sequentially compact spaces out of old ones.

Proposition 2. Let X and Y be topological spaces.

- If f:X→Y is continuous and X is sequentially compact, then so is f(X).
- X and Y are sequentially compact if and only if X × Y is.
- If X is sequentially compact and is closed, then Y is sequentially compact.

**Proof**.

- Let (
*y*) be any sequence in_{n}*f*(*X*). Write*y*=_{n}*f*(*x*) for_{n}*x*in_{n}*X*. By sequential compactness of*X*, there’s a converging subsequence Then is also a convergent subsequence of (*y*)._{n} - Suppose
*X*and*Y*are sequentially compact. If (*x*,_{n}*y*) is a sequence in_{n}*X*×*Y*, then there is a subsequence of (*x*) which converges to_{n}*a*in*X*. In the sequence there’s also a subsequence which converges to*b*in*Y*. Since is a subsequence of it also converges to*a*. Thus To prove the converse apply the property above to projection maps*X*×*Y*→*X*and*X*×*Y*→*Y*. - Let (
*y*) be a sequence in_{n}*Y*. By sequential compactness of*X*, it has subsequence which converges to some*a*in*X*. Since*Y*is closed in*X*, theorem 2 here tells us*a*lies in*Y*. ♦

It turns out for **R**, the converse to proposition 1 is true.

Theorem 3. If X is a closed and bounded subspace ofR^{n}, then X is sequentially compact.

**Proof (Sketchy)**

Via scaling, one may assume , in which case proposition 2 tells us we only need to show is sequentially compact and for that, it suffices to show *X* = [0, 2/3] is sequentially compact. For a sequence (*x _{n}*) in

*X*, write out the decimal expansion of each

*x*; if more than one expression exists, pick any one. Each

_{n}*x*may be written in the form (0.

_{n}*abcd*…).

For each *x _{n}*, take the first digit after the decimal point; since it has only 10 possibilities, one of them (0.

*a*…) must occur infinitely many times. Pick an infinite subsequence with first digit =

*a*. Repeat the argument with this new sequence and find another subsequence with the same first two decimal digits (0.

*ab*…). Iteratively, at the

*k*-th step, we get an infinite subsequence with the same first

*k*decimal digits This gives Clearly, there’s a subsequence of (

*x*) converging to

_{n}*r*. Since

*x*≤ 2/3, we also have

_{n}*r*≤ 2/3. ♦

Together with propositions 1 and 2, we get:

Corollary 4. A subset X ofRis sequentially compact iff it’s bounded, and closed inR.If X is a closed and bounded subset of

R, and f :R→Ris continuous, then f(X) is also closed and bounded.

## Compact Spaces

We shall prove that for metric spaces, sequential compactness is equivalent to another topological notion.

Definition. A topological space X is said to becompactif

- whenever {U
_{i}} is a collection of open subsets of X satisfying we can find a finite set of indices i_{1}, i_{2}, … i_{n}, such thatThus, every open cover of X has a finite subcover, where by “open cover of X”, one means a collection of open subsets of X whose union equals X.

Even though “sequential compactness” and “compactness” are both topological concepts which happen to be equivalent for metric spaces, they are not equivalent for general topological spaces. Indeed, the problem lies with our usage of sequences in sequential compactness. If we replace sequences with nets, the result will be true.

Big Theorem. A metric space (X, d) is sequentially compact if and only if it’s compact.

**Step 1 : Prove that compact implies sequentially compact.**

Suppose is a sequence of elements in a compact metric space (*X*, *d*) which has no convergent subsequence. Fix *x* in *X*; there’s an open ball *N*(*x*, ε(*x*)) which contains only finitely many terms of the sequence. [ Otherwise, each *N*(*x*, ε) contains infinitely many terms of the sequence. Thus we can pick *n*_{1} < *n*_{2 }< *n*_{3} < … such that and ]

Now the collection of all these open balls is an open cover for *X* so it has a finite subcover which contradicts the fact that each contains only finitely many terms of the sequence.

**Step 2 : If X is sequentially compact and {U_{i}} is an open cover of X, then there is an ε>0 such that any open ball N(x, ε) is contained in some U_{i}.**

If not, then for ε = 1/*n* (*n* = 1, 2, …), some open ball *N*(*x _{n}*, 1/

*n*) is not contained in any

*U*. By sequential compactness, we can find a convergent subsequence Replacing (

_{i}*x*) with we may assume that (

_{n}*x*) →

_{n}*a*and

*N*(

*x*, 1/

_{n}*n*) is not contained in any

*U*(since 1/

_{i}*n*< 1/

_{k}*n*).

Now this *a* lies in some *U _{i}*, so

*N*(

*a*, 1/

*m*) lies in

*U*for some

_{i}*m*. Since (

*x*) →

_{n}*a*, there’s an index

*N*such that if

*n*>

*N*then

*d*(

*a*,

*x*) < 1/(2

_{n}*m*). If we pick

*n*> max(

*N*, 2

*m*), then

*d*(

*a*,

*x*) < 1/(2

_{n}*m*) gives:

This contradicts our choice of (*x _{n}*).

Definition. This ε>0 is called aLebesgue numberof the open cover {U}._{i}

**Step 3 : If X is sequentially compact, then for any ε>0, we can cover X with finitely many open balls N(x, ε).**

Suppose this is not true for some ε>0. Let’s construct a sequence (*x _{n}*) such that any two distinct terms satisfy

*d*(

*x*,

_{n}*x*) ≥ ε. Suppose we already have {

_{m}*x*

_{1},

*x*

_{2}, …,

*x*}. To find the next term, since the union of

_{n}*N*(

*x*, ε) is not the whole of

_{i}*X*, we can still find

*x*outside this union. Thus,

_{n+1}*d*(

*x*,

_{n+1}*x*) ≥ ε for

_{i}*i*= 1, 2, …,

*n*. Such a sequence has no convergent subsequence.

Definition. A metric space X in which for any ε>0, X can be covered by finitely many N(x, ε), is said to betotally bounded.

**Step 4 : Prove that sequentially compact implies compact.**

If {*U _{i}*} is an open cover of

*X*, by step 2, pick ε>0 such that any open ball

*N*(

*x*, ε) is contained in some

*U*. By step 3, the whole of

_{i}*X*can be covered by finitely many

*N*(

*x*, ε),

_{i}*i*= 1, …,

*n*. Each

*N*(

*x*, ε) is contained in some

_{i}*U*; and so

_{i}*X*can be covered by finitely many

*U*. ♦

_{i}In the process, we’ve also proved the following:

Corollary. If (X, d) is a compact metric space, then X is totally bounded and has a Lebesgue number ε>0.

## Replacing Sequences with Nets

If we replace the condition “every sequence has a convergent subsequence” with “every net has a subnet”, then this is indeed equivalent to the notion of compactness for arbitrary topological spaces.

Before we state the result, though, we should be clear what we mean by “subnets”. In the case of sequences, we don’t want people to cheat by just taking the first 10 terms. Likewise, in the case of subnets, we force them to contain terms which are indexed by arbitrarily large indices.

Definition. If is a net indexed by directed set I, then asubnetis given by for some subset J of I such that:

- for any , there exists an index j ≥ i contained in J (note that this condition implies J is a directed set).

Now we’re ready to state our theorem.

Theorem. A topological space X is compact if and only if every net has a convergent subnet.

**Forward Implication**.

Suppose *X* is compact and is a net indexed by directed set *I*. Assume it has no convergent subnet, so every is not a limit of some subnet. Thus there’s an open subset *U*(*a*) containing *a*, and an index *i*, such that *U*(*a*) does not contain *x _{j}* for all

*j*≥

*i*. [ If not, for each open subset

*U*containing

*a*and index

*i*, there’s a

*j*≥

*i*such that This gives a subnet (

*x*) which converges to

_{j}*a*. Contradiction. ]

Since we can find a finite subset {*a*_{1}, *a*_{2}, …, *a _{n}*} of

*X*such that Also for each

*k*=1, …,

*n*, there’s an index

*i*such that

_{k }*U*(

*a*) does not contain

_{k}*x*for all

_{j }*j*≥

*i*. Since

_{k}*I*is a directed set, we’ll pick

*j*≥ all

*i*‘s, and so does not contain

_{k}*x*which is absurd.

_{j}**Backward Implication**

Suppose every net in *X* has a convergent subnet and is an open cover of *X* indexed by *J*. We construct a net as follows: the index set is *I*, the collection of all finite subsets of *J*, ordered by inclusion. Thus, if then For each define the open subset If {*U _{j}*} has no finite subcover, then each

*U*≠

_{S}*X*so we can pick This gives a net (

*x*).

_{S}By assumption, (*x _{S}*) has a convergent subnet (

*x*) →

_{T}*a*. Now

*a*lies in some

*U*; there exists an index

_{j}*T’*such that for all

*T*≥

*T’*, If we pick

*T*containing

*j*, then so which is a contradiction. ♦

thanks for an excellent article. I have some things not clear to me. The union of open covers of X seems to cover more than X in the figure below the definion of compact spaces. So how is the union equal to X? If X is replaced by X minus its boundary, how is it not compact? The open circles still seem to cover X-Bd.X? Thanks.

Hi. The diagrams are really meant for illustrating the proof – actual topological spaces can be much weirder than subsets of the Euclidean plane.

You can imagine the open subsets as the intersection of the circles and X, instead of the circles themselves.

Pingback: Optimization, Step 4: Compactness – geoff bourque's blog

Excellent article. The diagrammatic explanations are very much understandable. Thank you