I have a really stupid question. We know the solution of regression coefficient is the following $$ \hat\beta = (X^tX)^{-1}X^tY $$
Can I further expand this into the following ? $$ \hat\beta = (X^tX)^{-1}X^tY = X^{-1}(X^t)^{-1}X^tY = X^{-1}IY = X^{-1}Y$$
What is wrong in this?
Note that usually when dealing with regression $X$ is not a square matrix thus we can’t simplify the expression .