# Proving the invertibility of matrices $AB$ and $BA$

Prove the following statement or give a counterexample if it is false.

If $$A$$ is an $$m\times n$$ matrix and $$B$$ is an $$n\times m$$ matrix then $$AB$$ is invertible if and only if $$BA$$ is invertible.

What i tried:

I mentioned that it is true

To prove the forward implication

$$\det(AB)=\det(A)\det(B)\neq 0$$

Then $$\det(A)\det(B)=\det(B)\det(A)=\det(BA)\neq 0$$

Hence $$BA$$ is invertible

We do the same to prove the backward implication

$$\det(BA)=\det(B)\det(A)\neq 0$$

Then $$\det(B)\det(A)=\det(A)\det(B)=\det(AB)\neq 0$$

Hence $$AB$$ is invertible

Is my proof correct? Could anyone explain. Thanks

It's not correct. You cannot speak of the determinants of $A$ and $B$ when they are not square.
• But since $AB$ and $BA$ are defined, both $A$ and $B$ are square matrices. Sep 19 '15 at 14:46
• @Scientifica No. E.g. $A=(1,0),\ B=\pmatrix{1\\ 0}$ give $AB=1,\ BA=\pmatrix{1&0\\ 0&0}$. Sep 19 '15 at 14:48
• @Scientifica No. If $A$ is $n\times m$ and $B$ is $m\times n$ then both $AB$ and $BA$ are defined (and square) even if $n\ne m$. Sep 19 '15 at 14:49
• @yswong Determinant is defined for square matrices only. Your proof works if $m=n$, but this is not a given condition. Sep 19 '15 at 14:49