## Determine whether two matrices are similar

Determine which of the following matrices are similar: $A_1 = \begin{bmatrix} -1 & 4 & -1 \\ 2 & -1 & 3 \\ 0 & -4 & 3 \end{bmatrix}$, $A_2 = \begin{bmatrix} -3 & -4 & 0 \\ 2 & 3 & 0 \\ 8 & 8 & 1 \end{bmatrix}$, $A_3 = \begin{bmatrix} -3 & 2 & -4 \\ 2 & 1 & 0 \\ 3 & -1 & 3 \end{bmatrix}$, and $A_4 = \begin{bmatrix} -1 & 4 & -4 \\ 0 & -3 & 2 \\ 0 & -4 & 3 \end{bmatrix}$.

Okay, these matrix computations are getting to be excruciating to do by hand. I’m going to completely wimp out and use a CAS to find the matrices $P$ such that $P^{-1}AP$ are in Jordan canonical form. The good news is that this does not render the proof incomplete, since we can easily verify that $P^{-1}AP$ is in JCF. I wanted to get my hands dirty (so to speak) actually using the algorithm, but now that I’ve got a handle on it I’ll use a computer.

Note: WolframAlpha can compute the Jordan Canonical Form of a matrix with the syntax ‘jordan form A’ where A is a matrix in the form [[r11,r12,…,r1n],[r21,r22,…,r2n],[rn1,rn2,…,rnn]]. (Example.)

Let $P_1 = \begin{bmatrix} -1 & 0 & -1 \\ 1 & 0 & 3/2 \\ -2 & -2 & -1 \end{bmatrix}$, $P_2 = \begin{bmatrix} -1 & -1 & 0 \\ 4 & 4 & 1 \\ 1 & 2 & 0 \end{bmatrix}$, $P_3 = \begin{bmatrix} -2 & 1 & -2 \\ 2 & -1 & 3 \\ -1 & 1 & -2 \end{bmatrix}$, and $P_4 = \begin{bmatrix} 0 & 2 & -1 \\ 1 & -2 & 2 \\ 0 & -1 & 1 \end{bmatrix}$. Evidently then we have $P_1^{-1}A_1P_1 = P_3^{-1}A_3P_3 = \begin{bmatrix} -1 & 0 & 0 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{bmatrix}$, $P_2^{-1}A_2P_2 = \begin{bmatrix} -1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$, and $P_4^{-1}A_4P_4 = \begin{bmatrix} -1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$. These products are in Jordan canonical form (obviously). So $A_1$ and $A_3$ are similar, and $A_2$ and $A_4$ are not similar to each other or to $A_1$.