Calculate the jordan normal form of the following matrix:$$A=\begin{pmatrix} 3 & -1 & 0 & 0 \\ 1 & 1 & 0 & 0\\ 0 & 1 & 3 & -2\\ 1 & 0 & 2 & -1\end{pmatrix}$$.
The characteristic polynomial is $$\chi_A(x)=(x^2-4x+4)(x^2-2x+1)$$ with eigenvalues $x_1=2,\ x_2=1$ with multiplicity of $2$.
Do I have to calculate:$$ker((A-x_iI)^2)$$ or $$ker(A^2-4A+4I)$$
Verify that $$ \dim \ker (A - I) = \dim \ker (A - 2I) = 1 $$ As such, $A$ has Jordan canonical form $$ \pmatrix{ 1&1\\&1\\&&2&1\\&&&2 } $$