# How to prove every closed interval in R is compact?

Let $[a,b]\subseteq \mathbb R$. As we know, it is compact. This is a very important result. However, the proof for the result may be not familar to us. Here I want to collect the ways to prove $[a,b]$ is compact.

• $[a,b]$ is closed and bounded, and in $\mathbb{R}$ compactness is equivalent with.... – Cortizol Apr 21 '13 at 12:27
• By Heine-Borel theorem if a subset S of Euclidean space $\mathbb{R}^n$ closed and bounded then it's a compact. – user63181 Apr 21 '13 at 12:28
• An equivalent way of stating that $A$ is compact is that $\cup_{x\in A}\mu(x)=\mu(A)$. Unfortunately, I don't think I can explain $\mu$ in the space of a comment — it's a nonstandard analysis thing — but think of $\mu(x)$ as the set of things that are close to $x$, and think of $\mu(A)$ as the set of things that are close to $A$. For example, $(0,\infty)$ isn't compact because both infinitesimals and infinitely-large numbers are in the RHS of the above equation but not the LHS. Similar things happen with the long line. This can be made rigorous. – Akiva Weinberger Aug 18 '15 at 4:03
• what I dont understand is what is special about closed intervals that the proof fails with open intervals (assuming we don't know Heine-Borel yet). – Charlie Parker Mar 2 '18 at 17:25

If you're looking for a proof that doesn't use Heine-Borel, here are some hints:

• Notice that $[a,b]$ can be rewritten as $[a,\frac{a+b}{2}]\cup[\frac{a+b}{2},b]$.
• Use contradiction, i.e, assume that some open cover of $[a,b]$ has no finite subcover and wlog no finite subcollection covers $[a,\frac{a+b}{2}]$.
• Keep going
• You will need the nested intervals theorem.
• Just to elaborate. 1. $[a,\frac{a+b}{2}]$ or $[\frac{a+b}{2},b]$ is not compact. 2. Since at least one has to be non-compact, choose any one that is not compact. By the nested interval theorem, and since your intervals are closed and nested and also strictly decreasing, you end up with single point that is closed. Any single point is compact. because you can cover it by "an" open ball, finite. Which is contradiction. – user45099 Apr 21 '13 at 13:39
• I don't quite understand why there is a contradiction. You get a nested sequence of closed non-compact non-empty intervals whose diameter converges to $0$. Since $\mathbb R$ is complete, this implies the intersection is just a point. But where is the contradiction and where do you use that these intervals are not compact? – Stefan Hamcke Apr 21 '13 at 15:18
• But where is the arbitrary cover that has a finite subcover? What non-compact interval do you refer to in the last sentence? – Stefan Hamcke Apr 21 '13 at 16:39
• The complete proof is on page 8 math.umaine.edu/~farlow/sec54.pdf – Xena Apr 21 '13 at 18:16
• @CharlieParker: It is because the nested intersection of open sets may not contain a point. For example, consider $\bigcap_{n=1}^{\infty} (0, 1/n)$. – Prism Jan 11 '19 at 17:55

As I remember, a long time ago, when I was a student, at an exam my teacher asked me to prove this. I answered to him, that this result is so simple, that I forgot how to prove it. :-)

But now, being a mature mathematician, when I am asked about the proof, I answer the following. Clearly, a two-point set $\{0,1\}$ is compact. Tychonov theorem implies that Cantor set $\{0,1\}^\omega$ is compact too. At last, a segment is compact as a continuous image of Cantor set. :-)

