Suppose that $L^2([0,1]^2)$ is the space of equivalence classes of square integrable functions $f:[0,1]^2\to\mathbb R$ with the usual norm given by $$ \|f\|_2=\biggl(\int_0^1\int_0^1|f(x,y)|^2dxdy\biggr)^{1/2}. $$ With an abuse of notation, the function and the equivalence class is denoted by the same symbol $f$ (instead of using $f$ for the function and $[f]$ for its equivalence class).
Suppose that $f\in L^2([0,1]^2)$ and set $g(x)=f(x,x)$ for each $x\in[0,1]$. What can we say about $g$? Can we say that $g\in L^2([0,1])$?
Suppose that $f,f_1,f_2,\ldots\in L^2([0,1]^2)$ such that $f_n\to f$ as $n\to\infty$ in $L^2([0,1]^2)$. Set $g(x)=f(x,x)$, $g_1=f_1(x,x),g_2=f_2(x,x),\ldots$ for each $x\in[0,1]$. Can we say that $g_n\to g$ as $n\to\infty$ in $L^2([0,1])$?
Any help is much appreciated!
The answer is no as indicated in the comments above, here is simply a more detailed answer. Let $[\tilde{f}]\in L^2([0,1]^2)$, here $[\tilde{f}]$ denotes the class of all functions equal to $\tilde{f}$ up to sets of measure zero. Define a map $f(x,y)$ by $$f(x,y)=\begin{cases} \tilde{f}(x,y) & \mbox{ if } x\neq y,\\ +\infty & \mbox{ if } x=y. \end{cases}$$ Then $[f]=[\tilde{f}]$ but the function $g(x):=f(x,x)=+\infty$ is not $L^2$-integrable.