I am following MIT 18.06 lectures on linear algebra and would like to understand how one can show that $P^2 = P$ for a projection matrix.
I understand that for 2-d case:
$P = \frac{a a^t}{a^t a}$
$P^2 = \frac{a a^t}{a^t a} \frac{a a^t}{a^t a}$
I assume I should easily show it by using some properties of transpose matrices/vectors, but I couldn't quite figure out how to derive it.
(I am familiar with the proof that relies on trigonometric formulas)
Best Answer
What you are asking is indeed just some matrix calculation:
First note that $a^ta = |a|^2$ and that matrix multiplication is associative both with respect to scalars and the matrices themselves and that scalars can be put in front:
$$P^2 = \frac{a a^t}{a^t a} \frac{a a^t}{a^t a}=\frac 1{|a|^4}(a a^t)(a a^t)$$$$=\frac 1{|a|^4}(a \underbrace{(a^ta)}_{=|a|^2} a^t)=\frac{1}{|a|^2}aa^t=P$$