Let $w_1,...,w_n$ be any basis of the subspace $W \subset \mathbb{R^m}$. Let $A = (w_1,...,w_n)$ be the $m$ x $n$ matrix whose columns are the basis vectors, so that $W = rngA$ and $rankA=n$. Let $P = A(A^TA)^{-1}A^T$ be the corresponding projection matrix.
a.) Prove that the orthogonal projection of $v \in \mathbb{R^n}$ onto $w \in W$ is obtained by multiplying by the projection matrix: $w=Pv$.
b.) Show that if $A=QR$, then $P = QQ^T$. Why is $P \ne I$?
How will I be able to prove these?