# $\text{det}(I-AB)=\text{det}(I-BA)$ [duplicate]

I want to show that for $n\times n$ matrices $A,B$ that $\text{det}(I-AB)=\text{det}(I-BA)$.

My thought is that since $AB$ and $BA$ have the same eigenvalues, I know they have they same minimal polynomial. If I can further show they have the the same characteristic polynomial, I'm done.

Is that true though? the characteristic polynomials for $A$ and $B$ respectively are $P_A(x)=(x-\lambda_1)^{c_1}...(x-\lambda_j)^{c_j}$ and $P_B(x)=(x-\lambda_1)^{d_1}...(x-\lambda_j)^{d_j}$ where $\lambda_q\neq\lambda_p$, $j\leq n$ and the superscripts are the dimensions of the the generalized eigenspaces. Is it true that $c_k=d_k?$

## marked as duplicate by Dietrich Burde, Chris Godsil, C. Falcon, M. Vinay, Sujaan KunalanJun 30 '16 at 15:03

• The easiest way is probably to first show it in case one of $A$ or $B$ is invertible (conjugate by it), then use that invertible matrices form a dense subset and the determinant is continuous. – Tobias Kildetoft Jun 30 '16 at 11:50
• I have seen something like that recently here Otherwise, the classical proof is due to Sylvester (Actually, as I see now he stated it in 1851 without a proof, perhabs the margins of his book were too small). – A.Γ. Jun 30 '16 at 11:54
• @A.G. Heh, that is indeed precisely the argument I had in mind. – Tobias Kildetoft Jun 30 '16 at 11:55
• The fact about characteristic polynomials is true. It follows easily from the very equality you are trying to prove (just replace $A$ with $\frac{1}{\lambda}A$). That doesn't really help you though. – Dan Shved Jun 30 '16 at 12:03
• @DanShved But the answer of N.S. really does help, though. – Dietrich Burde Jun 30 '16 at 12:04

Hint: $det(I-AB) = det\left(\begin{array}{c c} I & 0 \\ A & I-AB \end{array} \right)$