Find Jordan basis of a given matrix $A=\begin{bmatrix}
-1 & 4 & -4 \\
0 & 1 & 0 \\
1 & -2 & 3
\end{bmatrix}$
The eigenvalues of the matrix are all $1$. The dimension of it's eigenspace is 2 so the Jordan normal form of the matrix is \begin{bmatrix}
1 & 1 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{bmatrix}
this is all confirmed by WolframAlpha.
Now, an eigenvector for $1$ is $(0,1,1)$ but when I try t solve $AP=PJ$ where
$P=\begin{bmatrix}
0 & a & d \\
1 & b & e \\
1 & c & f
\end{bmatrix}$
I get $1+b=b$ for the middle element. Why is $(0,1,1)$ a bad choice for the first column here, and how do I find the Jordan basis in this case?
 A: The characteristic polynomial is given by
$$\begin{align} p (\lambda) &= (-1-\lambda)(1 - \lambda)(3 - \lambda) - (-4)(1- \lambda)(1) \\&= (1 - \lambda)[-(-1-\lambda)(3-\lambda) - 4]\\&= -(\lambda - 1)^3\end{align}$$
Which gives you eingenvalue  $\lambda = 1$ of multiplicity $3$.
To find the eigenvectors, solve
$$(A - I)\begin{pmatrix}u_1\\u_2\\u_3\end{pmatrix} = 0.$$
We get $u = \begin{pmatrix}2u_2 - 2u_3\\u_2\\u_3\end{pmatrix}$.
Take two linearly independent eigenvectors, e.g. $u = \begin{pmatrix}0\\1\\1\end{pmatrix}$ (your same idea) and $u' = \begin{pmatrix}2\\0\\-1\end{pmatrix}$. Now to find a generalized vector we  make
$$(A - I) v = u'$$
Then $v = \begin{pmatrix}-1 + 2v_2 - 2v_3\\v_2\\v_3\end{pmatrix}$, we may take $v = \begin{pmatrix}-1\\0\\0\end{pmatrix}$. A basis would then be
$$\Bigg\{\begin{pmatrix}0\\1\\1\end{pmatrix},\begin{pmatrix}2\\0\\-1\end{pmatrix},\begin{pmatrix}-1\\0\\0\end{pmatrix}\Bigg\}$$
As we have two linearly independent eigenvectors there is going to be two Jordan blocks, a $1 \times 1$ block corresponding to $u$ and $2\times 2$ block corresponding to $u'$ and $v$. That gives us
$$J =\begin{pmatrix}1&0&0\\0&1&1\\0&0&1\end{pmatrix}$$
A: You have to find a basis of its eigenspace $\{e_1,e_2\}$ first, then a vector $e_3$ such that $(A-I)e_3=e_2$, which means $Ae_3=e_3+e_2$, hence wrt the basis $\{e_1,e_2,e_3\}$ the matrix  has the form:$$\begin{bmatrix}1&0&0\\0&1&1\\0&0&1\end{bmatrix}.$$
In practice: $(A-I)^2=0$, so $\,\operatorname{im}(A-I)\subset \ker (A-I)$. Take any vector not in the eigenspace as $e_3$, say $\,^{\mathrm t}(1,0,0)$, and $\,e_2=(A-I)e_3= {}^{\mathrm t}(-2,0,1)$; it is an eigenvector. 
Complete with an eigenvector $e_1$ independent from $e_2$; since the equation of the eigenspace is $\,x=2(y-z)$, we can take $e_1={} ^{\mathrm t}(2,1,0)$.
In the basis $(e_1,e_2,e_3)$, we have $Ae_3=e_2+e_3$ (by construction), $Ae_2=e_2$, $Ae_1=e_1$, so the matrix of $A$ in that base has the aforementioned form.
$$$$
