Wednesday’s post on the algebra of rock-paper-scissors reminded me of another incident in my teaching life when, searching for a suitable catch-phrase to help students remember what compactness is all about, I likened it to the old environmental slogan

“Think globally and act locally.”

The idea is that compactness allows one to transfer many properties that hold locally (on “small” open neighbourhoods of each point in the space) to the global setting of the entire space. A good example of this is the **extreme value theorem** that any continuous real-valued function on a compact space is bounded and attains its bounds. Below the fold, the “is bounded” part of this theorem will be used to illustrate the slogan in action.

A **topological space** is a (non-empty) set *X* equipped with a collection *T* of subsets of *X*, which is called a **topology** on *X* and the members of which are called the **open sets**. The topology *T* is required to satisfy three basic requirements: the empty set ∅ and the whole space *X* are open sets; arbitrary unions of open sets are open; and finite (or even just binary) intersections of open sets are open.

An **open cover** of *X* is just a collection of open subsets of *X* whose union is *X*; a **subcover** of a given cover is, unsurprisingly, a sub-collection of the original cover that is also a cover, i.e. whose union is still *X*. The space is called **compact** if every open cover of *X* has a *finite* subcover.

The standard example of a compact space is any closed and bounded subset of ℝ^{n} with its usual Euclidean topology (the one that comes from the Euclidean distance). Indeed, the Heine–Borel theorem asserts that the closed and bounded sets are precisely the compact sets in ℝ^{n}. A slightly more exotic example of a compact space is ℝ with the confinite topology (the open sets are those *U* ⊆ ℝ such that ℝ∖*U* is a finite set).

Anyway, enough of this: I was supposed to be justifying the “think globally and act locally” slogan. Here it comes: suppose that *P* is a property of sets that can be shown to hold true for some open set about every point *x* of *X*; and suppose furthermore that whenever two (or finitely many) sets have property *P*, then so does their union; if *X* is compact, then it follows that *X* has property *P* as well. See? We basically only need to establish *P* *locally* — and then compactness gives us *P* globally for free.

**Example.** Let *f*: *X* → ℝ be continuous, and let *P*(*A*) be the property “*f* is bounded on *A*”. This *P* clearly has the binary union property: if *f* is bounded on *A* and on *B*, then it’s bounded on *A*∪*B* — an upper bound on the union is the maximum of any upper bounds on the two sets individually, and similarly for the minimum; ditto for any finite union of sets. What about local boundedness? Well, fix *ε* = 1 in the definition of continuity at an arbitrary *x* ∈ *X*, and what do you get? An open set *U*_{x} that contains *x* such that

*f*(*U*_{x}) ⊆ (*f*(*x*) − 1, *f*(*x*) + 1).

So *f* is bounded on each *U*_{x}, but it’s not at all clear that *f* is bounded on *X*. Now suppose that *X* is compact. The collection of open sets { *U*_{x} | *x* ∈ *X* } is an open cover of *X*, and so compactness ensures the existence of a finite subcover, say

{ *U*_{x1}, …, *U*_{xn} }.

*f* is bounded on each of those *n* sets, and it’s bounded on their union, which is *X*. There you have it: every continuous function on a compact space must be bounded.