An important fact about the category of vector spaces is that all exact sequences split. That is, if we have a short exact sequence
we can find a linear map from to which lets us view it as a subspace of , and we can write . When we have an inner product around and is finite-dimensional, we can do this canonically.
What we’ll do is define the orthogonal complement of to be the vector space
That is, consists of all vectors in perpendicular to every vector in .
First, we should check that this is indeed a subspace. If we have vectors , scalars , and a vector , then we can check
and thus the linear combination is also in .
Now to see that , take an orthonormal basis for . Then we can expand it to an orthonormal basis of . But now I say that is a basis for . Clearly they’re linearly independent, so we just have to verify that their span is exactly .
First, we can check that for any between and , and so their span is contained in . Indeed, if is a vector in , then we can calculate the inner product
since and . Of course, we omit the conjugation when working over .
Now, let’s say we have a vector . We can write it in terms of the full basis as . Then we can calculate its inner product with each of the basis vectors of as
Since this must be zero, we find that the coefficient of must be zero for all between and . That is, is contained within the span of
So between a basis for and a basis for we have a basis for with no overlap, we can write any vector uniquely as the sum of one vector from and one from , and so we have a direct sum decomposition as desired.