Dimension of Orthogonal Complement With Respect to Bilinear Form

Theorem
Let $\mathbb K$ be a field.

Let $V$ be a vector space over $\mathbb K$ of finite dimension.

Let $f$ be a nondegenerate bilinear form on $V$.

Let $U\subset V$ be a subspace.

Let $U^\perp$ be its orthogonal complement.

Then $\dim(U) + \dim(U^\perp) = \dim(V)$.