$\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$