• Tychonov, Cantor...+1 for the technology. – Julien Apr 21 '13 at 15:52
• Beautiful joke, i.e. proof! – Przemysław Scherwentke Apr 22 '13 at 1:38
• by $\{0,1\}^\omega$ do you mean the arbitrary/uncountable product of this two point set? And Tychonov relies on choice correct? Proving the last part that compactness is topological isn't difficult, though. Then is there always a continuous function from closed unit interval into this space? – Hossien Sahebjame Jan 20 at 5:17
• @HossienSahebjame $\omega=\{0,1,\dots\}$ is the first infinite ordinal, which is equal to the cardinality of the set of natural numbers. Yes, the Tychonoff product theorem implies the axiom of choice, see Kelley’s paper with the same name. I don’t understood what means “the compactness is topological”. – Alex Ravsky Jan 20 at 8:01
• It is well known that there exists a continuous function from $\{0,1\}^\omega$ onto the unit segment, see, for instance, Asaf Caragila’s answer. The closed interval $[a,b]$ admits a continuous map $f$ to any non-empty space $X$, if suffices to pick an arbitrary point $x\in X$ and put $f(c)=x$ for each $c\in [a,b]$. On the other hand, there is no continuous map from $[0,1]$ onto $\{0,1\}^\omega$, because the first space is connected, whereas the second is not. – Alex Ravsky Jan 20 at 8:01

Of course, Heine-Borel tells us that $[a,b]$ is compact. But how do you prove Heine-Borel? By showing $[a,b]$ is compact first, in general. Here is a proof which only requires the lub property of $\mathbb{R}$.

Edit: this is the same argument as Clayton's, which appeared way before while I was typing. As I give more details, I think I'll leave this answer here. Note in particular that you need to verify that the sup is in the set $S$. Showing it is equal to $b$ is not enough.

Note: there is nothing special about $\mathbb{R}$ here, actually. It just turns out that the order topology coincides with the usual topology. And for a totally ordered set equipped with the order topology, the lub property is equivalent to the fact that every closed interval $[a,b]$ is compact. The proof below establishes the direction you are interested in. For the converse, see this thread.

Proof: the case $a=b$ is trivial, so assume $a<b$ and take an open cover $$[a,b]\subseteq \bigcup_{i\in I}U_i.$$ In particular, the latter covers $[a,x]$ for every $x\in [a,b]$. So consider the set $S$ of all $x\in[a,b]$ such that $[a,x]$ is covered by finitely many $U_i$'s. There exists $i_0$ such that $a\in U_{i_0}$, so $a$ belongs to $S$. Hence $S$ is a non-empty subset of $\mathbb{R}$ bounded above by $b$. By the least upper bound property, we can define $$x_0:=\sup S\in [a,b].$$ We will first prove by contradiction that $x_0=b$. So assume $x_0<b$. Note that $x_0>a$, as there exist $i_0$ and $\epsilon>0$ such that $[a,a+\epsilon]\subseteq U_{i_0}$, whence $x_0\geq a+\epsilon$.

Take $i_0$ such that $x_0\in U_{i_0}$. Then take $\epsilon>0$ such that $a\leq x_0-\epsilon<x_0<x_0+\epsilon\leq b$ and $$[x_0-\epsilon,x_0+\epsilon]\subseteq U_{i_0}.$$ As $x_0-\epsilon$ is not an upper bound of $S$, there exists $x_0-\epsilon\leq x_1\leq x_0$ such that $x_1$ belongs to $S$. So $[a,x_1]$ can be covered by finitely many $U_i$'s, say $$[a,x_1]\subseteq \bigcup_{j=1}^nU_{i_j}\quad\Rightarrow\quad [a,x_0+\epsilon]\subseteq \bigcup_{j=1}^nU_{i_j} \cup U_{i_0}=\bigcup_{j=0}^nU_{i_j}.$$ It follows that $x_0+\epsilon$ belongs to $S$, contradicting the fact that $x_0$ is an upper bound of $S$.

Therefore $\sup S=b$ and the same argument shows that $b$ belongs to $S$. Indeed, we have $[b-\epsilon,b]\subseteq U_{i_0}$ for some $i_0$ and some $\epsilon>0$. And then some $x_1$ in $[b-\epsilon,b]$ belongs to $S$, yielding a finite subcover for $[a,b]=[a,x_1]\cup[b-\epsilon,b]$.

So $b$ belongs to $S$, i.e. there exists a finite subcover $$[a,b]\subseteq \bigcup_{j=1}^nU_{i_j}.$$ QED.

