Let $H$ be an infinite-dimensional separable Hilbert space, show that a Hilbert-Schmidt operator is compact Let $H$ be an infinite-dimensional separable Hilbert space and $(e_n)$ an orthonormal basis of $H$.
$T\in B(H)$ is called a Hilbert-Schmidt operator if $\sum_{n=1}^{\infty} ||Te_n||^2 < \infty$.
I want to show that every Hilbert-Schmidt operator is compact.
I am not getting the idea how to use the separability and if it doesn't matter whether the space is infinite or finite-dimensional.
But I know that if there is a series of compact finite rank operators that converges to T, then T is compact.
*I saw many versions of similar questions with different contexts.
 A: Finite or infinite dimensional is not a big deal (in finite dimensions all linear operators are compact, so that is for free).
We use the separability of the space to ensure that the orthonormal basis is countable. To get compactness, we define the following sequence of finite rank operators:
$$ T_n(x)=\sum_{j=1}^n \langle x, e_j\rangle T(e_j).$$
Can you show that $T_n\rightarrow T$? Cauchy-Schwarz inequality and Parseval's identity are quite useful :) also the fact that $B(H)$ is a Banach space with respect to the operator norm is pretty handy.

 Define $T_k$ as you did above. Then we can pick $\Vert x \Vert \leq 1$ and use Cauchy-Schwarz to get for $\ell \geq k$
\begin{align} \Vert (T_\ell - T_k) (x) \Vert &\leq \sum_{n=k+1}^\ell \vert \langle x, e_n \rangle \vert \Vert T (e_n) \Vert \\ &\leq \left( \sum_{n=k+1}^\ell \vert \langle x, e_n \rangle \vert^2 \right)^\frac{1}{2} \left( \sum_{n=k+1}^\ell \Vert T (e_n) \Vert^2 \right)^\frac{1}{2}\\&\leq \Vert x \Vert \left( \sum_{n=k+1}^\ell \Vert T (e_n) \Vert^2 \right)^\frac{1}{2}\\&\leq \left( \sum_{n=k+1}^\ell \Vert T (e_n) \Vert^2 \right)^\frac{1}{2}.\end{align}
Where we used Parseval's identity$$ \Vert x \Vert^2 = \sum_{n\geq 1} \vert \langle x, e_n \rangle \vert^2.$$
Thus, we get that $(T_k)_{k\geq 1}$ is a Cauchy sequence in the operator norm. By completeness we get that there exists some bounded linear operator $S: H \rightarrow H $ such that $\lim_{k\rightarrow \infty} T_k=S$. We are left to show that $S=T$.

We note that $S(e_n) = \lim_{k\rightarrow \infty} T_k (e_n) = T(e_n)$. Furthermore, one can show that $X:=span\{ e_n : n \geq 1 \}$ is dense in $H$ (try to show this). Thus, $S=T$ on the dense subspace $X$ and by continuity of both $S$ and $T$ we get $S=T$.

