# Is $\det(AB) =\det(BA)$

I am having trouble proving if $$\det(AB) = \det(BA)$$ is right or wrong. $A,B$ are square matrices.

Can you please point me to the right direction?

Thank you

-
Are $A$ and $B$ assumed to be square matrices, or just any rectangular matrices such that the product is square? –  Daniel Fischer Jun 21 at 19:35
@DanielFischer the matrices are square, I added it to the question –  Mark Jun 21 at 19:40
@DanielFischer, I'm curious why the doubt: since both $AB$ and $BA$ appear to be defined, they are required to be square (unless there is some obscure branch of algebra where it is possible otherwise? I can't imagine what that would be) –  Euro Micelli Jun 22 at 3:33
@EuroMicelli If $A$ is $n\times m$ and $B$ is $m\times n$, then $AB$ is $n\times n$ and $BA$ is $m\times m$, so they're both square, but of possibly different sizes, whereas $A$ and $B$ are not necessarily square. –  Ben West Jun 22 at 4:59
Note that this can fail if the sizes are different: the smaller matrix can be invertible, but the bigger one never can be: $rank(AB) \leq min(rank(A), rank(B))$. –  user137769 Jun 22 at 5:22
show 1 more comment

For square matrices $A, B$:$$\det(AB) = \det A \cdot \det B = \det B\cdot\det A = \det(BA)$$

To better understand why $\det(AB) = \det A \cdot \det B$, see this post:

-

Yes if $A$ and $B$ are two square matrices with the same size then

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

-