• +1 This is the way to go. I like the proof using Cantor's intersection theorem, too, or Bolzano Weiertrass' theorem (which is basically equivalent to compactness is metric spaces). Maybe I'll add it, but Bedi has provided as sketch already. – Pedro Tamaroff Apr 21 '13 at 16:50
• @PeterTamaroff Go ahead! Sequential compactness is at least as important and useful in applications. – Julien Apr 21 '13 at 17:53
• It seems that the symbol $U_{i_0}$ has been used twice in the proof to denote two different sets: one that contains $a$ and another that contains $x_0$. It might help clarify if different symbols can be used for the two sets (which might be different). – tvk Sep 30 '14 at 19:46
• Surely it is enough to show that there exists some compact set $[c,d]$ in $\mathbb{R}$, since there exists a homeomorphism from $[a,b]$ to $[c,d]$. But then, in this proof you show that $[a,x_{0}]$ is covered by finitely many of the $U_{i}$, and thus $[a,x_{0}]$ is compact. So we're done? – Omar Haque Mar 8 '17 at 14:30
• @HossienSahebjame upper bound property – Samuele Monitto Feb 26 at 18:00

In short: Every closed interval is the continuous image of the Cantor space, and therefore compact.

1. The Cantor space $2^\omega$ is compact as a result of Tychonoff theorem (also by Koenig's theorem).

2. The Cantor space can be mapped continuously on the interval $[0,1]$ using the function: $$(x_n)\mapsto\sum_{n\in\omega}\frac{x_n}{2^{n+1}}$$ It is not difficult to show that this function is continuous and surjective (although not injective!).

3. Therefore $[0,1]$ is the continuous image of a compact space and so it is compact.

4. Let $[a,b]$ be an interval, if $a=b$ then this is a finite set and so it is compact; otherwise map $[0,1]$ to $[a,b]$ bijectively using a translation and rescaling $x\mapsto a+(b-a)x$.

5. Every closed interval is the continuous image of $[0,1]$ which is compact; therefore $[a,b]$ is compact.

Perhaps the shortest, slickest proof I know is by Real Induction. See Theorem 17 in the aforelinked note, and observe that the proof is six lines. More importantly, after you spend an hour or two familiarizing yourself with the formalism of Real Induction, the proof essentially writes itself.

Here is a different proof. Alexander's lemma. (It states: given a subbase for the topology, $X$ is compact iff every cover by elements of the subbase has a finite subcover.) Now use the sets $$[0,a), 0<a<1,\qquad (b,1], 0<b<1$$ as your subbase $\mathcal B$.

Suppose $\mathcal A \subseteq \mathcal B$ is a cover of $[0,1]$. Since $1 \in [0,1]$, there is at least one set of the form $(b,1]$ in $\mathcal A$. Let $b_0 = \inf\{b : (b,1] \in \mathcal A\}$. Then, since $b_0 \in [0,1]$ there is $[0,a_1) \in \mathcal A$ such that $b_0 \in [0,a_1)$. And since $a_1>b_0$, by definition of inf there is $(b_1,1] \in \mathcal A$ with $b_1<a_1$. So in fact $[0,1] = [0,a_1) \cup (b_1,1]$. Not only is there a finite subcover, there is a subcover of just two sets.

• It seems that a space having such a subbase is called supercompact. – Alex Ravsky Apr 21 '13 at 14:29
• Interesting, +1. – Julien Apr 21 '13 at 15:12
• This is a very interesting proof of Heine-Borel. However I feel someone should point out that the result it uses, AST, is at least as deep and difficult a result as the theorem it is being applied to prove. – Pete L. Clark Apr 21 '13 at 15:29
• Another reservation about this proof. Alexander's lemma requires the Axiom of Choice, but compactness of $[0,1]$ doesn't. – GEdgar Apr 21 '13 at 19:15
• @PeteL.Clark what is AST? – Shobhit Sep 8 '17 at 22:16

If you're wanting a proof, take the following.

Let $\mathscr{U}$ be an open cover of $[a,b]$ and let $$b'=\sup\{x\in[a,b]:[a,x]\text{ is covered by finitely many elements of the open cover}\}.$$ Clearly $b'\leq b$. Now, if $b'<b$, then it's contained in some open set from the cover implying $b'$ is contained in some open interval. This shows that there is an element greater than $b'$, say $b''\in[a,b]$ that is covered by finitely many open sets from the cover, a contradiction to $b'$ being the supremum. Hence $b'=b$ and $[a,b]$ is compact.

• You still have to show the sup is in the set. – Pedro Tamaroff Apr 21 '13 at 13:10
• Sorry, I was typing this when you posted. As I added the fact that the sup is in the set, I'll leave it, I guess. – Julien Apr 21 '13 at 13:28

For the sake of completeness, here I present a classical and wordy proof. If you find it too verbose, you may just read the boxed statements and the numbered formula $(1)$.

We first prove the following lemma.

Lemma 1. Suppose that $(F_n)$ is a sequence of non-empty closed bounded subsets of $\Bbb{R}$ satisfying $F_1 \supset F_2 \supset F_3 \supset \cdots$. Then $\bigcap_{n} F_n$ is non-empty.

Proof. Note that $x_n = \max F_n \in F_n$ is a monotone decreasing sequence bounded below. So it converges to some $\alpha \in \Bbb{R}$. Since each $F_n$ is closed, it follows that $\alpha \in F_n$ for all $n$, which completes the proof. (Of course, Bolzano-Weierstrass theorem also gives a direct proof.)

Now fix any open cover $\mathcal{U}$ of $I = [a, b]$ and define the function $d : \Bbb{R} \to [0, \infty)$ as follows:

$$d(x) := \sup \{ \delta > 0 : \text{there exists a finite subfamily of } \mathcal{U} \text{ which covers } B(x, \delta) \}. \tag{1}$$

Intuitively, $d(x)$ measures how difficult to cover a neighborhood of $x$ with elements of $\mathcal{U}$. In one extreme, $d(x) = 0$ implies that no neighborhood of $x$ can be covered by finitely many members of $\mathcal{U}$. It is also clear that $d(x) > 0$ on $I$, since a sufficiently small neighborhood of each $x \in I$ can be covered by a single element of $\mathcal{U}$.

The importance of the function $d$ can be glimpsed by the following remark:

Remark. If $\alpha := \inf_{I} d(x) > 0$, then it is clear that $I$ is covered by finitely many open balls $B(x_1, \alpha/2), \cdots, B(x_n, \alpha/2)$. Since each $B(x_i, \alpha/2)$ is covered by only finitely many elements of $\mathcal{U}$, we obtain a finite subcover of $\mathcal{U}$.

To make use of this observation, we prove that $d(x)$ is lower semi-continuous:

Lemma 2. for any $a \geq 0$, the inverse image $d^{-1}((a, \infty)) = \{ x \in \Bbb{R} : d(x) > a \}$ is open.

Proof. Assume $d(x) > a$. Then there exists $\delta > 0$ such that $d(x) \geq \delta > a$ and $B(x, \delta)$ is covered by finitely many members of $\mathcal{U}$. Pick $\epsilon \in (0, \delta - a)$. Then for any $x' \in B(x, \epsilon)$ we have $B(x', \delta-\epsilon) \subset B(x, \delta)$ and thus $d(x') \geq \delta-\epsilon > a$. This proves that $B(x, \epsilon)$ is contained in the inverse image $d^{-1}((a, \infty))$, and hence the proof is completed.

A crucial property of a lower semi-continuous function $f$ on a compact set is that $f$ attains a minimum. Thus assuming that $I$ is compact, the function attains a minimum on $I$, which must be positive. Though the compactness of $I$ is the goal of the proof rather than a part of assertion, we can directly show that $d$ attains a positive infimum:

Theorem 3. $d$ has the positive infimum on $I$. Consequently, $I$ is compact.

Proof. Assume not. That is, $\inf_{I} d(x) = 0$. Then for each $n$, the set $$F_n = \{ x \in I : d(x) \leq \tfrac{1}{n} \}$$ is non-empty, closed and bounded. Since $F_1 \supset F_2 \supset \cdots$, Lemma 1 shows that $\bigcap_{n} F_n$ is also non-empty. Let $x_0$ be an element of this intersection. Since $d(x_0) \leq 1/n$ for all $n$, we have a contradiction that $d(x_0) = 0$. Therefore we must have $\inf_{I} d(x) > 0$.

Since every open cover $\mathcal{U}$ of $I$ has a finite subcover by Remark, it follows that $I$ is compact.

• We can prove Lemma 1 for every complete metric space. Just saying :-) – Cortizol Apr 21 '13 at 18:09
• @Cortizol: That's not true: any infinite set with the discrete metric gives a counterexample. – Pete L. Clark Apr 21 '13 at 20:16
• @PeteL.Clark I was missing one thing: we need that $\operatorname{diam} F_n \to 0$ when $n \to \infty$, where $\operatorname{diam}(A)=\sup \{d(a,b): a\in A, b \in A\}$. Now it should be right. – Cortizol Apr 21 '13 at 21:10
• @Cortizol: yes, that fixes it. – Pete L. Clark Apr 21 '13 at 21:34
• Just amazing proof. I really was looking your proof as a useful course of ideas in analysis. Thank you ! – Fardad Pouran Feb 22 '15 at 15:52

