Q:

Prove vector space is the direct sum of subspace and its orthogonal complement

$V$ is finite-dimensional over $\Bbb{C}$ and the form $\langle \cdot , \cdot \rangle$ is Hermitian. $U$ is a subspace of $V$.
Show that $V = U \oplus U^\perp$

I've been able to show that $U \cap U^\perp = \{0\}$. I don't know how to approach the problem showing that every vector $v\in V$ can be written as $v = u + u'$, where $u, u'$ are in $U$ and $U^\perp$ respectively.

A:

Let $\{e_1,\ldots,e_k\}$ be an orthonormal basis of the subspace $U$. For each $v\in V$, let$$P(v)=\sum_{j=1}^k\langle v,e_j\rangle e_j.$$Then$$(\forall v\in V):v=\overbrace{P(v)}^{\phantom{U}\in U}+\overbrace{\bigl(v-P(v)\bigr)}^{\phantom{U^\perp}\in U^\perp}.$$The fact that $v-P(v)\in U^\perp$ can be justified as follows: if $j\in\{1,2,\ldots,k\}$, then\begin{align}\bigl\langle v-P(v),e_j\bigr\rangle&=\left\langle v-\sum_{l=1}^k\langle v,e_l\rangle e_l,e_j\right\rangle\\&=\langle v,e_j\rangle-\langle v,e_j\rangle\\&=0.\end{align}Since $\{e_1,\ldots,e_k\}$ is a basis of $U$, this proves that $v-P(v)\in U^\perp$.

