If $AB=I_n $ and $BA=I_m$ how would I prove that $m=n$?
I'm not sure if my proof is correct but this is what I have done so far:
$$tr(AB)=tr(I_n)$$
$$tr(BA)=tr(AB)=n$$
$$tr(I_m)=m=tr(AB)=tr(BA)=n$$
therefore $m=n$
However, I do not feel that this proof is legitimate and can be improved on. Any suggestions?
Your proof is perfectly legitimate and correct.
A more elementary proof would be: $A B = I_n$ implies $\operatorname{rk} A = n$, $B A = I_m$ implies $\operatorname{rk} B = m$. Assume $m \leq n$. Then, $n = \operatorname{rk} I_n = \operatorname{rk} (A B) \leq \operatorname{rk} (B) = m$. Therefore $m = n$.