$\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$:
\begin{bmatrix}2&5\\4&1\end{bmatrix}
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$:
\begin{bmatrix}4&5\\1&4\end{bmatrix}
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.