# On matrices that almost have the same eigenvalues

Let $$A$$ and $$B$$ be two $$4\times 4$$ matrices. Using Newton's identities, one can prove that if $$\det(A) = \det(B)\quad \text{and}\quad \mathrm{tr}(A^i) = \mathrm{tr}(B^i)$$ for $$i=1,2,3$$, then $$A$$ and $$B$$ have the same characteristic polynomial, thus the same eigenvalues.

I'm interested in pairs of matrices $$A$$ and $$B$$ that satisfy all those equations except the last one, i.e. $$\det(A)=\det(B)$$ $$\mathrm{tr}(A)=\mathrm{tr}(B)$$ $$\mathrm{tr}(A^2)=\mathrm{tr}(B^2)$$ but $$\mathrm{tr}(A^3) \neq \mathrm{tr}(B^3)$$.

Does anyone know how to generate such matrices? Have they ever been studied? A reference would be nice.

• Isn't that just saying that the characteristic poly's of A and B differ only in the linear term? That gives an easy way to generate such matrices :) Jun 17 '10 at 16:27
• Yes I was making some additional assumptions unthinkingly t3suji, thanks. Maybe I'll have another go if Malik tells us what kind of properties he/she is interested in. Jun 17 '10 at 20:14
• Perhaps it would be an interesting question to ask that all the eigenvalues of both matrices be integers? Nov 4 '20 at 22:15

Such matrices will have a characteristic polynomial $z^4+a_3z^3+a_2z^2+a_1z+a_0$ with the same $a_3$, $a_2$, $a_0$ but distinct $a_1$. You can generate a plenty of diagonal such matrices by picking roots of such two polynomials. I cannot vouch that they were not studied but I am pretty certain that nothing groundbreaking came out of such studies.