Is $A(AA^T)^{-1}A^T$ a diagonal matrix? $A$ is a $n\times k$ matrix with rank $k<n$. I was wondering if $A(A^TA)^{-1}A^T$ a diagonal matrix where $k$ entries are one and other entries are zero.
I'm not sure if this is correct. If this is correct, how to prove it?

My first instinct would be to try out an example or two, using (for instance) WolframAlpha. Then, once I had gotten the correct order of transopses and non-transopses so that all the dimensions line up and make sense, I would see that it is not the case:

