Orthogonal complement for a bilinear form (source code)

= Orthogonal complement for a bilinear form
{title2=$W^\perp=\{v:B(w,v)=0\text{ for all }w\in W\}$}

= Bilinear orthogonal complement
{synonym}

For a <bilinear form> $B$ on a <finite-dimensional vector space> $V$, the right <bilinear orthogonal complement> of a <vector subspace> $W$ is
$$
W^\perp=\{v\in V:B(w,v)=0\text{ for every }w\in W\}.
$$
It is a <vector subspace> by <linearity> in the second argument. For a general nonsymmetric <bilinear form>, left and right complements must be distinguished.

If $B$ is a <nondegenerate bilinear form>, the map $v\mapsto B(\mathord\cdot,v)$ is a <linear isomorphism> from $V$ to its <dual space>. It identifies $W^\perp$ with the <annihilator of a vector subspace> $W$, giving
$$
\dim W^\perp=\dim V-\dim W.
$$
If $B$ is also a <symmetric bilinear form> or an <alternating bilinear form>, reversing a zero pairing preserves zero. Hence $W\subseteq(W^\perp)^\perp$, and the <dimension> formula gives equality. \b[Nondegeneracy of the ambient form is required for this double-complement conclusion.] For the zero <bilinear form>, every complement is all of $V$, so a proper $W$ cannot be recovered that way.

Even in a nondegenerate ambient space, the restricted form can be degenerate. For $B(x,y)=x_1y_1-x_2y_2$ on $\mathbb R^2$, the line $W=\operatorname{span}\{(1,1)\}$ equals $W^\perp$. In general, for a <symmetric bilinear form> or an <alternating bilinear form>, the restricted <radical of a bilinear form> is $W\cap W^\perp$; quotienting $W$ by this <radical of a bilinear form> gives a <nondegenerate bilinear form>.