Find a Jordan form of a non-diagonazable matrix I am trying to find Jordan's form of this matrix:
\begin{pmatrix}
0 & 1 & 0\\ 
-4&  4& 0\\ 
-2 &  1& 2
\end{pmatrix}
The only eigenvalue $r$ is 2 and therefore the simplest eigenvector $v_{1}$ is (0, 0, 1)
To get the other two independent vectors (generalized eigenvectors) for the P matrix we need to compute $(A-rI)v_{2}=v_{1}$ and $(A-rI)v_{3}=v_{2}$ .
However, in the calculation for 2 I get the following system which has no solution:
$$ \left[
\begin{array}{ccc|c}
  -2 & 0&  0&0 \\ 
 0&  1&  0&0 \\ 
 0&  0& 0 & 1 
\end{array}
\right] $$
Any Idea on what I am doing wrong? If the eigenvalue is 2, when we substract it the lowest row will always contain all zeros...
 A: I like this method for hand calculations: first, calling your matrix $A,$ let
$$ B = A - 2 I  $$
$$
B =
\left(
\begin{array}{ccc}
-2&1&0 \\
-4&2&0 \\
-2&1&0
\end{array}
\right)
$$
A basis for the genuine eigenvectors is given by the convenient
$$
E =
\left(
\begin{array}{cc}
1&0 \\
2&0 \\
0&1
\end{array}
\right)
$$
We may or may not be using these eigenvectors in the form shown. We know that the characteristic equation for $A$ is just showing $B^3 = 0.$ However, the minimal polynomial for $A$ is $B^2 = 0,$ which you can check easily enough. 
We are going to make a matrix $R$ with columns $u,v,w;$ on the far right, we take $w$ as any vector with $B^2 w = 0$ (automatic) but $Bw \neq 0.$ Then $v = Bw$ will be a genuine eigenvector. Finally, we will choose an independent eigenvalue $u.$
I like ones and zeros, I choose
 $$
w =
\left(
\begin{array}{c}
0 \\
1 \\
0
\end{array}
\right)
$$
Then from $v = B w$ we get
 $$
v =
\left(
\begin{array}{c}
1 \\
2 \\
1
\end{array}
\right)
$$
This $v$ is a genuine eigenvector, it is the sum of the two columns of my $E.$
At last, we get to choose some $u$ eigenvector that is not a multiple of $v,$ I choose 
 $$
u =
\left(
\begin{array}{c}
0 \\
0 \\
1
\end{array}
\right)
$$
$$
R =
\left(
\begin{array}{ccc}
0&1&0 \\
0&2&1 \\
1&1&0
\end{array}
\right)
$$
Next we find $R^{-1} $ and $J = R^{-1}A R,$ which will be the Jordan form if we did it correctly. A piece of luck , because of choosing ones and zeros, the determinant of $R$ is small, actually $1,$ and we calculate
$$
R^{-1} =
\left(
\begin{array}{ccc}
-1&0&1 \\
1&0&0 \\
-2&1&0
\end{array}
\right)
$$
and
$$
J = R^{-1} A R =
\left(
\begin{array}{ccc}
2&0&0 \\
0&2&1 \\
0&0&2
\end{array}
\right)
$$
$$  $$
$$ R^{-1} A R = J  $$
$$
\left(
\begin{array}{ccc}
-1&0&1 \\
1&0&0 \\
-2&1&0
\end{array}
\right)
\left(
\begin{array}{ccc}
0&1&0 \\
-4&4&0 \\
-2&1&2
\end{array}
\right)
\left(
\begin{array}{ccc}
0&1&0 \\
0&2&1 \\
1&1&0
\end{array}
\right) =
\left(
\begin{array}{ccc}
2&0&0 \\
0&2&1 \\
0&0&2
\end{array}
\right)
$$
$$  $$
$$ R J R^{-1} = A  $$
$$
\left(
\begin{array}{ccc}
0&1&0 \\
0&2&1 \\
1&1&0
\end{array}
\right) 
\left(
\begin{array}{ccc}
2&0&0 \\
0&2&1 \\
0&0&2
\end{array}
\right)
\left(
\begin{array}{ccc}
-1&0&1 \\
1&0&0 \\
-2&1&0
\end{array}
\right) =
\left(
\begin{array}{ccc}
0&1&0 \\
-4&4&0 \\
-2&1&2
\end{array}
\right)
$$
COMMENT: the line above  "as any vector with $B^2 w = 0$ (automatic)" may appear silly. If, however, you were given a 5 by 5 matrix $A$ with characteristic polynomial $(x - 5)^3 (x-7)^2$ and minimal polynomial 
$(x - 5)^2 (x-7),$ the demand for a vector $w$ with $(A - 5I)^2 w = 0$ but $(A - 5I) w \neq 0$ would make some sense, as the eigenvalue $7$ is ignored in this condition.
