# 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. –  000 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

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)$$

-

Sketch of proof: You're probably overthinking this because matrices don't commute in general. It turns out it's irrelevant in this case. The key fact here is that even though matrices do not in general commute, the determinant is a real valued function. So det(A) and det(B) are real numbers and multiplication of real numbers is commutative regardless of how they're derived. So det(A)det(B) = det(B)det(A) regardless of whether or not AB=BA.So if A and B are square matrices, the result follows from the fact det (AB) = det (A) det(B).

You should be able to finish the proof,no problem now.

-