Problem
The ground field is $K$, $\operatorname{char}K\neq2$. Suppose $W$ is a (maybe infinite dimensional) subspace of a vector space $V$ with a symmetric/symplectic form $\langle\cdot,\cdot\rangle$. The orthogonal space of $W$, denoted as $W^\perp$, is defined as $W^\perp=\{\,v\in V\,\colon\,\langle v,w\rangle=0,\forall w\in W\,\}$. If the form is nondegenerate on $W$, say $W\cap W^\perp=\{0\}$, is it true that $V=W\oplus W^\perp$? What if the form is nondegenerate on $V$?
Background
The statement is true when $W$ is finite dimensional. One can choose an orthogonal basis for $W$, then apply the projection formula to determine a orthogonal projection. However, such a process couldn't be applied in the infinite dimensional case. I'm interested in how far we can generalize our results of psuedo-Euclidean or symplectic forms on a finite dimensional vector space to the infinite-dimensional case.
Counter-example
$K=\Bbb R$ and $V=\mathcal C([0,1]),\Bbb R)$. If $f,g\in E$, we put $\langle f,g\rangle=\int_0^1 f(t)g(t)dt$ and let $V=\{f \in W: f(0)=0\}$. We have $V^\bot=\{0\}$
Proof: Suppose $f \in V^\bot$. Let $g\in E$ such that $g:t\mapsto t f(t)$. Then $g \in V$. By definition of $f \in V^\bot$ we have $\langle f,g\rangle=0$ which gives $\int_0^1 tf^2(t)dt=0$
Since $tf^2(t)$ is continuous and positive we have $\forall t \in [0,1]\quad tf^2(t)=0$ then $f=0$ on $]0,1]$ and on $[0,1]$ by continuity at point $0$.