Let $f_1,f_2,...,f_k$ be pairwise orthogonal nonzero vectors of $R^n$. Show that $ P = \frac{f_1f_1^T}{f_1^Tf_1} + \frac{f_2f_2^T}{f_2^Tf_2} + ... + \frac{f_kf_k^T}{f_k^Tf_k}$ is a projection matrix.
So, my textbook shows me that the definition of a projection matrix is $ P = PP$ but how do I use that to complete this proof?
Just to simplify notation a bit, let $g_i = f_i / \lVert f_i \rVert$, so that the expression becomes
$$P = \sum_i g_ig_i^T.$$
Now, choose an orthonormal basis for $\mathbb{R^n}$ of the form $(g_1 \dots, g_k, e_{k+1}, \dots, e_n)$ for some suitable $e_{k+1}, \dots, e_n$. We are done, if we can show that $Pv = PPv$ for each of these basis vectors. If $v = e_j$ for some $j$, then
$$Pv = Pe_j = \sum_i g_ig_i^Te_i = \sum_i g_i 0 = 0,$$
and therefore also $PPv = P0 = 0$. If on the other hand $v = g_j$ for some $j$, then
$$Pv = Pg_j = \sum_i g_ig_i^Tg_j = g_jg_j^Tg_j = g_j,$$
and $PPg_j = Pg_j$.