In this question, we assume that $M$ is invertible. Prove that $m = n$ and that $A$ and $B$ are invertible.