Compactness of the metric space X implies that X is totally bounded: for every k∈N, there exists a finite (1/k)-netFk={y1(k),…,ym such that
[
X = \bigcup_{i=1}^{m_k} B(y_i^{(k)}, 1/k),
]
where B(y,r)={z∈X:d(z,y)<r} is the open ball of radius r centered at y.
We now construct a chain of infinite subsequences inductively:
For k=1, the open cover {B(yi(1),1):i=1,…,m1} of X has some ball B(y1(1),1) containing infinitely many terms of {xn}. Relabel these terms (with strictly increasing indices) as the subsequence {xn(1)}n=1∞.
For k=2, apply the same to {xn(1)} using the finite cover ; some contains infinitely many terms of . Relabel as .
Inductively, assuming {xn(k−1)}n has been constructed, some ball from the -net contains infinitely many of its terms. Relabel as .
Now define the diagonal subsequence{zm}m=1∞ by
[
z_m = x_m^{(m)}
]
for each m∈N. Clearly, {zm} is a subsequence of {xn} (since each {xn(k)} is).
We claim {zm} is Cauchy (hence converges, as compact metric spaces are complete). Let ε>0. Choose K∈N with 1/K<ε/2. Then for all m,l≥K,
[
z_m = x_m^{(m)} \quad \text{is the m-th term of } {x_n^{(m)}},
]
and {xn(m)} is an infinite subsequence of {xn(K)}⊂B(y1. Thus zm∈B(y1(K),1/K). Similarly, zl∈B(y1(K),1/K). So
[
d(z_m, z_l) \leq d(z_m, y_1^{(K)}) + d(y_1^{(K)}, z_l) < \frac{1}{K} + \frac{1}{K} < \varepsilon.
]
Hence {zm} is Cauchy and converges to some z∈X (by completeness of compact metric spaces).
This shows every sequence in X has a convergent subsequence, so X is sequentially compact. ∎