# Same Eigenvalues = Similar Matrices?

While watching Strang's lecture on similar matrices he stated that if any two matrices,$$A$$ and $$B$$, have the same eigenvalues then they can be put in the form $$A=P B P^{-1}$$ . This is very easy to see when $$B$$ is the diagonal matrix housing $$A's$$ eigenvalues. In this example $$A$$ and $$B$$ are not diagonal matrices.

But if this is not the case and say we are in $$R^2$$ and if $$A$$ has eigenvectors $$v_1$$ and $$v_2$$ with eigenvalues $$\lambda_1$$ and $$\lambda_2$$ and a angle of $$\theta$$(say 30 degrees) from each other. And $$B$$ has the same eigenvalues but they make some angle $$\theta_2$$(say 120 degrees) then how can I intuitively see that they are similar?

The intuition for similar matrices is often said as "they are the same transformation just in different basis". This is easy to see if the $$\theta's$$ are same as then $$P$$ is just a rotation matrix but I want to understand why its true for all matrices of equal eigenvalues. And how can this $$P$$ then be found?

Edit: Please dont state the example of a matrix having all equal eigenvalues and not being similar to identity. This is stated and we are assuming distinct eigenvalues for this question.

• See the edit of my question. – Rahul Deora Aug 21 '19 at 18:32
• In this example $A$ and $B$ are NOT diagonal matrices. – Rahul Deora Aug 21 '19 at 18:37
• Yes thanks. Would you comment on how the $\theta's$ play a role here? The space is stretched a bit differently by both would'nt you say? – Rahul Deora Aug 21 '19 at 18:40

No. Edit: Unless the eigenvalues are distinct and then yes.

Let $$A\in\mathcal{M}_2(\mathbb{R})$$ be the Jordan block

$$A=\begin{bmatrix}1 & 1\\0 & 1\end{bmatrix}$$

The eigenvalues of $$A$$ are $$\lambda_1=\lambda_2 = 1$$.

On the other hand the identity matrix $$I$$ also have two eigenvalues $$\lambda_1=\lambda_2=1$$.

But clearly $$A,I$$ are not similar as $$I$$ is the only matrix that similar to $$I$$ indeed $$PIP^{-1} = I$$.

Edit: If $$A$$ has $$n$$ distinct eigenvalues then $$A$$ is diagonalizable (because it has a basis of eigenvalues). Two diagonal matrices with the same eigenvalues are similar and so $$A$$ and $$B$$ are similar.

• Thanks but see the edit of my question. – Rahul Deora Aug 21 '19 at 18:32
• @RahulDeora If all eigenvalues are distinct then the matrices are diagonalizable (See my edit). You can find a proof here www2.math.uconn.edu/~khlee/Teaching/LAlg/MAT223-8.pdf – Yanko Aug 21 '19 at 18:36
• In this example $A$ and $B$ are NOT diagonal matrices. – Rahul Deora Aug 21 '19 at 18:37
• @RahulDeora I don't understand. If the eigenvalues are not necessarily distinct then the claim is wrong and I gave a counter-example. However if the eigenvalues are distinct then the eigenvectors are linearily independent and therefore form a basis in this case both $A$ and $B$ are diagonalizable (Not diagonal!) and so similar. By diagonalizable I mean that there is $P$ such that $PAP^{-1}$ is diagonal – Yanko Aug 21 '19 at 18:38
• Yes I got it now. Yes thanks. Would you comment on how the 𝜃′𝑠 play a role here? I think it is easy to when they are equal but a bit more tricky when they are unequal. – Rahul Deora Aug 21 '19 at 18:41

If matrix A has distinct eigenvalues then there exist a matrix P such that $$A= PDP^{-1}$$ where D is the diagonal matrix with the eigenvalues on its diagonal. If matrix B has the same eigenvalues then there exist a matrix Q such that $$B= QDQ^{-1}$$. From that $$Q^{-1}BQ= D$$. Replace D in the first equation with that: $$A= P(QBQ^{-1})P^{-1}= (PQ)B(PQ)^{-1}$$.