# Example of compact sets in Hilbert spaces and exhaustion by compact set

I've read many questions about the fact that a closed and bounded ball in a generic Hilbert space is not compact. But no one furnishing a concrete example of a compact subset that can be used in applications. So I'm asking for some examples of compact sets in an infinite dimensional Hilbert (or only Banach) space.

In particular, given a bounded set $E$ in the Hilbert space $H$, does exist a compact $K$ such that $E\subset K$? Can we construct an exhaustion by compact sets for any Hilbert space?

• Here is one example of a compact set. Let $\mu_i$ be a sequence such that $\sum \mu_i^p < \infty$ for $1\leq p <\infty$. Then consider the set $S$ in $\ell^p$ of sequences whose $i$-th entry is bounded by $\mu_i$ That is, $x \in S$ if $\vert x_i \vert \leq \mu_i$. This will be compact. – Philip Hoskins Mar 1 '17 at 17:29

Any closed and bounded subset of a finite-dimensional subspace of a Banach space is compact, as any subspace of dimension $n<\infty$ is homeomorphic to $\mathbb R^n$ (or $\mathbb C^n$).
As for a somewhat less trivial example: for the Banach space $E$, given any compact operator $T$ the closure of the image of the unit ball of $E$ is a compact subset. As an example, let $\{e_n\}$ be an orthonormal basis of $\ell^2$, and define $T:\ell^2\to\ell^2$ by $$Te_n=\frac{1}{n}e_n$$ (more generally, replacing $\left\{\frac{1}{n}\right\}$ by any sequence convergent to zero). Then $T$ is compact, and the closure of the image of the unit ball is $T$.
To address your last paragraph, compactness is a hereditary property, in the following sense: if $K$ is comapact and $E\subset K$, then $\overline{E}$ is compact. Since you already know that the closed unit ball of an infinite dimensional Banach space is not compact, you have a counterexample.