The problem:
Determine the orthogonal complement on $L^2[0,1]$ to all polynomials.
My approach and intuition thus far:
I know for sure intuitively that the orthogonal complement would just be the space containing the zero function. I have two approaches to the problem,
(1) I would use the Stone-Weierstrass Approximation theorem to show that the polynomials are dense in the space of functions on $C[0,1]$. Since $C[0,1]$ is dense in $L^2[0,1]$ the proof would follow by noting the property: Given a Hilbert Space $V$, the orthogonal complement has the property that: $V^\perp=\overline{V}^\perp$.
So then I would have to find the orthogonal complement to all functions which is just going to be the zero function.
(2) The other approach I had was to consider the orthogonal basis of all polynomials on $L^2[0,1]$. Then, I would just find the orthogonal complement of the basis.
Going with route (1) would be the easiest way to go. If I understand what you mean by (2), i.e., finding a maximal orthonormal set of polynomials and showing that this set of polynomials has no orthogonal complement, doesn't really gain you anything; you still need to show that the orthogonal complement of a set is zero, and you don't gain anything by only considering only an orthonormal subset.