Sum of subspace and its orthogonal complement Let $V$ be a (not necessarily finite-dimensional) vector space (over a field $K$), $U$ a subspace of $V$ and $\beta\colon V \times V \to K$ a bilinear form. Define $U^\perp = \{v\in V : \beta(v,u)=0 \ \  \forall u \in U \}$ to be the (left) orthogonal complement of $U$. Which conditions do we need in order to get the identity $V = U + U^\perp$ or $V = U \oplus U^\perp$? I think one needs $U$ to be finite-dimensional and $\beta|_{U\times U}$ to be non-degenerate. Is it then possible for any given vector $v\in V$ to construct a (probably unique) vector $u\in U$ (dependent on $v$) such that $v-u\in U^\perp$, maybe via the map $v \mapsto \sum_{i=1}^m \beta(v,u_i)u_i $ for any given basis $\{u_1,\dotsc,u_m\}$ of $U$?
A more general thought:
The condition of $\beta|_{U\times U}$ being non-degenerate means that if $u\in U$ and $\beta(u,u')=0$ for all $u'\in U$ then $u=0$. So this is equivalent to $U\cap U^\perp = \{0\}$. If we ignore this condition, that means $U\cap U^\perp \ne \{0\}$, what do we still need for $V = U + U^\perp$?
 A: $\newcommand{\R}{\mathbf R}$
$\newcommand{\C}{\mathbf C}$
$\newcommand{\Q}{\mathbb Q}$
$\newcommand{\Z}{\mathbb Z}$
$\newcommand{\set}[1]{\{#1\}}$
$\newcommand{\lrset}[1]{\left\{#1\right\}}$
$\newcommand{\mc}{}$
$\newcommand{\rank}{\text{rank}}$
$\newcommand{\ann}{\text{Ann}}$
Until otherwise mentioned, $V$ is a finite dimensional vector space over a field $F$ and $f$ is a Bilinear form on $V$.
We will use $L^2(V, F)$ to denote the set of all the bilinear forms on $V$ and $\ann(W)$ will denote the annihilator of a subspace $W$ of $V$.
Fundamentals

Definition.
  For each $f\in \mc L^2(V;\ F)$ define $L_f:V\to V^*$ as 
  $$
 L_f(u)=g_u,\quad \forall u\in V
$$
  where $g_u\in V^*$ is define as
  $$
 g_u(v)=f(u,v),\quad\forall v\in V
$$

Similarly, for each $f\in \mc L^2(V,F)$ define $R_f:V\to V^*$
as
$$
 R_f(v)=h_v,\quad \forall v\in V
$$
where $h_v\in V^*$ is defined as
$$
 h_v(u)=f(u,v),\quad\forall u\in V
$$
It can be seen that $L_f$ and $R_f$ are linear transformations for each $f\in \mc L^2(V;\ F)$.
The following theorem is immediate:

Theorem.
      Let  $f\in \mc L^2(V;\ F)$.
      Then $\rank L_f=\rank R_f$.

Proof.
    Identifying $V^{**}$ with $V$, it can be easily seen that $L_f^t=R_f$.
$\blacksquare$

Definition.
      Let $f\in \mc L^2(V;\ F)$.
      Then the rank of $f$ is defined as 
      $$\rank f=\rank L_f=\rank R_f$$
      We say say that $f$ is non-degenerate if $\rank f=\dim V$.
      More generally, we say that $f$ is non-degenerate on a subspace $W$ of $V$ if $\rank L_{f|W}=\dim W$.

Orthogonality
Let $f\in \mc L^2(V;\ F)$.
Let $u$ and $v$ be two vectors in $V$.
We say that $u$ is perpendicular to $v$, written $u\perp v$, if $f(u,v)=0$.
Given subspace $W$ of $V$, we define the orthogonal complement of $W$ as $W^\perp=\set{u\in V:\ w\perp u\text{ for all } w\in W}$.
Note that $v\in W^\perp$ if and only if $R_fv\in \ann(W)$.

Theorem.
  Let $f$ be a non-degenerate bilinear form on a finite dimensional vector space $V$.
  Then for any subspace $W$ of $V$, we have $\dim(W)+\dim(W^\perp)=\dim(V)$.

Proof.
    Since $f$ is non-degenerate, we have $R_f:V\to V^*$ is an isomorphism.
    As just commented, we have $v\in W^\perp$ if and only if $R_fv\in W^\perp$.
    Thus $W^\perp=R_f^{-1}(\ann(W))$.
    Since $R_f$ is an isomorphism, we  have $\dim(R_f^{-1}(\ann(W)))=\dim(\ann(W))=\dim(V)-\dim(W)$.
    Thus $\dim(W^\perp)=\dim(V)-\dim(W)$, and we have the desired equality.
$\blacksquare$
The conclusion is no longer true if we drop the non-degenracy condition. This is because if we construct a bilinear form for which the image of $R_f:V\to V^*$ intersects $\ann(W)$ only in $0$, then we would have $W^\perp=0$
A: A friend of mine was able to construct a vector $u$ such that $v-u \in U^\perp$.
Assume that $U$ is finite-dimensional and $\beta|_{U\times U}$ is non-degenerate (which of course is equivalent to $U \cap U^\perp = \{0\}$). Now for any given basis $\{u_1, \dotsc, u_m\}$ of U consider the map $\phi\colon V \to U$ given by $v \mapsto \sum_{i=1}^m \beta(v,u_i)u_i$ as in my original post. How does the kernel of this map look like? We have $v \in \ker(\phi) \Leftrightarrow 0 = \phi(v) = \sum_{i=1}^m \beta(v,u_i)u_i \Leftrightarrow \forall i\in\{1,\dotsc,m\}\colon \beta(v,u_i)=0\Leftrightarrow v \in U^\perp$ (the second right implication is true because of linear independency). So we have $\ker(\phi) = U^\perp$ and it follows for the restriction $\phi|_U$ that $\ker(\phi|_U) = \ker(\phi) \cap U = U^\perp \cap U = \{0\}$ which means that $\phi|_U$ is injective. Since $U$ is finite-dimensional, it is also bijective.
Now consider the map $\psi \colon U \to V$ given by $u \mapsto  (\phi|_U)^{-1}(u)$. One can easy check the identity $\phi\circ\psi = \mathrm{id}_U$ and also $\mathrm{im}(\psi) = U$. Now let $v \in V$ be any vector, which we can write as $v = \psi\circ\phi(v) + (v - \psi\circ\phi(v))$. The first summand obviously is an element of $U$, the second one an element of $U^\perp = \ker(\phi)$ because of $\phi(v - \psi\circ\phi(v)) = \phi(v) - \phi \circ \psi \circ \phi(v) = \phi(v) - \mathrm{id}_U \circ\phi(v) = 0$.
So all in all, $\psi\circ\phi(v)$ is the vector I was searching for and one does not need $V$ to be finite-dimensional.
