<s>[INST] Finding nilpotent and diagonalizable operators for a linear transformation $T$ 
Let $T$ be the linear operator on $\mathbb{R}^3$ which is represented by the matrix:
$A=\begin{bmatrix}3 & 1 & -1\\ 2 & 2 & -1\\ 2 & 2 &0\end{bmatrix}$
in the standard ordered basis.  Show that there is a diagonalizable operator $D$ on $R^3$ and a nilpotent operator $N$ on $\mathbb{R}^3$ such that $T=D+N$ and $DN=ND$.  Find the matrices of $D$ and $N$ in the standard basis.

Here is what I've got so far.
$\det(xI-A)=\det\left(\begin{bmatrix}x-3 & -1 & 1\\ -2 & x-2 & 1\\ -2 & -2 &x\end{bmatrix}\right)=(x-1)(x-2)^2$
But now I've got to find polynomials $h_1(T)+h_2(T)=I$ where $E_i=h_i$.  This was easy enough:  $E_1=(x-2)^2$ and $E_2=-(x-1)(x-3)$.  I've also computed the matricies $(T-2)^2$ and $(T-1)(T-3)$ beloe respectively:
$\begin{bmatrix}1 & -1 & 0\\ 0 & 0 & 0\\2 & -2 & 0\end{bmatrix}$
$\begin{bmatrix}0 & 1 & 0\\ 0 & 1 & 0\\-2 & 2 & 1\end{bmatrix}$
This is where I'm stuck.  I'm not sure how to proceed from here in order to find $D$ and $N$.
 [/INST] This can be accomplished as an extra step after doing the work for the Jordan Normal Form, but keeping careful account of the change of basis matrix and its inverse. 
For $R^{-1} A R = J$ we get, 
$$
\left(
\begin{array}{rrr}
1 & -1 & 0 \\
0 & 1 & 0 \\
2 & 0 & -1
\end{array}
\right)
\left(
\begin{array}{rrr}
3 & 1 & -1 \\
2 & 2 & -1 \\
2 & 2 & 0
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & 1 & 0 \\
0 & 1 & 0 \\
2 & 2 & -1
\end{array}
\right) =
\left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 2 & 1 \\
0 & 0 & 2
\end{array}
\right)
$$
with the important reverse direction $RJR^{-1} = A$
$$
\left(
\begin{array}{rrr}
1 & 1 & 0 \\
0 & 1 & 0 \\
2 & 2 & -1
\end{array}
\right) 
\left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 2 & 1 \\
0 & 0 & 2
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & -1 & 0 \\
0 & 1 & 0 \\
2 & 0 & -1
\end{array}
\right) =
\left(
\begin{array}{rrr}
3 & 1 & -1 \\
2 & 2 & -1 \\
2 & 2 & 0
\end{array}
\right)
$$
Next we take
$$
D_0 =
\left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 2 & 0 \\
0 & 0 & 2
\end{array}
\right)
$$
and
$$
N_0 =
\left(
\begin{array}{rrr}
0 & 0 & 0 \\
0 & 0 & 1 \\
0 & 0 & 0
\end{array}
\right)
$$
so that $D_0 N_0 = N_0 D_0$ and $D_0 + N_0 = J$
Then
$$
D = R D_0 R^{-1} =
\left(
\begin{array}{rrr}
1 & 1 & 0 \\
0 & 2 & 0 \\
-2 & 2 & 2
\end{array}
\right)
$$
while
$$
N = R N_0 R^{-1} =
\left(
\begin{array}{rrr}
2 & 0 & -1 \\
2 & 0 & -1 \\
4 & 0 & -2
\end{array}
\right)
$$
You can check easily enough, we get $D+N = A,$ also $DN=ND=2N$ and $N^2 = 0 \; .$
</s>