Maths WorkshopMaths problems with full solutions
Exercise 1350Topology › Topology of Mn(ℝ) › Density and closuresL3Added 6 Nov 2026

AB and BA have the same characteristic polynomial

#characteristic polynomial#density#similarity

Statement

Show that χAB=χBA\chi_{AB}=\chi_{BA} for all A,B∈Mn(R)A,B\in M_n(\mathbb{R}).

Hint

If AA is invertible, ABAB and BABA are similar.

Show solutionHide solution

Solution

Invertible AA. If A∈GLn(R)A\in GL_n(\mathbb{R}), then
A(BA)A−1=ABAA−1=AB,A(BA)A^{-1}=ABAA^{-1}=AB,
so ABAB and BABA are similar, and similar matrices have the same characteristic polynomial: χAB=χBA\chi_{AB}=\chi_{BA}.

General AA. Fix BB and consider F(A)=χAB−χBAF(A)=\chi_{AB}-\chi_{BA}, whose coefficients are polynomials in the entries of AA (the coefficients of χM\chi_M are polynomials in the entries of MM, and ABAB, BABA are linear in AA). So FF is continuous. It vanishes on GLn(R)GL_n(\mathbb{R}), which is dense in Mn(R)M_n(\mathbb{R}) (det⁡\det is a nonzero polynomial). Hence F≡0F\equiv0.

Check. For A=(1000)A=\begin{pmatrix}1&0\\0&0\end{pmatrix} and B=(0100)B=\begin{pmatrix}0&1\\0&0\end{pmatrix}: AB=BAB=B and BA=0BA=0, which are *not* similar (different ranks), yet χAB=χBA=X2\chi_{AB}=\chi_{BA}=X^2.

Remark. Consequently tr⁡(AB)=tr⁡(BA)\operatorname{tr}(AB)=\operatorname{tr}(BA) and ABAB, BABA have the same nonzero eigenvalues with the same algebraic multiplicities. For non-square A∈Mn,pA\in M_{n,p}, B∈Mp,nB\in M_{p,n} one gets XpχAB=XnχBAX^p\chi_{AB}=X^n\chi_{BA} in the same way (pad with zeros). Lesson. When invertibility makes a problem trivial, density gives the rest.