[proofplan]
We extract a uniformly convergent subsequence from a uniformly bounded, equicontinuous sequence on a compact metric space. First, we use separability of $K$ to obtain a countable dense subset. Then we apply a diagonal argument (Cantor) combined with Bolzano--Weierstrass to extract a subsequence converging pointwise on this dense set. Finally, equicontinuity promotes pointwise convergence on a dense set to uniform Cauchy convergence on all of $K$, and completeness of $C(K)$ delivers a uniform limit.
[/proofplan]
[step:Extract a countable dense subset from the compact metric space]
Since $(K, d)$ is a [compact](/page/Compact%20Space) metric space, it is [separable](/page/Separable). For each $m \in \mathbb{N}$, the open cover $\{B(x, 1/m) : x \in K\}$ admits a finite subcover, so $K$ is [totally bounded](/page/Total%20Boundedness) and hence separable. Let $S = \{x_1, x_2, x_3, \ldots\} \subseteq K$ be a countable [dense](/page/Dense%20Subset) subset.
[guided]
Why do we need a countable dense subset? The diagonal argument requires us to pass to subsequences one point at a time, so we need countably many points. But we also need density, because equicontinuity will later extend pointwise convergence on $S$ to uniform convergence on all of $K$.
Since $(K, d)$ is a compact [metric space](/page/Metric%20Space), it is totally bounded. For each $m \in \mathbb{N}$, the open cover $\{B(x, 1/m) : x \in K\}$ admits a finite subcover by compactness. Let $F_m \subseteq K$ denote the finite set of centres from the subcover at scale $1/m$. Then every point of $K$ lies within distance $1/m$ of some element of $F_m$. Define
\begin{align*}
S := \bigcup_{m=1}^{\infty} F_m.
\end{align*}
This is a countable union of finite sets, hence countable. To verify density: let $x \in K$ and $r > 0$. Choose $m$ with $1/m < r$. Then some $s \in F_m \subseteq S$ satisfies $d(x, s) < 1/m < r$, so $S \cap B(x,r) \neq \varnothing$.
Enumerate $S = \{x_1, x_2, x_3, \ldots\}$. This countable dense subset is the foundation for the diagonal argument: we extract convergent subsequences at $x_1, x_2, x_3, \ldots$ one at a time, and density ensures equicontinuity can promote pointwise convergence on $S$ to uniform convergence on $K$.
[/guided]
[/step]
[step:Apply the Cantor diagonal argument to extract a subsequence converging pointwise on $S$]
Consider the [sequence](/page/Sequence) of real numbers $(f_k(x_1))_{k \in \mathbb{N}}$. Since $|f_k(x_1)| \le M$ for all $k$, this sequence is bounded. By the Bolzano--Weierstrass Theorem, there exists a subsequence $(f_{1,k})_{k \in \mathbb{N}}$ of $(f_k)$ such that $(f_{1,k}(x_1))_{k \in \mathbb{N}}$ converges in $\mathbb{R}$.
Inductively, for each $m \ge 2$, extract a subsequence $(f_{m,k})_{k \in \mathbb{N}}$ of $(f_{m-1,k})_{k \in \mathbb{N}}$ such that $(f_{m,k}(x_m))_{k \in \mathbb{N}}$ converges. This is possible because the uniform bound $|f_{m-1,k}(x_m)| \le M$ ensures the Bolzano--Weierstrass Theorem applies at each stage.
Define the diagonal subsequence by $g_j := f_{j,j}$ for each $j \in \mathbb{N}$. For any fixed $x_m \in S$, the sequence $(g_j)_{j \ge m}$ is a subsequence of $(f_{m,k})_{k \in \mathbb{N}}$, which converges at $x_m$. Therefore $(g_j(x_m))_{j \in \mathbb{N}}$ converges in $\mathbb{R}$ for every $x_m \in S$.
[guided]
The diagonal trick extracts a single subsequence converging at every point of the countable set $S = \{x_1, x_2, \ldots\}$. Start with the bounded sequence $(f_k(x_1))_{k \in \mathbb{N}}$. Since $|f_k(x_1)| \le M$, the Bolzano--Weierstrass Theorem gives a convergent subsequence $(f_{1,k})_{k \in \mathbb{N}}$.
This subsequence need not converge at $x_2$. But $|f_{1,k}(x_2)| \le M$, so extract a further subsequence $(f_{2,k})_{k \in \mathbb{N}}$ of $(f_{1,k})$ converging at $x_2$. Since $(f_{2,k})$ is a subsequence of $(f_{1,k})$, it still converges at $x_1$.
Continue inductively: at stage $m$, extract $(f_{m,k})_{k \in \mathbb{N}}$ from $(f_{m-1,k})$ converging at $x_m$. After $m$ stages, $(f_{m,k})$ converges at $x_1, \ldots, x_m$ simultaneously.
Define the diagonal subsequence:
\begin{align*}
g_j := f_{j,j}, \quad j \in \mathbb{N}.
\end{align*}
Fix any $x_m \in S$. For $j \ge m$, the term $g_j = f_{j,j}$ belongs to the $m$-th subsequence $(f_{m,k})_{k \in \mathbb{N}}$, because the $j$-th subsequence refines the $m$-th whenever $j \ge m$. Since $(f_{m,k}(x_m))$ converges, the tail $(g_j(x_m))_{j \ge m}$ converges as well. Hence $(g_j(x_m))_{j \in \mathbb{N}}$ converges for every $x_m \in S$.
The diagonal construction is essential because a naive intersection of subsequences (one per point) would be empty — a countable intersection of subsequences need not be a subsequence. The diagonal selects one term from each level, avoiding this pitfall.
[/guided]
[/step]
[step:Use equicontinuity and a finite cover to promote pointwise to uniform Cauchy convergence]
Let $\epsilon > 0$. By the [equicontinuity](/page/Equicontinuity) hypothesis, there exists $\delta > 0$ such that for all $x, y \in K$ with $d(x,y) < \delta$ and all $j \in \mathbb{N}$:
\begin{align*}
|g_j(x) - g_j(y)| < \frac{\epsilon}{3}.
\end{align*}
Since $K$ is compact and $S$ is dense, the open cover $\{B(s, \delta) : s \in S\}$ of $K$ admits a finite subcover. Select finitely many points $x_1, \ldots, x_N \in S$ such that:
\begin{align*}
K \subseteq \bigcup_{i=1}^{N} B(x_i, \delta).
\end{align*}
The sequence $(g_j)$ converges pointwise on the finite set $\{x_1, \ldots, x_N\}$. Therefore there exists $J \in \mathbb{N}$ such that for all $j, l \ge J$ and all $i \in \{1, \ldots, N\}$:
\begin{align*}
|g_j(x_i) - g_l(x_i)| < \frac{\epsilon}{3}.
\end{align*}
[guided]
We have pointwise convergence on a dense set, and we want uniform convergence on all of $K$. The idea is to use equicontinuity to control the oscillation of each $g_j$ within small balls, and then cover $K$ by finitely many such balls (compactness), reducing the problem to pointwise convergence at finitely many centres.
Let $\epsilon > 0$. The equicontinuity hypothesis provides $\delta > 0$ such that for all $x, y \in K$ with $d(x,y) < \delta$ and all $j \in \mathbb{N}$:
\begin{align*}
|g_j(x) - g_j(y)| < \frac{\epsilon}{3}.
\end{align*}
Since $S$ is dense in $K$, the collection $\{B(s, \delta) : s \in S\}$ covers $K$. By compactness of $K$, finitely many balls suffice: choose $x_1, \ldots, x_N \in S$ with
\begin{align*}
K \subseteq \bigcup_{i=1}^{N} B(x_i, \delta).
\end{align*}
Now $(g_j)$ converges at each of the finitely many points $x_1, \ldots, x_N$. Taking the maximum of the $N$ thresholds for $\epsilon/3$-convergence, there exists $J \in \mathbb{N}$ such that for all $j, l \ge J$ and all $i \in \{1, \ldots, N\}$:
\begin{align*}
|g_j(x_i) - g_l(x_i)| < \frac{\epsilon}{3}.
\end{align*}
This is the crucial reduction: the infinite-dimensional problem (uniform convergence on $K$) has been reduced to convergence at finitely many points, which is guaranteed by the diagonal construction.
[/guided]
[/step]
[step:Combine the three $\epsilon/3$ estimates to establish uniform Cauchy convergence]
Let $y \in K$ be arbitrary. By the finite cover, there exists $i \in \{1, \ldots, N\}$ with $d(y, x_i) < \delta$. For any $j, l \ge J$, the triangle inequality gives:
\begin{align*}
|g_j(y) - g_l(y)| &\le |g_j(y) - g_j(x_i)| + |g_j(x_i) - g_l(x_i)| + |g_l(x_i) - g_l(y)| \\
&< \frac{\epsilon}{3} + \frac{\epsilon}{3} + \frac{\epsilon}{3} = \epsilon.
\end{align*}
The first and third terms are bounded by $\epsilon/3$ via equicontinuity (since $d(y, x_i) < \delta$), and the middle term is bounded by $\epsilon/3$ via the pointwise Cauchy estimate at $x_i$. Since $y \in K$ was arbitrary:
\begin{align*}
\|g_j - g_l\|_\infty = \sup_{y \in K} |g_j(y) - g_l(y)| \le \epsilon \quad \text{for all } j, l \ge J.
\end{align*}
Thus $(g_j)$ is a [Cauchy sequence](/page/Cauchy%20Sequence) in $(C(K), \|\cdot\|_\infty)$.
[/step]
[step:Conclude via completeness of $C(K)$]
The space $C(K)$ of [continuous](/page/Continuity) real-valued [functions](/page/Function) on a compact metric space $K$, equipped with the supremum norm, is a [Banach space](/page/Banach%20Space). Since $(g_j)$ is a Cauchy sequence in this [complete](/page/Complete%20Metric%20Space) space, it converges to a [limit](/page/Limit) $f \in C(K)$:
\begin{align*}
\|g_j - f\|_\infty \to 0 \quad \text{as } j \to \infty.
\end{align*}
The subsequence $(g_j) = (f_{j,j})$ of the original sequence $(f_k)$ converges [uniformly](/page/Uniform%20Convergence) to $f \in C(K)$, completing the proof.
[/step]