Give an example of two \(4 \times 4\) nilpotent matrices which have the same minimal polynomial (they necessarily have the same characteristic polynomial) but which are not similar.
Solution
Take \[ A= \begin{pmatrix} 0&1&0&0\\ 0&0&0&0\\ 0&0&0&1\\ 0&0&0&0 \end{pmatrix}, \qquad B= \begin{pmatrix} 0&1&0&0\\ 0&0&0&0\\ 0&0&0&0\\ 0&0&0&0 \end{pmatrix}. \]
1. Both matrices are nilpotent with minimal polynomial \(x^2\).
Direct multiplication gives \[ A^2=0, \qquad B^2=0. \] Neither matrix is zero, so neither is annihilated by the polynomial \(x\). Hence both minimal polynomials are exactly \[ m_A(x)=m_B(x)=x^2. \] In particular both are nilpotent. Their characteristic polynomials are both \(x^4\), as also follows from nilpotence [@HK71].
2. The matrices are not similar.
The matrix \(A\) has two independent nonzero columns, so \[ \operatorname{rank}A=2. \] The matrix \(B\) has exactly one nonzero column, so \[ \operatorname{rank}B=1. \] Similarity preserves rank: if \(B=P^{-1}AP\), then left and right multiplication by invertible matrices do not change rank. Since the ranks differ, \(A\) and \(B\) cannot be similar.
Thus these are two \(4\times4\) nilpotent matrices with the same minimal and characteristic polynomials but different similarity classes.