TITLE: How to show that this set is compact in $\ell^2$
QUESTION [15 upvotes]: Let $(a_n)_{n}\in\ell^2:=\ell^2(\mathbb{R})$ be a fixed sequence. Consider the subspace $$C=\{(x_n)_{n}\in\ell^2 : |x_n|\le a_n\text{ for all }n\in\mathbb{N}\}.$$
According to the book [Dunford and Schwartz, Linear operators part I, page 453] $C$ is compact in the $\ell^2$-norm, but there is no proof. How can I show that $C$ is indeed compact in $\ell^2$ ?

REPLY [2 votes]: I just want to mention that the "diagonal argument" mentioned in comments is nothing other than the compactness of $\prod_{i \in \mathbb{N}} [a_i, b_i]$ (or equivalently $[0,1]^\mathbb{N}$), an important (and easier to prove) special case of Tychonoff's theorem.  Essentially all compactness results in infinite-dimensional spaces flow from this fact, so it would be well to become comfortable with it.
This guarantees there is a subsequence $x_{n_k}$ which converges pointwise (i.e. coordinate-wise) to some $x$.  But $|(x_{n_k})_i| \le |a_i|$ with $a_i \in \ell^2$, so by dominated convergence, the convergence also takes place in $\ell^2$.