# Prove:$A B$ and $B A$ has the same characteristic polynomial. [duplicate]

Suppose $A B$ are all $n\times n$ matrix. Prove:$A B$ and $B A$ has the same characteristic polynomial.

• If A is invertible

\begin{align}P(A B)=|\lambda E-A B|=\left|\lambda A\cdot A^{-1}-A B\right|=\left|A\left(\lambda A^{-1}-B\right)\right|=\left|A\left\|\text{$\lambda$A}^{-1}-B\right.\right|\end{align}

\begin{align}P(B A)=|\lambda E-B A|=\left|\lambda A^{-1}\cdot A-B A\right|=\left|\left(\lambda A^{-1}-B\right)A\right|=\left|\left.\text{$\lambda$A}^{-1}-B\right\|A\right|\end{align}

Is it true?

• If A is not invertible

How to prove?

## Edit:

I found a proof by Block Matrix Multiplication, it's more straightforward, is it right?

\begin{align}\left( \begin{array}{cc} E & 0 \\ -A & E \\ \end{array} \right).\left( \begin{array}{cc} \lambda E & B \\ \lambda A & \lambda E \\ \end{array} \right)=\left( \begin{array}{cc} \lambda E & B \\ 0 & \lambda E-A B \\ \end{array} \right)\end{align}

\begin{align}\left( \begin{array}{cc} \lambda E & B \\ \lambda A & \lambda E \\ \end{array} \right).\left( \begin{array}{cc} E & 0 \\ -A & E \\ \end{array} \right)=\left( \begin{array}{cc} \lambda E-B A & B \\ 0 & \lambda E \\ \end{array} \right)\end{align}

Another proof is by Sylvester determinant theorem which uses LU block decomposition.

Fill two matrices $A$ and $B$ with $2n^2$ distinct indeterminates. Observe $A$ and $B$ are invertible in the field $F=K(a_{ij},b_{ij})$ formed by adjoining these formal variables. Hence $\chi_{AB}(T)=\chi_{BA}(T)$ holds in the field $F[T]$ and so in the subring $K[a_{ij},b_{ij}][T]$, after which we can simply apply the evaluation map so that $\chi_{AB}(T)=\chi_{BA}(T)$ holds for any two matrices $A$ and $B$ with entries taken in $K$.

The beauty of this "universal" argument is that it bypasses the analytic concept of density, instead working purely algebraically and applying to any desired field $K$.

• However, a dense set in the Zariski topology is implicitly used to show that $A$ and $B$ are invertible matrices over $F$ (their determinants being nonzero). Oct 6, 2013 at 6:26
• This is like using an atomic bomb to kill a fly. Oct 6, 2013 at 6:27
• @Raskolnikov The tools used would be considered flies in the broader context of modern algebra.
– anon
Oct 6, 2013 at 6:28
• @MarcvanLeeuwen Would you say the fact that $x$ is nonzero in $K(x)$, where $x$ is an indeterminate, uses Zariski topology implicitly?
– anon
Oct 6, 2013 at 6:29
• @Raskolnikov This reminds me of the legal proverb "Die Polizei soll nicht mit Kanonen auf Spatzen schießen" (Fritz Fleiner, Institutionen Des Deutschen Verwaltungsrecht, 8. Aufl., Tübingen, 1928). Oct 6, 2013 at 9:43

If $A$ is not invertible, $A_t=A+tI_n$ is invertible except for finitely many values of $t$. In particular, there is $\varepsilon > 0$ such that $A_t$ is invertible for every $t\in ]0,\varepsilon[$.

We therefore have $P(A_tB)=P(BA_t)$. Making $t\to 0$, we deduce $P(AB)=P(BA)$.

• If $A$ is not invertible, $A_t=A+tI_n$ is invertible except for finitely many values of $t$. In particular, there is $\varepsilon > 0$ such that $A_t$ is invertible for every $t\in ]0,\varepsilon[$. Is this because $Gl(n, R)$ is dense in $M(n,R)$? Thank you. Nov 27, 2020 at 8:05
• @EmmyRahman This is because $\det(A_t)$ is a monic polynomial in $t$ with degree $n$, so it has at most $n$ roots. This also shows that $Gl(n,R)$ is dense in $M(n,R)$. Nov 27, 2020 at 9:10
• Thank you very much. I am sorry for this naive question, but I was stuck with this little thing. Thank you agian. Nov 27, 2020 at 9:26

One way to do this is to note that $P(AB)-P(BA)$ is a polynomial in the entries of $A$ and $B$. You have shown that this vanishes for all invertible $A$, and want to show that it is precisely the zero polynomial. It suffices to note that the set of invertible $n\times n$ matrices over $\mathbb R$ or $\mathbb C$ is dense, and since polynomials are continuous it follows that $P(AB)-P(BA)$ is zero everywhere and thus the zero polynomial.