In this section, you can substitute for a metric space (or even a topological space in most cases). For ease of notation, I will denote the topology of by the letter .

Recall the most important property about the real numbers. Given a set , I say that the real is an upper bound of if for all , . If has a least upper bound, I call that . The completeness axiom states that any nonempty set of reals with an upper bound has a least upper bound:

Supremum axiom (" is a complete metric space").

Every nonempty upper bounded set of reals has a least upper bound (called the supremum).

Exercise.

Suppose that . Prove that .

Open covers

Definition.

Let .

  1. I say that is bounded if it is contained in some open ball. I say is unbounded otherwise.
  2. An open cover of is a family such that .
  3. Given an open cover of , a subcover is just a set that is also an open cover of .

Examples.

  1. Any open ball is bounded.
  2. Any finite set is bounded.
  3. There are uncountable bounded sets.
  4. There are countably infinite unbounded sets.
  5. The Archimedean principle mentioned in the last section says that is unbounded in .
  6. If is a finite set, then is a finite open cover of .
  7. The finite union of open balls is bounded.
  8. The finite union of bounded sets is bounded.
  9. If is bounded, then is unbounded.
  10. There are unbounded sets with unbounded complements.
  11. is an open cover of any set and is a countable subcover of .
  12. is an open cover of any set and is a countable subcover of .
  13. If and are open covers of and respectively, then is an open cover of . is also an open cover of .

Exercise.

Fill in the details for the examples above you do not find obvious.

Compact sets

Definition.

A set is called compact if every open cover of has a finite subcover.

Examples.

  1. The cover in either 11 or 12 from above are open covers of without any finite subcovers. Therefore, is not compact.
  2. Any finite set is compact.
  3. The finite union of compact sets is compact.

I need to give a much simpler characterization of compactness in before I can provide more interesting examples. The following lemmas have this goal.

Lemma.

Compact sets are always closed and bounded.

Proof:

Let be a compact set.

Closed: I show that is open. Let . For every , since obviously , by the Hausdorff separation property I can find disjoint open sets and such that and . Notice that is an open cover of , so by compactness, there is a finite set such that is also an open cover.

Exercise.

Show that is an open set satisfying

Since is open, there exists with . But by the above containment, this proves that is open, and thus that is closed.

Bounded: Take the open cover from 11 above. is an open cover of , thus if is compact, there must be a finite subcover. In other words, there exists a finite nonempty set of naturals , such that is an open cover of . Let be the largest element of and notice that . Thus, is bounded.

Lemma.

Closed subsets of compact sets are compact.

Proof:

Let be a closed subset of a compact set and let be an open cover of . It follows that is an open cover of . Thus, by compactness, there are such that

Finally, is a finite open cover of , proving is compact.

Now I can provide the first non-trivial example of a compact set.

Theorem.

The closed interval is a compact subset of .

The proof is trickier than you might think. Luckily, once we know this, almost all compact sets of reals are easy to describe.

Proof:

Let be an open cover of and define

Note that and that is bounded, so it must have a supremum .

Exercise.

Prove that .

Then, by the definition of , is compact.

Substituting and for arbitrary reals and above yields that all closed intervals of the form are compact. I only prove the next theorem for even though it also holds in higher dimensions. Interestingly, the proofs are not the same however, and the general case is out of scope of this course.

Heine-Borel theorem.

A set of reals is compact if and only if it is closed and bounded.

Proof:

is one of the above lemmas.

Suppose that is a closed and bounded subset of . Then clearly one can find an open ball containing . In particular, is a closed subset of some closed interval . By the other lemma and the theorem succeeding it, is a closed subset of a compact set and thus compact as well.

The nested set theorem

Arguably the most interesting property about compact sets of reals is the following result. Again, I only do this for even though it holds in much more generality.

Nested set theorem.

Let be a family of nonempty compact sets of reals such that (that is, the sets are nested). Then,

Proof:

By contradiction, assume that the hypotheses hold but that the intersection is empty. Then,

Exercise.

is an open cover of .

By compactness, there is a nonempty finite such that is an open cover of . By the hypothesis that the compact sets are all nested, if I let , then for all .

