Are the matrices \[ A=\begin{pmatrix} 1&0&0\\ -1&1&1\\ -1&0&2 \end{pmatrix}, \qquad B=\begin{pmatrix} 1&1&0\\ 0&1&0\\ 0&0&2 \end{pmatrix} \] similar?
Solution
1. One has\[ \operatorname{rank}(A-I)=1. \]
Subtracting the identity gives \[ A-I= \begin{pmatrix} 0&0&0\\ -1&0&1\\ -1&0&1 \end{pmatrix}. \] The two nonzero rows are equal, so the row space is one-dimensional.
2. One has\[ \operatorname{rank}(B-I)=2. \]
Here \[ B-I= \begin{pmatrix} 0&1&0\\ 0&0&0\\ 0&0&1 \end{pmatrix}. \] Its first and third rows are nonzero and linearly independent, so its rank is \(2\).
3. If two matrices \(M,N\) are similar, then\[ \operatorname{rank}(M-I)=\operatorname{rank}(N-I). \]
If \[ M=PNP^{-1} \] for some invertible matrix \(P\), then \[ M-I=P(N-I)P^{-1}. \] Multiplication on either side by an invertible matrix does not change rank.
4. Therefore\[ \boxed{A\text{ and }B\text{ are not similar}}. \]
If \(A\) and \(B\) were similar, step 3 would force \[ \operatorname{rank}(A-I)=\operatorname{rank}(B-I), \] contradicting steps 1 and 2.
5. Q.E.D.
Step 4 answers the question.