I provide not the fastest proof, but certainly beneficial if you work it out.

1. Prove Bolzano-Weierstrass theorem.
2. Show $[a,b]$ is sequential compact.
3. Prove that in $\mathbb{R}^n$ with standard topology sequential compact spaces are totally bounded.
4. From 3 arrive that in $\mathbb{R}^n$ sequential compact implies compact.

Your question is solved now. In fact you proved Heine-Borel using a detour. Here are related results:

1. (related) Prove that in $\mathbb{R}^n$ compact implies limit point compact.
2. Pove that in $\mathbb{R}^n$ limit point compact implies sequential compact.

In conclusion, the following in $\mathbb{R}^n$ with standard topology are equivalent:

1. A subset is closed and bounded
2. A subset is open cover compact
3. A subset is sequential compact
4. A subset is limit point compact
5. A subset is complete and totally bounded

Here's a proof using a non-standard approach.

With the help of transfer principle, we could reformulate compactness as:

$A \subset \mathbb R$ is compact, iff for each $y \in ^\ast A$, there is $x \in A$ such that $x$ is infinitely close to $y$.

We could prove a bounded closed interval is compact by showing that every closed and bounded subset of $\Bbb R$ is compact.

Proof: Let $B$ be a closed and bounded subset of $\mathbb{R}$. It suffice to show that $\operatorname{st}(^\ast B) \subseteq B$. Since $B$ is closed, we only need to show that $\operatorname{st}(^\ast B) \subseteq \overline B$. For each $x \in \operatorname{st}(^\ast B)$, there is $y \in ^\ast B$ such that $\operatorname{st}(y) = x$. Appealing to the ultrapower construction, $y$ is actually a sequence $\{r_i\}_{i \in \Bbb{N}}$ such that $r_i \in B$ for all $i \in \Bbb{N}$. We can construct a new sequence of elements in $B$ that converge to $x$, which implies $x \in \overline B$. This construction is borrowed from an answer by Brian M. Scott. Given the free ultrafilter $\mathscr{U}$. Define $A_n = \{r_i:|r_i -x |<\frac{1}{n+1}\} \in \mathscr{U}$ for all $n \in \mathbb{N}$. With $\bf AC$, we have a choice function $f$ such that $A_n \mapsto a_n$ satisfying $a_n \in A_n$. Then the sequence $\{a_n\}_{n \in \Bbb N}$ is just what we need.

