# Can two matrices with the same characteristic polynomial have different eigenvalues?

The polynomial is $-\lambda^3+3\lambda -2$

which factorizes into ($\lambda-1$)($\lambda +1$)($\lambda -2$)

A matrix A has the above characteristic polynomial, and so its eigenvalues are 1, -1, and 2.

However, another matrix B, already in diagonal form, has the same characteristic polynomial, but with eigenvalues 1,1,-2, i.e., diagonal entries 1,1,-2.

Is this possible? Or have I gone wrong in my computations?

The problem statement does ask to show that the characteristic polynomials are the same but that the matrices A and B are not similar. So, perhaps I have found exactly what I needed, but it just seems weird...

Thanks,

• If you get the same polynomial, it factors the same way. Thus, the eigenvalues are the same. There must be an issue with your computations. Dec 23, 2015 at 1:15
• The eigenvalues of a matrix are exactly the roots of the characteristic polynomial, so there must be a miscalculation somewhere. Howeover, it is true that two matrices can have the same characteristic polynomial without being similar. Dec 23, 2015 at 1:15

$-\lambda^3+3\lambda - 2 = -(\lambda-1)^2(\lambda+2) \neq -(\lambda-1)(\lambda+1)(\lambda-2)$.
• @User001 Plug in $\lambda=-1$ or $\lambda=2$. Do you get $0$? Dec 23, 2015 at 1:22
• If an $n$-dimensional matrix has $n$ distinct eigenvalues, then it is diagonalizable. Consequently, all $n$-dimensional matrices with this set of $n$ distinct eigenvalues are similar.