TITLE: Closed subspace consisting of continuous functions in $L^{2}([0,1])$ is finite-dimensional
QUESTION [5 upvotes]: I wish to show that any closed subspace $M$ of $L^{2}[0,1]$ consisting of continuous real-valued functions is finite-dimensional (which amazes me quite a bit, I must admit).
My approach proceeds as follows:
Step 0. Note that $L^{2}[0,1]$ is a separable Hilbert space with the usual scalar product on $L^2$. Moreover, since $M$ is closed, it is separable Hilbert, too, with inner product of $L^2([0,1])$ restricted to $M$.
Step 1. Let $I: (M, \| \cdot \|_{\infty}) \to (M, \| \cdot \|_{2})$ be the identity operator on $M$. Since $I$ is bijective, by the open mapping theorem, $I^{-1}$ exists in the space of bounded linear operators on $M$. Hence, for any $f \in M$, we have $$ \| f\|_{\infty} = \| I^{-1} (f)\|_{\infty} \leq C \|f \|_{2} \quad \forall f \in M,$$
where $C := \| I^{-1} \|.$
Step 2. Now, let $t \in [0,1]$ and consider the linear functional $\ell_{t}: M \to \mathbb{R}, f \mapsto f(t).$ As $M$ is Hilbert, we may apply Riesz representation theorem to deduce that $\ell_{t} = \langle \cdot, g_t \rangle =: \ell_{g_t}$ for some $g_t \in M$ and $\|\ell_{g_t}\| = \| g_t\|_{2}$. Moreover, $$ f(t) = l_t (f) =  \langle f, g_t \rangle \quad \forall t \in [0,1].$$
Using step 1, we may further conclude that $\| g_t \|_{2} \leq C$.
Step 3. By seperability of $M$, we may suppose that $S = \{h_{n}: n \in \mathbb{N}\}$ is a orthonormal basis of $M$. Then, Parseval's identity yields
$$
\infty > \|g_t\|_{2} = \sum_{h \in S} | \langle h, g_t \rangle |^{2} = \sum_{h \in S} |h(t)|^{2}
$$
I am stuck in the last line. I want to argue that this sum has to be finite. Can we bound $|h(t)|$ from below? I guess, this suffices to conclude, right? Does this argument work?

REPLY [2 votes]: In fact, if $M$ is a closed subspace of $L^2(X)$ for some finite measure space $X$, and $M\subset L^{\infty}(X)$, then $M$ is finite dimensional.
First note that step $1$ doesn't change.: we still have $\|f\|_2\leq \mu(X)^{1/2}\|f\|_{\infty}$ for $f\in L^{\infty}(X)$ which 1) guarantees that $M$ is Banach with the $\|\cdot\|_\infty$ norm and 2) that the identity map $(M,\|\cdot\|_\infty)\rightarrow (M,\|\cdot\|_2)$ is continuous. So the bounded inverse  theorem gives a constant $C$ such that $\|f\|_\infty\leq C\|f\|_2$, $f\in M$.
For the remainder of the proof we have to do somehting different. Take an orthonormal system $\{f_k\}_{k=1}^n$ in $M$. Then for any $c_1, \ldots, c_n \in \mathbb{C}$ the inequality $\|f\|_\infty\leq C\|f\|_2$ for the function $f=c_1 f_1+ c_2f_2+\ldots +c_n f_n$ means that
$$|c_1f_1(x)+\ldots+c_nf_n(x)|^2\leq C^2(|c_1|^2+\ldots +|c_n|^2)\; \; \; \; \; \;(1)$$
for a.e. $x$. Choosing a countable dense subset $\Omega\subset \mathbb{C}^n$ we can find a measurable set $Y$ with $\mu(X\backslash Y)=0$ such that $(1)$ holds for all $x\in Y$ and $(c_1, \ldots, c_n)\in \Omega$. By continuity $(1)$ then holds for all $y\in Y$ and any scalars $c_1, \ldots, c_n \in \mathbb{C}$. In particular we can set $c_k=\overline{f_k(x)}$ to get
$$|f_1(x)|^2+\ldots +|f_n(x)|^2\leq C^2$$
for all $x\in Y$. Now we simply integrate both sides over $X$ (or, equivalently, over $Y$) to get $n\leq C^2\mu(X)$. Hence we have a uniform bound on the size of any orthonormal system in $M$ which implies that $M$ is finite dimensional.