But being a subcover, , which can only happen if the compact sets are all empty. This is a contradiction.

An application: Google maps inside of Google maps

Go to Google maps on your phone and look up any place that contains the location of the device, say Toronto or North America. So, every point on your screen corresponds to some point on Earth. I claim that there is exactly one point where they match. That is, there is exactly one point on the screen that corresponds to itself in space. This works even if your screen isn’t flat or laid out horizontally; you can print out the map as a huge billboard and crumble it up or stretch it and the statement still holds. Let me prove this to you.

Start with any point in space, for instance, you can pick your own location. Now look at the position of on the map, call this point in space . If you chose your own location, then these will not match unless you are standing right on top of your own location on the map. Next, zoom into the map until you find the location of the map within the map. In the map inside the map, draw out the location of and call this point in space . Again, these could be different points in space. Now repeat these steps to find , the point in space corresponding to the point in the map inside the map, but now in the map inside the map inside the map. If can keep going forever without ever finding a point that maps to itself. But the limit of the sequence must map to itself. Let me formalize this a bit more since the map analogy can only take me so far.

Suppose that is any function such that for all , , for some . For example, is the function that takes the city of Toronto and draws a map of it inside Toronto, and is the scaling factor (so all I ask is for the map to be smaller than the real life location). The goal is to prove that there is a unique point such that . Intuitively, the paragraph above describes the construction as . After applying the map (map, get it?) infinitely many times, applying it once more makes no difference. Hence is fixed. But this is all very informal; I don’t even know if this limit exists.

Proof idea:

Pick any point and define recursively. Consider and observe that the sets have the following properties:

Compact nonempty. This follows from Heine-Borel as the closure of a ball is a bounded closed set that contains its center.

Nested.

Therefore, by the nested set theorem, there is a point such that for all ,

Hard exercise.

Complete the proof. The calculations are easier to write if you assume that .

This was an informal discussion of the Banach fixed-point theorem, and it has concrete uses ranging from reinforcement learning to economics.

Another application: Baire category theory

Proving this was a question in last year's MAT246 final.

Recall that a set is dense if for every and every , . Let be a family of open dense subsets of . Let be an open bounded interval.

  1. Prove that there exist and such that the closed interval is contained in .
  2. Construct sequences and such that for all , and .
  3. Use the nested set theorem to conclude that some real number satisfies for all .
  4. Conclude that is dense.

Baire category theorem.

The intersection of countably many open dense sets of reals is dense in .

Sequential compactness

Recall that a sequence in is just a function .

Definition of subsequence.

Given a sequence and any strictly increasing function , I call a subsequence of .

For an informal example, consider the sequence be . A subsequence could be or . The sequence is not a subsequence of .

A classic fact from Calculus, which you should attempt to prove from the definition of limit if you don’t know how is as follows.

Proposition.

All subsequences of a convergent sequence converge to the same limit.

In particular, a sequence is convergent if and only if all of its subsequences converge.

Remark.

There are divergent sequences with convergent subsequences. An example is , which is a bounded and divergent sequence, but the even-indexed terms converge to .

Another result you are probably familiar with is below.

Proposition.

Convergent sequences are bounded.

For me, a bounded sequence is just one that is bounded as a set. That is, the sequence is bounded if its image forms a bounded subset of reals. I am now ready to prove the main result that connects compactness with sequences.

Bolzano-Weierstrass theorem.

Every bounded sequence has a convergent subsequence.

Theorem ("in , sequential compactness is the same as compactness").

Let . Then is compact if and only if every sequence has a subsequence that converges in .

Proof:

Let be compact and a sequence in . So, is bounded and closed. Since it’s bounded, it has a convergent subsequence; and since it’s closed, the limit must be in .

By Heine-Borel, it is sufficient to show two things:

is closed: Let . By the sequential closure theorem, is the limit of a sequence in , which by hypothesis has a subsequence that converges in . But said subsequence must also converge to , thus necessarily . This shows that .

is bounded: By contrapositive, if it weren’t, then for every , witnesses this fact and so there exists .

Exercise.

Show that every subsequence of diverges.