I am learning Linear Algebra through Professor Gilbert Strangs lectures on MIT OCW.
A concept I recently covered is finding the best solution to $ AX=b$ when $b$ does not lie in the column space of $A$. ($A$ has full column rank, but not full row rank)
$$AX=b ~~~~~~~~~~~~~~~(1)\\ A^TA \hat{X} = A^T b~~~~~(2)$$
We can't solve $(1)$ , so we solve $(2)$ instead.
Eq$(2)$ looks like $AX=b$ simply multiplied on both sides with $A^T$. One would naively assume that doing the same thing to both sides of an equation does not change the status quo, but clearly something is different because $X$ does not exist and $\hat{X}$ does. Further, $(2)$ can't be reversed to get back $(1)$ because $A^{-1}$ does not exist.
This leads me to conclude that:
An equation is guaranteed to be preserved when multiplied on both sides by a matrix only if that matrix is invertible.
Is this right? Are there other caveats to keep in mind while manipulating a matrix equation?