Show that $\sum_k\omega_k^2=\infty$ a.e. if $\{\omega_k\}$ is an orthonormal basis 
Let $\{\omega_k\}$ be a closed orthonormal system in $L^2[a,b]$. Show that $\sum_k\omega_k^2=\infty$ a.e.

Suppose $\exists E\subset[a,b]$, $m(E)>0$ and $\sum_k\omega_k^2\le M<\infty$. I want to construct some function $f\in L^2$ such that and $\left<f,\omega_k\right>=0$ but $f\not\equiv0$. But I don't know how to go on.
 A: Prove that, if you supose that $\sum_kw_k^2\neq\infty$ a.e., then you can supose that there is a $w\in L^2[a,b]$ such that $w=\sum_kw_k^2$ a.e....(*)
Also, by totality of $\{w_k\}$, $w=\sum_k\langle w,w_k\rangle w_k$. Equaliting the last with (*) we get $\sum_k\langle w,w_k\rangle w_k=\sum_kw_k^2$, or equivalentely, $\sum_k(w_k-\langle w,w_k\rangle)w_k=0$.
Thus, as the serie is a convergent one, then $(w_k-\langle w,w_k\rangle)w_k\to 0$, or equivalentely $\|(w_k-\langle w,w_k\rangle)w_k\|\to 0$.
Then $\|w_k\|-|\langle w,w_k\rangle|\|w_k\|\to 0$, and as $\|w\|_k=1$, the last  implies $|\langle w,w_k\rangle|\to 1$...(**) 
On the other hand, as $w=\sum_k\langle w,w_k\rangle w_k$, then $\|\langle w,w_k\rangle w_k\|\to 0$, but this implies that $|\langle w,w_k\rangle|\to 0$. However, this is a contradiction to (**).
That finish the proof.
A: Choose the set $E$ as you did. Now, for any function $f \in L^2$, the Cauchy Schwarz inequality yields
$$
|f(x)| = \left| \sum \langle f, w_k\rangle w_k (x)\right| \leq \left(\sum |\langle f, w_k\rangle|^2\right)^{1/2} \cdot \left(\sum |w_k (x)|^2\right)^{1/2}\leq \|f\|_2 \cdot M^{1/2}
$$
for almost all $x \in E$.
Hence, every $L^2$ function is essentially bounded on $E$. But this is false: Since the Lebegsue measure is atomless, there are $A_m\subset E$ with $0<\lambda (A_m)<2^{-m}$ and the function $f =\sum_m m \cdot 1_{A_m}$ is in $L^2$, but not essentially bounded on $E$.
