I have 3 dimensional matrix $$A = \left(\begin{array}{c} 2 & 1 & 0 \\ -1 & 0 & 1 \\ 1 & 3 & 1\end{array}\right)$$ and want to find a Jordan Form for it and a basis for the Jordan Form. My procedure: I calculated the characteristic polynomial $\chi_A(\lambda) = -(2-\lambda)^2(1+\lambda)$ and found the roots $\lambda_1 = 2$ with algebraic multiplicity $\mu_1 = 2$ and $\lambda_2 = -1$ with algebraic multiplicity $\mu_2 = -1$, respectively. Then, for $\lambda_1$, I found that a basis for the kernel of $A - 2 I$ is the vector $\left(\begin{array}{c} 1 \\ 0 \\ 1\end{array}\right).$ Clearly, this has subspace has dimension $\gamma_{11} = 1$ which is less than $\mu_1 = 2$, so I have to continue and calculate the kernel of $(A - 2I)^2$. A basis for this space is given by $\left(\begin{array}{c} 1 \\ 0 \\ 1\end{array}\right), \left(\begin{array}{c} 1 \\ 1 \\ 0\end{array}\right).$ Since now the geometric multiplicity equals the algebraic multiplicity, I am finished with calculating kernels. Now I have to pick some vector $w_{12}$ in the kernel of $(A-2I)^2$ which is not in $(A-2 I)$. An obvious choice is $w_{12} = \left(\begin{array}{c} 1 \\ 1 \\ 0\end{array}\right)$. Then: $$w_{11} = (A - 2I) = \left(\begin{array}{c}1 \\ -3 \\ 4\end{array}\right).$$ Now turning to $\lambda_2$, a basis for the kernel is $\left(\begin{array}{c} 1 \\ -3 \\ 4\end{array}\right)$.
But then I get stuck because I have two times the exact same vector in my basis which of course is not enough to span a 3 dimensional space. I cannot see what I did wrong or where my mistake comes from. What do I do in such a situation?
$$ (A-2I)^2 = \left( \begin{array}{ccc} -1&-2&1 \\ 3&6&-3 \\ -4&-8&4 \\ \end{array} \right) $$ of rank one, with row echelon form $$ (A-2I)^2 \Longrightarrow \left( \begin{array}{ccc} 1&2&-1 \\ 0&0&0 \\ 0&0&0 \\ \end{array} \right) $$
Your vector $w_{12}$ is not in the kernel of $ (A-2I)^2 \; ; \;$ your basis for that kernel is wrong.