I am trying to solve this old exam question: Show that $P = A(A^TA)^{-1}A^T$ is a projection matrix if $A = \begin{bmatrix}1 \\ m\end{bmatrix}$. I don't understand what I'm doing wrong here: $P = A(A^{-1}{A^T}^{-1}) A^T \implies P = (AA^{-1})({A^T}^{-1} A^T) \implies P = I$
However, if I actually multiply it out, I do get the projection matrix. Obviously $I$ is not a projection matrix, but I'm not sure what I'm doing wrong to get the identity though.