Jordan Normal form: problems with finding correct generalized eigenvectors I have been tasked to find the Jordan Normal Form for the matrix $A$ shown below. 
\begin{align*}
A = \begin{pmatrix}
2 & 2 & 0 & -1 \\
0 & 0 & 0 & 1 \\
1 & 5 & 2 & -1 \\
0 & -4 & 0 & 4
\end{pmatrix}
\end{align*}
In itself, finding a Jordan Normal form is not that hard, but I'm having some problems with determining the correct coordinate transformation, namely finding the correct generalized eigenvectors.
What I have done so far:
The characteristic polynomial is $\lambda^4 - 8 \lambda^3 + 24 \lambda^2 -32 \lambda + 16 = (\lambda - 2)^4$, so we get eigenvalue $\lambda = 2$ with algebraic multiplicity 4.
The kernel of $(A - 2I)$ is
\begin{align*}
\ker\begin{pmatrix}
0 & 2 & 0 & -1 \\
0 & -2 & 0 & 1 \\
1 & 5 & 0 & -1 \\
0 & -4 & 0 & 2
\end{pmatrix} = \text{L}((0,0,1,0)^T, (-3,1,0,2)^T)
\end{align*}
so our first two eigenvectors are $(0,0,1,0)^T$ and $(-3,1,0,2)^T$, and we are two vectors short.
Following this we determine $\ker((A-2I)^2)$ and we get
\begin{align*}
\ker\begin{pmatrix}
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 \\
0 & -4 & 0 & 2 \\
0 & 0 & 0 & 0
\end{pmatrix}
\end{align*}
Now I thought that if we take $v = (0,1,0,2)^T$ and $w = (0,0,0,1)^T$ from $\ker((A-2I)^3)$, then we have $(A - 2I)v \neq 0$ and $(A - 2I)w \neq 0$. Also, the four vectors are linearly independent and generate $\mathbb{R}^4$, so we have a good basis.
However, when using this basis as coordinate transformation, you do not get the Jordan Normal Form $J$ that MATLAB and Wolfram calculate. That is, you do not get a Jordan Normal form at all.
\begin{align*}
J = \begin{pmatrix}
2 & 1 & 0 & 0 \\
0 & 2 & 1 & 0 \\
0 & 0 & 2 & 0 \\
0 & 0 & 0 & 2
\end{pmatrix}
\end{align*}
My question is thus, where am I making a mistake? Also, I am wondering why is $J$ split into a $3 \times 3$ and a $1 \times 1$ block, is it not supposed to be one big $4 \times 4$ block?
If anyone could provide some hints or point me in the right direction, I'd be forever grateful, thanks!
 A: JNF of $A$ should be $Q^{-1}AQ$, where $Q$ is the matrix having a Jordan basis as its columns. 
The basis which you found is not a Jordan basis, so it is not a disjoint union of Jordan
chains.
Different method of getting JNF:
Theorem.
Let $\lambda$ be an eigenvalue of a matrix $A$ and let $J$ be the JNF of $A$. Then
the number of Jordan blocks of $J$ with eigenvalue $\lambda$ is equal to
$\mbox{nullity} (A − \lambda I)$.
Are you familiar with it?
In your calculations the $\mbox{nullity} (A − 2I)=2$. Thus $J$ will be of the form
$J_{\lambda}^{(k)} \oplus J_{\lambda}^{(l)}$ for some natural numbers $k$,$l$ depending on the characteristic and minimal polynomial of $A$ and such that $k+l=4$, where
Let $J_{\lambda}^{(n)}=\left[ \begin{array}{llll}
\lambda_i & 1            & \;     & \;  \\
\;        & \lambda_i    & \ddots & \;  \\
\;        & \;           & \ddots & 1   \\
\;        & \;           & \;     & \lambda_n
\end{array} \right].$
Note that the minimal polynomial of $A$ is $m_A(\lambda)=(\lambda-2)^3$, thus the only option of JNF is $J_{2}^{(3)} \oplus J_{2}^{(1)}=\begin{pmatrix}
2 & 1 & 0 & 0 \\
0 & 2 & 1 & 0 \\
0 & 0 & 2 & 0 \\
0 & 0 & 0 & 2
\end{pmatrix}.
$
