# Exercise on separable Hilbert spaces and orthonormal system

Let $H$ be a separable Hilbert space and $\{e_n\}$ a complete orthonormal system of $H$. Prove that, if $\{y_k\}$ is a bounded sequence in $H$, the condition $\lim_{k\rightarrow\infty}(e_n, y_k)=0$ for every $n$ implies $\lim_{k\rightarrow\infty}(x, y_k)=0$ for every $x\in H$. Show by an example that this is false if $\{y_k\}$ is not bounded. I don't know how to start to solve this, have you some hints? Thanks!

Let $D := \{x\in H : \langle x,e_n\rangle\neq 0\text{ for at most finitely many }n\}$. Then $D$ is dense in $H$ and, clearly, $\langle x,y_k\rangle\to 0$ as $k\to\infty$ for all $x\in D$. Namely, if $x\in D$, $x = \sum_{n=1}^N x_ne_n$, then $\langle x,y_k\rangle = \sum_{n=1}^Nx_n\langle e_n,y_k\rangle\to 0$ as $k\to\infty$, since each of the finitely many summands tends to zero.
Now, let $x\in H$ and $\varepsilon > 0$ be given. Then we find $y\in D$ such that $\|x-y\| < \frac\varepsilon {2K}$, where $K$ is an upper bound of $(\|y_k\|)_{k\in\mathbb N}$. Hence, $$|\langle x,y_k\rangle|\le \|x-y\|\|y_k\| + |\langle y,y_k\rangle|,$$ which is smaller than $\varepsilon$ for $k$ sufficiently large.
As an addition to @Friedrich Philipp's answer, to give a counterexample for the unbounded case, let $y_k = ke_k$. We have $$\def\<#1>{\left<#1\right>}\<y_k, e_n> = 0, k > n$$ hence $\<y_k, e_n> \to 0$. Now let $x := \sum_n n^{-1}e_n$. Then, for every $k$, we have $$\<y_k, x> = \sum_n\frac 1{n}\<y_k, e_n> = \sum_n \frac 1n k\delta_{kn} = 1 \not\to 0$$