Why is $P = I_N - \vec{1}\vec{1}^T/N$ a projection matrix, and $P^2=P$? Why is $P = I_N - \vec{1}\vec{1}^T/N$ a projection matrix, and $P^2=P$?
For example, for N=3 :
$$P = I_3 - \vec{1}\vec{1}^T/3 = \begin{pmatrix} 0.67 & 0.33 & 0.33 \\ 0.33 & 0.67 & 0.33 \\ 0.33 & 0.33 & 0.67 \\ \end{pmatrix} $$
and,
$$P^2 = \begin{pmatrix} 0.44 & 0.11 & 0.11 \\ 0.11 & 0.44 & 0.11 \\ 0.11 & 0.11 & 0.44 \\ \end{pmatrix} $$
But the text I am reading says P is supposed to be a projection matrix, for which $P^2 = P$ ?

For the general proof that it really is a projection, note that
$$P^2=\left(I_N - \frac{\vec{1}\vec{1}^T}{N}\right)^2=I_N-2\frac{\vec{1}\vec{1}^T}{N}+\frac{\left(\vec{1}\vec{1}^T\right)\left(\vec{1}\vec{1}^T\right)}{N^2}=I_N-2\frac{\vec{1}\vec{1}^T}{N}+\frac{\vec{1}\left(\vec{1}^T\vec{1}\right)\vec{1}^T}{N^2}=I_N-2\frac{\vec{1}\vec{1}^T}{N}+\frac{\vec{1}\cdot N\cdot\vec{1}^T}{N^2}=I_N-\frac{\vec{1}\vec{1}^T}{N}=P$$
since $\vec{1}^T\vec{1}=1\cdot1+1\cdot1+\dots+1\cdot1=N$
