We denote by $\mathbf{e}$ the matrix of $\mathcal{M}_{n,1}(\mathbb{R})$ whose coefficients are all equal to 1, and $P$ the matrix of order $n$ defined by
$$P = I_n - \frac{1}{n} \mathbf{e} \cdot \mathbf{e}^T.$$
Show that $P$ is symmetric and that the endomorphism of $\mathbf{R}^n$ canonically associated is an orthogonal projection onto $\operatorname{Vect}(\mathbf{e})^\perp$.