[proofplan]
We use the density of $M$ in $\hat{M}$ to transfer total boundedness from $M$ to $\hat{M}$ via the triangle inequality: an $\varepsilon/2$-net for $M$ is an $\varepsilon$-net for $\hat{M}$. Compactness then follows from the [Equivalent Characterisations of Compactness in Metric Spaces](/theorems/316), since $\hat{M}$ is both complete (by definition of completion) and totally bounded.
[/proofplan]
[step:Transfer total boundedness from $M$ to $\hat{M}$ using density]
Let $\iota: M \hookrightarrow \hat{M}$ denote the isometric embedding of $M$ into its completion $\hat{M}$. By the definition of completion, $\iota(M)$ is dense in $\hat{M}$ and $\hat{d}(\iota(x), \iota(y)) = d(x, y)$ for all $x, y \in M$.
Fix $\varepsilon > 0$. Since $M$ is totally bounded, there exists a finite set $\{x_1, \ldots, x_N\} \subset M$ with $M \subset \bigcup_{i=1}^N B_d(x_i, \varepsilon/2)$.
We claim $\{\iota(x_1), \ldots, \iota(x_N)\}$ is an $\varepsilon$-net for $\hat{M}$. Let $\hat{x} \in \hat{M}$. Since $\iota(M)$ is dense in $\hat{M}$, there exists $y \in M$ with $\hat{d}(\hat{x}, \iota(y)) < \varepsilon/2$. Since $y \in M \subset \bigcup_{i=1}^N B_d(x_i, \varepsilon/2)$, there exists $i$ with $d(y, x_i) < \varepsilon/2$. By the isometry property, $\hat{d}(\iota(y), \iota(x_i)) = d(y, x_i) < \varepsilon/2$. The triangle inequality gives
\begin{align*}
\hat{d}(\hat{x}, \iota(x_i)) \le \hat{d}(\hat{x}, \iota(y)) + \hat{d}(\iota(y), \iota(x_i)) < \frac{\varepsilon}{2} + \frac{\varepsilon}{2} = \varepsilon.
\end{align*}
Therefore $\hat{M} \subset \bigcup_{i=1}^N B_{\hat{d}}(\iota(x_i), \varepsilon)$, and $\hat{M}$ is totally bounded.
[guided]
The completion $\hat{M}$ of a metric space $(M, d)$ is, informally, the space obtained by "adding all the limits" of Cauchy sequences in $M$. The isometric embedding $\iota: M \hookrightarrow \hat{M}$ preserves distances, and $\iota(M)$ is dense in $\hat{M}$ --- meaning every point of $\hat{M}$ can be approximated arbitrarily well by points of $\iota(M)$.
The strategy is to combine two approximations: first approximate $\hat{x} \in \hat{M}$ by a point $\iota(y) \in \iota(M)$ (using density), then approximate $y \in M$ by a net point $x_i$ (using total boundedness of $M$). Each approximation uses $\varepsilon/2$, and the triangle inequality composes them.
Fix $\varepsilon > 0$. Total boundedness of $M$ provides a finite $\varepsilon/2$-net $\{x_1, \ldots, x_N\} \subset M$.
For $\hat{x} \in \hat{M}$, density of $\iota(M)$ gives $y \in M$ with $\hat{d}(\hat{x}, \iota(y)) < \varepsilon/2$, and the $\varepsilon/2$-net condition gives $i$ with $d(y, x_i) < \varepsilon/2$. Since $\iota$ is an isometry, $\hat{d}(\iota(y), \iota(x_i)) = d(y, x_i) < \varepsilon/2$. Therefore
\begin{align*}
\hat{d}(\hat{x}, \iota(x_i)) \le \hat{d}(\hat{x}, \iota(y)) + \hat{d}(\iota(y), \iota(x_i)) < \varepsilon.
\end{align*}
This is the same "covering of a covering" triangle inequality argument that appears in the [Density Characterisation of Total Boundedness](/theorems/1088). The density of $\iota(M)$ in $\hat{M}$ means that $\hat{M} = \overline{\iota(M)}$, so total boundedness of $\iota(M)$ (which inherits it from $M$ via the isometry) implies total boundedness of $\hat{M}$ by that characterisation.
[/guided]
[/step]
[step:Conclude compactness from completeness and total boundedness]
The completion $\hat{M}$ is, by definition, a complete metric space. We have shown it is totally bounded. By the [Equivalent Characterisations of Compactness in Metric Spaces](/theorems/316), a metric space is compact if and only if it is complete and totally bounded. Since $\hat{M}$ satisfies both conditions, $\hat{M}$ is compact.
[guided]
The [Equivalent Characterisations of Compactness in Metric Spaces](/theorems/316) states that for a metric space, compactness is equivalent to the conjunction of completeness and total boundedness. We verify both conditions for $\hat{M}$:
1. **Completeness.** By the [Existence and Uniqueness of Completions](/theorems/1002), $\hat{M}$ is a complete metric space.
2. **Total boundedness.** Established in the previous step.
Therefore $\hat{M}$ is compact.
This result explains why total boundedness is often described as "compactness minus completeness": a totally bounded metric space may fail to be compact only because Cauchy sequences escape the space, and completing the space resolves this. The completion adds the "missing limits" without enlarging the space enough to destroy total boundedness --- precisely because the completion is the closure of the original space (in the sense that $\hat{M} = \overline{\iota(M)}$), and total boundedness passes to closures.
[/guided]
[/step]