We have that $a<b$. Take an open cover \begin{align} \left[ a,b \right] \subset \bigcup_{\alpha \in A}U_{\alpha}. \end{align} Let $S$ be the set of all $x\in\left[ a,b\right]$ such that $\left[ a,x\right]$ is covered by finitely many $U_\alpha$. We want to show that $b$ is in this set $S$.

Clearly there is some $\alpha_0$ such that $a\in U_{\alpha_0}$ so we know that $S$ is a non-empty subset of $\mathbb{R}$ bounded above by $b$. We want to show that \begin{align*} x_0=\sup S \in [a,b]=b. \end{align*}

We assume the contrary, that $x_0<b$. We also have that $x_0>a$ since there is $\epsilon>0$ and some $\alpha_0$ such that $\left[ a,a+\epsilon \right] \in U_{\alpha_0}$, so $x\geq a+\epsilon$.

We then take $\alpha_0$ such that $x_0\in U_{\alpha_0}$ and take $\epsilon>0$ such that $a\leq x_0-\epsilon<x_0<x_0+\epsilon\leq b$ and such that $\left[ x_0-\epsilon,x_0+\epsilon\right] \subset U_{\alpha_o}$.

Since $x_0-\epsilon$ is not an upper bound there exists $x_1 \in S$ where $x_0-\epsilon \leq x_1 \leq x_0$. But then $[a,x_1]$ is finitely covered by $U_\alpha$'s,

