# Convergence of functions in norm and pointwise

I understand that $L^2$ convergence does not imply pointwise convergence and vice versa. But I think that $L^2$ convergence must imply pointwise convergence a. e. $x$? So, since Schwartz functions are dense in $L^2$, then, for every $f\in L^2$, should it be the sequence $\{S_n\}$ of Schwartz functions that converges to $f$ a.e.?

Please, correct me or approve my understanding. Thank you. Marina

No, $L^2$ convergence doesn't imply pointwise convergence a.e .
Let $n = 2^i + j$, with $0\leq j<2^i$ and define $f_n = \chi_{[\frac{j}{2^i},\frac{j+1}{2^i}]}$
This converge to $0$ in $L^2$ (as $\| f_n \| = 2^{-i}$), but converge nowhere to 0.
$L^2$ convergence does not imply pointwise a.e. convergence. One "well-known" example is the sequence $$f_1=\chi_{[0,1]},\;f_2=\chi_{[0,\frac{1}{2}]},\; f_3=\chi_{[\frac{1}{2},1]},\; f_4=\chi_{[0,\frac{1}{4}]},\dots$$ in $L^2([0,1])$. This sequence converges to zero in $L^2$, but $\limsup_{n\to\infty}f_n(x)=1$ for all $x\in[0,1]$.