Solution (source code)

= Solution

<Associativity> of <matrix multiplication> identifies $(q_i^Tx)q_i=q_i(q_i^Tx)=(q_iq_i^T)x$. Thus each <matrix> \b[$P_i=q_iq_i^T$] has the required action and $x=\sum_iP_ix$.

Consequently $(\sum_iP_i-I_n)x=0$ for every $x$. Taking $x$ successively as the <standard basis> <vectors> shows that every column of this difference is zero. Hence \b[$\sum_{i=1}^nP_i=I_n$]. Equality on one selected <vector> would not suffice; here it holds on all <vectors>.