# $A$ square matrix, $\mathrm{rank}(A)=3,$ characteristic polynomial of A is $x^2(x-1)(x-2) \Rightarrow A$ is diagonalizable

I've been trying to prove or disprove the following statement:

Let $$A$$ be a square matrix such that $$\mathrm{rank}(A)=3$$. Prove or disprove that if the characteristic polynomial of $$A$$ is $$x^2(x-1)(x-2)$$, then A is diagonalizable.

So I can see that the size of $$A$$ must be $$4\times 4$$. However, the fact that the rank of $$A$$ is $$3$$ made it almost impossible for me to find a (really) specific matrix, such that its characteristic polynomial is the one requested above. I couldn't find a counterexample, either.

Thanks!

The statement is false. For instance, the matrix $$A = \pmatrix{0&1&0&0\\0&0&0&0\\0&0&1&0\\0&0&0&2}$$ Has the appropriate rank and eigenvalues, but fails to be diagonalizable.
$$A= \begin{pmatrix} 0&1&0&0\\ 0&0&0&0\\ 0&0&1&0\\ 0&0&0&2 \end{pmatrix}$$
If $$A$$ is $$n\times n$$ and diagonalizable, then $$x^m\mid \det(A-xI)$$ if and only if $$\operatorname{rk}A\le n-m$$.