[Math] Does $V=W\oplus W^\perp$ hold when $W$ is infinitely-dimensional

inner-productslinear algebraorthogonality

Let $V$ be an inner product space over $F$. Let $W$ be a subspace of $V$. I saw that Axler's Linear Algebra Done Right claimed that if $W$ is finite-dimensional, then $V=W\oplus W^\perp$. It is trivial that $W\cap W^\perp=\{0\}$ is always true. So let us focus on $V=W+W^\perp$. As you can see in the picture, the proof for $V=W+W^\perp$ used the fact that $W$ is finite-dimensional. However, does $V=W+W^\perp$ hold when $W$ is infinite-dimensional? If so, how to prove it?

Update: I also wonder that if $W$ is finite-dimensional, must $W^\perp$ be finite-dimensional or infinite-dimensional?

reference:
enter image description here

Best Answer

Consider the space $V=C[0,1]$ of continuous function $[0,1]\to\Bbb R$ with inner product $\langle f,g\rangle:=\int_0^1f(t)g(t)\,\mathrm dt$ and $W$ the subspace of polynomial functions. Then $W^\perp=\{0\}$.