This question already has an answer here:

$\mathbf{B = P^{^-1} A P} \iff$ ($\mathbf{B}$ is similar to $\mathbf{A}$)

I'm a little confused about matrix similarity. Let's say we have the following matrix $A$:


Its eigenvalues are $6$ and $-3$. Respective eigenvectors $\left<(5,4)\right>, \left<(-1,1)\right>$.

How do I find out whether its similar to another matrix (B)?

Let's say matrix $B$:


Trying to actually find the regular $P$ so that the equation would be satisfied seems like way too much calculating.

My idea is to try and diagonalize both of them - and if I end up with same eigenvalues on the diagonal (in whatever order), then they are both similar? (using the transitive property, since similarity is an equivalence).

Thank you in advance.


marked as duplicate by Kamil Jarosz, Pragabhava, user296602, SchrodingersCat, hardmath Jan 25 '16 at 18:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Your idea is correct and you can even use it to find the matrix $P$. Diagonalizing $A$, you will find $P_1$ such that $P_1^{-1} A P = D_1$ where $D_1$ is diagonal and the diagonal entries are the eigenvalues of $A$. Diagonalizing $B$, you will find $P_2$ such that $P_2^{-1} B P_2 = D_2$ with $D_2$ diagonal. If the matrices $A$ and $B$ have the same eigenvalues (counting with multiplicities), then you can arrange that $D_1 = D_2$ and then

$$ A = P_1 D_1 P_1^{-1} = P_1 D_2 P_1^{-1} = P_1 P_2^{-1} B P_2 P_1^{-1} = P^{-1} B P $$

where $P = P_2 P_1^{-1}$.

If $A$ and $B$ don't have the same eigenvalues, or $A$ is diagonalizable and $B$ is not or the other way around, then $A$ and $B$ won't be similar. If both $A$ and $B$ are not diagonalizable, you can bring them to a canonical form instead.

  • $\begingroup$ Thank you very much! You have explained it very clearly! Does that also mean that once a matrix is not diagonalizable - it is not similar to any matrix? $\endgroup$ – P. Lance Jan 25 '16 at 14:39
  • $\begingroup$ Nope - a non-diagonalizable matrix cannot be similar to a diagonalizable matrix but can be similar to many other non-diagonalizable matrices. $\endgroup$ – levap Jan 25 '16 at 14:48
  • $\begingroup$ Just checked it, you are right! Non-diagonalizable matrices are always similar to other non-diagonalizable matrices (multiplying non-D by any choice of regular inv(P) and P will result in another non-D matrix). Thanks a lot, really appreciate the help! :) $\endgroup$ – P. Lance Jan 25 '16 at 15:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.