I have the matrix
$$\begin{pmatrix}
2 & 2 & -1 \\
-1 & -1 & 1 \\
-1 & -2 & 2
\end{pmatrix}$$
and need to find its Jordan canonical form. I can find that the only eigenvalue is 1 with algebraic multiplicity 3, and I can find two independent eigenvectors,
$$\begin{pmatrix}1\\0\\1\end{pmatrix},\qquad \begin{pmatrix}0\\1\\2\end{pmatrix}$$
I am told that to find a generalized eigenvector I need to solve
$$A\vec{x} = \vec\xi$$
where $\vec\xi$ is an eigenvector. However, when I try to solve in this case,
$$\begin{pmatrix}
1 & 2 & -1 \\
-1 & -2 & 1 \\
-1 & -2 & 1
\end{pmatrix}\vec{x} = \begin{pmatrix}1\\0\\1\end{pmatrix}$$
I find that there is no solution, and likewise for the other eigenvector.
I've also seen instruction that to find the generalized eigenvector you can solve $(A-\lambda I)^2\vec x=\vec0$ which in this case is
$$\begin{pmatrix}
1 & 2 & -1 \\
-1 & -2 & 1 \\
-1 & -2 & 1
\end{pmatrix}^2\vec{x} = \vec{0}$$
But the square of this matrix is the zero matrix. I thought perhaps that means I can select any independent vector I want, but when I select $\begin{pmatrix}0\\0\\1\end{pmatrix}$ I find that the resulting transformation matrix does not produce a matrix in Jordan form. That is to say, with
$$T = \begin{pmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
1 & 2 & 1 \end{pmatrix}$$
If I compute $J=T^{-1}AT$ I get
$$J = \begin{pmatrix} 1 & 0 & -1 \\
0 & 1 & 1 \\
0 & 0 & 1 \end{pmatrix}$$
Since that's not in Jordan form, I'm not sure what I'm doing wrong.
Best Answer
Once you have found that $(A-\lambda I)^2=0$, you can pick any vector $x_1$ that is not en eigenvector, e.g. as you suggested $x_1=(0,0,1)^T$. After that, you construct the corresponding eigenvector as $x_2=(A-\lambda I)x_1=(-1,1,1)^T$. Next, you pick an eigenvector that is linearly independent with $x_1$ and $x_2$ (independent with $x_2$ is enough), e.g. $x_3=(1,0,1)^T$. Now make $T=[x_1\ x_2\ x_3]$.
As to your first approach, it is not guaranteed that you can solve $(A-\lambda I)x=\xi$ for any eigenvector $\xi$, it is only possible to solve the system for some $\xi$. It means that you need to solve $$ (A-\lambda I)x=t\begin{bmatrix}1\\0\\1\end{bmatrix}+s\begin{bmatrix}0\\1\\2\end{bmatrix} $$ for some $t,s$. Since the last two equations are dependent, you get easily that the RHS must be the same, i.e. $s=t+2s$ etc.