Are two invertible diagonalisable matrices with the same eigenvalues similar

diagonalizationeigenvalues-eigenvectorslinear algebra

I wanted to know if the following statement is true or false: are two invertible diagonalisable matrices with same eigenvalues similar?

My answer is no by considering the following diagonal matrices:

$$\begin{pmatrix} 1 && 0 && 0 \\ 0 && 2 && 0 \\ 0 && 0 && 2 \end{pmatrix} \text{ and } \begin{pmatrix} 1 && 0 && 0 \\ 0 && 1 && 0 \\ 0 && 0 && 2 \end{pmatrix}$$

Both are invertible ($\det \neq 0$) and obviously diagonalisable. They also have the same eigenvalues (with different multiplicities but nothing is imposed on the multiplicity). They are not similar because they do not have the same determinant and two similar matrices must have the same determinant.

Is this counterexample correct?

Best Answer

I would say that your counter-example is correct under your understanding of the terminology, but under what I believe to be a more common interpretation, you're incorrect.

The issue is that if someone tells me two matrices have the same eigenvalues, I assume that they mean counting multiplicity, so that if one matrix has eigenvalues $1,2,2$ then the one with the same eigenvalues must have eigenvalues $1,2,2$, not $1,1,2$.

Under this understanding, it is indeed true that two diagonalizable matrices with the same eigenvalues are similar. Write them as:

$$A_1 = P_1 D_1 P_1^{-1},$$

$$A_2 = P_2 D_2 P_2^{-1}.$$

If the diagonal elements on the two diagonal matrices are in the same order, then we can see similarity as

$$A_1 = P_1 P_2^{-1} D_2 P_2 P_1^{-1} = P_1 P_2^{-1} D_2 (P_1 P_2^{-1})^{-1}$$.

If the diagonal elements happen to be in different orders, you can just use permutation matrices to swap the order. For example, applying a matrix permuting rows $i,j$ on both sides (this matrix is its own inverse) will swap the $(ii),(jj)$ elements of the diagonal matrix.