TITLE: Finite dimensional subspace of $C([0,1])$
QUESTION [20 upvotes]: Let linear $S$ be a subspace of $C([0,1])$, i.e., the continuous real-valued
  functions on $[0,1]$. Assume that there exists $c>0$, such that
  $\|\,f\|_\infty\leq c \|\,f\|_2$, for all $f\in S$. Then show that $S$ is finite-dimensional.

This is equivalent to proving that the closed unit ball in $(S,\|\|_\infty)$ or in $(S,\|\|_2)$ is compact, but I can't derive this. 
Another thought is that the $L^2$ closure of $S$ is a subset of $C([0,1])$. Indeed, if $f_n\to f\in L^2$, then the given relation $\|f_n-f\|_\infty \leq c\|f_n-f\|_2$ implies that $f_n\to f$ in $L^\infty$, so $f$ is continuous. Therefore we have the inclusion
$$S\subset \overline{S}^{L^2}\subset C([0,1])\subset L^2$$
If $S$ was infinite dimensional, then $\overline{S}$ would be an infinite dimensional hilbert space, proper subset of $L^2$. 
Another thought is that all the $L^p$ norms on $S$ are equivalent (by Holder). If ALL norms are equivalent, then $S$ has to be finite dimensional.

REPLY [23 votes]: Let me provide a detailed proof:
Assume that $\{v_1,\ldots, v_n\}\subset S$ is an orthonormal set functions in $L^2[0,1]$, i.e., $\int_0^1 v_iv_j\,dx=\delta_{ij}$. For a fixed $a=(a_1,\ldots,a_n)\in\mathbb R^n$
we define the mapping $\varPhi_a :\mathbb R^n\to \mathbb R$ as
$$
\varPhi_a(x)=\sum_{j=1}^n a_jv_j(x).
$$
Then
$$
\|\varPhi_a\|_{L^2}^2=\int_0^2 \varPhi_a^2(x)\,dx=
\sum_{j,k=1}^n\int_0^1a_ja_kv_jv_k \,dx=\sum_{j=1}^n a_j^2=\|a\|^2,
$$
and thus, for every $x\in [0,1]$
$$
\lvert a_1v_1(x)+\cdots+a_nv_n(x)\rvert
=\lvert\varPhi_a(x)\rvert \le \|\varPhi_a\|_{L^\infty} \le c\|\varPhi_a\|_{L^2}\le c\|a\|,
$$
and as the above holds for every $a\in\mathbb R^n$, we conclude that
$$
v_1^2(x)+\cdots+v_n^2(x)\le c^2,\tag{1}
$$
for every $x\in [0,1]$. Here we have used the fact that, if $$\sum_{j=1}^n a_jb_j\le c\Big(\sum_{j=1}^n a_j^2\Big)^{1/2},$$ for all $a_1,\ldots,a_n$, then setting $a_j=b_j$, $j=1,\ldots,n$, we obtain that $\sum_{j=1}^n b_j^2\le c^2$.
Integrating $(1)$ over $[0,1]$ we obtain that
$$
n\le c^2.
$$
We have derived that $\,\dim S \le c^2$.
Note.
All the above can be easily generalized in the complex case.