\begin{align*} \left[ a,x_1\right] \subset \bigcup_{\beta=1}^n U_{\alpha_\beta} \end{align*} which implies \begin{align*} \left[ a,x_0+\epsilon \right] \subset \bigcup_{\beta=1}^n U_{\alpha_\beta}\cup U_{\alpha_0}. \end{align*}

This implies $x_0+\epsilon \in S$ contradicting that $x$ is the upper bound. We get then that $\sup S=b$ and similar argument shows that $b\in S$. In fact we have we have $[a-\epsilon,b]\subset U_{\alpha_0}$ for some $\epsilon>0$ and some $\alpha_0$. There is then some $x_1$ in $[a-\epsilon,b]$ belonging to $S$. Then there is a finite subcover for $[a,b]=[a,x_1]\cup [x_1,b]$. The segment $[a,b]$ is then compact as expected.

Here's a proof using transfinite induction, which I think is close to the one provided by Borel. Unfortunately, this proof assumes the Axiom of Choice.

Suppose there is a collection $\mathcal{U}$ of open intervals which covers $[0,1]$ but no finite subcollection of it covers $[0,1]$. Let $\kappa$ be a cardinal greater than $|\mathbb{R}|$. For each ordinal $\alpha < \kappa$, choose $I_\alpha$ as follows:

• Let $I_0$ be an interval in $\mathcal{U}$ which contains $0$.
• Assume that $0 < \alpha$ and $I_\beta$ is defined for all $\beta < \alpha$. Let $x = \sup\bigcup_{\beta<\alpha} I_\beta$. If $x>1$, let $I_\alpha = \emptyset$. Otherwise, let $I_\alpha$ be an interval in $\mathcal{U}$ which contains $x$.

Using induction, it can be shown that $\bigcup_{\beta<\alpha}I_\beta$ is an open interval for each $\alpha$. Assume that $I_\alpha = \emptyset$ for some $\alpha < \kappa$. As $1 \in \bigcup_{\beta<\alpha}I_\beta$, $1 \in I_{\alpha_1}$ for some $\alpha_1 < \alpha$. If $0 \not\in I_{\alpha_1}$, then similarly there is some $\alpha_2 < \alpha_1$ such that $\inf I_{\alpha_1} \in I_{\alpha_2}$. If $0 \not\in I_{\alpha_2}$, then there is $\alpha_3 < \alpha_2$ such that $\inf I_{\alpha_2} \in I_{\alpha_3}$. This process must stop at some point since there is no infinite decreasing sequence of ordinals, and hence we have a finite subcover of $\mathcal{U}$. This contradicts our assumption. So, $I_\alpha \ne \emptyset$ for any $\alpha < \kappa$.

Define $f:\kappa \to \mathbb{R}$ by $f(\alpha) = \sup I_\alpha$. Then $f$ is increasing. In particular, $f$ is injective. This is impossible since $\kappa > |\mathbb{R}|$.

• Any corrections or criticism are welcome :) – Wooyoung Chin May 13 '15 at 19:37
• The use of the axiom of choice here can easily be eliminated. You can assume that $\mathcal{U}$ consists only of intervals with rational endpoints (replace each set in $\mathcal{U}$ by all such intervals it contains), so you have no trouble making choices of elements of $\mathcal{U}$. You can then take $\kappa=\omega_1$, since each $I_\alpha$ is a distinct interval with rational endpoints and so you can be sure the induction terminates somewhere below $\omega_1$. – Eric Wofsey Sep 20 '15 at 19:12