Let $$A=\begin{pmatrix}5&1&1 \\-1&3&1\\0&0&4\end{pmatrix}$$ The Jordan-decomposition is $$A=\begin{pmatrix}-1&-1&-1/2 \\1&0&0\\0&0&-1/2\end{pmatrix}\begin{pmatrix}4&1&0 \\0&4&1\\0&0&4\end{pmatrix}\begin{pmatrix}0&1&0 \\-1&-1&1\\0&0&-2\end{pmatrix}$$
And it drives me crazy that I don't get it !
The characteristic polynomial is $p(\lambda)=(\lambda-4)^3$ therefore $\lambda=4$ has algebraic multiplicity $3$ Then
$(A-4I)=\begin{pmatrix}1&1&1 \\-1&-1&1\\0&0&0\end{pmatrix} \Rightarrow \dim(\text{kernel})=2<3$
$(A-4I)^2=\begin{pmatrix}0&0&2 \\0&0&-2\\0&0&0\end{pmatrix}\Rightarrow \dim(\text{kernel})=1<3$
The matrix is not diagonalizable, so we get $$J=\begin{pmatrix}4&1&0 \\0&4&1\\0&0&4\end{pmatrix}$$
Now I need the eigenvectors/eigenspaces/generalized eigenvetors/spaces and here is the part I have trouble with.
$(A-4I)v=\begin{pmatrix}1&1&1 \\-1&-1&1\\0&0&0\end{pmatrix}v=0 \Rightarrow v_1=-v_2 \land v_3=0 \Rightarrow v=\begin{pmatrix}1\\-1\\0\end{pmatrix} $
$(A-4I)^2u=\begin{pmatrix}0&0&2 \\0&0&-2\\0&0&0\end{pmatrix}u=0 \Rightarrow u_3=0\Rightarrow u=\begin{pmatrix}1\\0\\0\end{pmatrix}, u*=\begin{pmatrix}0\\1\\0\end{pmatrix}$
I don't understand how/what wolfram alpha did -.-
What did I wrong ? Thanks for answers.