Proposition (orthogonal projection and basis)
Following the notation here, if $\set{e_1, \ldots, e_k}$ is an orthonormal basis for $W$, then $$ \begin{align*} \pi_W(v) = \sum_{i=1}^{k} \langle v, e_i\rangle e_i \qquad \text{for all }v\in V. \end{align*} $$