Heine-Borel Theorem/Metric Space

Theorem
Let $\left({M, d}\right)$ be a metric space.

Then $M$ is compact if and only if $M$ is complete and totally bounded.

Proof
If $M$ is compact, then $M$ is complete and totally bounded by Compact Metric Space is Complete and Compact Metric Space is Totally Bounded.

It therefore suffices to show that if $M$ is complete and totally bounded, then $M$ is compact.

Let $M$ be complete and totally bounded.

Let $\left\langle{x_n}\right\rangle$ be a sequence in $M$.

Let $U_0 = M$. We now inductively define a sequence $\left\langle {U_n} \right\rangle$ of open subsets of $M$ as follows:


 * We assume that $U_{n-1}$ contains infinitely many terms of the sequence $\left\langle{x_n}\right\rangle$.


 * By the definition of total boundedness, $U_{n-1}$ can be covered by finitely many open balls of radius $\dfrac 1 n$.


 * Hence one of these balls, say $N_{1/n}\left({c_n}\right)$, is such that $U_{n-1} \cap N_{1/n}\left({c_n}\right)$ contains infinitely many terms of the sequence $\left\langle{x_n}\right\rangle$.


 * We then let $U_n = U_{n-1} \cap N_{1/n}\left({c_n}\right)$.

Then there exists a subsequence $\left\langle{y_n}\right\rangle$ of $\left\langle{x_n}\right\rangle$ such that $y_n \in U_n$ for all $n \in \N$.

If $m > n$, $y_m \in U_m$, and $y_n \in U_n$, then $d\left({y_m, y_n}\right) \le d\left({y_m, c_n}\right) + d\left({y_n, c_n}\right) \le \dfrac 2 n$. This follows from $U_m \subseteq U_n \subseteq N_{1/n}\left({c_n}\right)$, by construction.

Hence $\left\langle{y_n}\right\rangle$ is a Cauchy sequence.

By the assumption that $M$ is complete, the sequence $\left\langle{y_n}\right\rangle$ converges in $M$.

Since $\left\langle{y_n}\right\rangle$ is a convergent subsequence of $\left\langle{x_n}\right\rangle$, it follows that $M$ is sequentially compact.

Hence $M$ is compact by Sequence of Implications of Metric Space Compactness Properties.

Also see

 * Heine-Borel Theorem
 * Heine-Borel Theorem (Special Case)