A bit of everything

# Any vector can be decomposed into one vector and another in its orthogonal complement

Theorem : Given any vector $v$ and another vector $u$, $\| u \| \neq 0$, $u$ generating the one-dimensional subspace $W = \textrm{Span}(u)$, then $v$ can be written as

$$v = \alpha u + w$$

with a unique $\alpha \in \mathbb{R}$ and a unique $w \in W^\perp$.

Proof : First project $v$ onto $u$, via

$$\mathrm{Proj_u(v)} = \frac{\langle v, u \rangle}{\langle u, u \rangle} u$$

If we decompose our vector $v$ via

$$v = \mathrm{Proj_u(v)} + (v - \mathrm{Proj_u(v)})$$

Then we need to show that the second part is orthogonal to $u$.

\begin{eqnarray} \langle v - \mathrm{Proj_u(v)}, u \rangle &=& \langle v, u \rangle - \langle \mathrm{Proj_u(v)}, u \rangle\\ &=& \langle v, u \rangle - \frac{\langle v, u \rangle}{\langle u, u \rangle} \langle u, u \rangle\\ &=& \langle v, u \rangle - \langle v, u \rangle\\ &=& 0 \end{eqnarray}

Now let's show that this decomposition is unique. Consider a second decomposition :

$$v = \alpha' u + w'$$

As $w'$ is orthogonal to $u$, we can just substract the two :

$$v - v= (\alpha - \alpha') u + (w - w')$$

Being in different subspaces, $\alpha - \alpha'$ remains in $W$ and $w - w'$ in $W^\perp$, and therefore each must be equal to zero independently. Our decomposition is therefore unique.