[Math] showing that 2 matrices are not similar

linear algebramatricesmatrix-rank

There are two $3\times 3$ matrices:
$$
A = \begin{bmatrix}
2 &-1 &-1\\
0& 1 &1\\
0 &0 &2
\end{bmatrix}
$$
$$
B =
\begin{bmatrix}
2 &-1 &1\\
0& 1 &1\\
0& 0& 2
\end{bmatrix}
$$
I need to show that these are not similar. They have the same determinant, rank and trace. I've tried to subtract with a matrix of the form $xI$ so that $x$ is a real number but that didn't work. Thanks in advance!

Best Answer

Hint. Look at the rank of $A - 2I$ and $B- 2I$.