Im studying Projection matrix (linear algebra) and I understood that projection matrix onto line a can be calculated as:
$\cfrac{a a^T}{a^T a}$
I know that multiplying any vector to this matrix calculates the projection onto the line a, but I want to know why.
I tried to search, but i couldn't find any help me plz
Hint:
If $x=v+w$ with $v$ parallel to $a$ and $w$ perpendicular to $a$, then compute what your matrix does to $x$. Use that $a^T w=0$ and that $v=ka$ for some $k$.
Edit: The proof you need depends heavily on your base assumptions of what projection is.