I feel like this is very simple question, but I couldn't find the answer to it.
My question is given the least squares equation: $$(A^TA)^{-1}A^T\vec{b}$$ Why can't I simplify it to the following: $$A^{-1}A^{T^{-1}}A^T\vec{b} = A^{-1}I\vec{b} = A^{-1}\vec{b}$$
I know this is incorrect, or else they wouldn't teach it to us, but I'm wondering why. It seems like I've followed the rules. If I take the inverse of the product of 2 matrices, I get the inverse of both with the latter first. If I take the inverse of a matrix and multiply it by the original, I get the identity matrix.
Thank you for your time!
Note that, in the least square method, $A$ is a m-by-n matrix with $m>n$ then we can't simplify the expression $(A^TA)^{-1}A^T\vec{b}$ nor that of the corresponding m-by-m projection matrix $P=A(A^TA)^{-1}A^T$.