Properties of symmetric projection matrices 
A square matrix $P$ is called a symmetric projection matrix if $P = P^T$ and $P ^2 = P$. Show that a symmetric projection matrix $P$ satisfies the following properties.

*

*$\|x\|^2=\|Px\|^2+\|(1-P)x\|^2$ for all $x$


*$P$ is positive semidefinite


Let $\langle -,- \rangle$ be the standard dot product. 
Hint: For the first part try writing both sides in terms of the dot product and expanding using linearity. Notice $\langle x, Px \rangle = \langle Px, x \rangle$  since $P$ is symmetric. 
For the second part you can use a similar trick to above, this time replacing the $P$ in the dot product you get with $P^2$.
