With respect to the standard basis of \(\R^4\text{,}\) the matrix of \(T\) is
\begin{equation*}
M = \bbm 1\amp 1\amp 0\amp 0\\0\amp 1\amp 0\amp 0\\0\amp -1\amp 2\amp 0\\1\amp -1\amp 1\amp 1\ebm\text{.}
\end{equation*}
We find (perhaps using the Sage cell provided below, and the code from the example above) that
\begin{equation*}
c_T(x)=(x-1)^3(x-2)\text{,}
\end{equation*}
so \(T\) has eigenvalues \(1\) (of multiplicity \(3\)), and \(2\) (of multiplicity \(1\)).
We tackle the repeated eigenvalue first. The reduced row-echelon form of \(M-I\) is given by
\begin{equation*}
R_1 = \bbm 1\amp 0\amp 0\amp 0\\0\amp 1\amp 0\amp 0\\0\amp 0\amp 1\amp 0\\0\amp 0\amp 0\amp 0\ebm\text{,}
\end{equation*}
so
\begin{equation*}
E_1(M) = \spn\{\xx_1\}, \text{ where } \xx_1 = \bbm 0\\0\\0\\1\ebm\text{.}
\end{equation*}
We now attempt to solve \((M-I)\xx=\xx_1\text{.}\) We find
\begin{equation*}
\left(\begin{matrix}0\amp 1\amp 0\amp 0\\0\amp 0\amp 0\amp 0\\0\amp -1\amp 1\amp 0\\1\amp -1\amp 1\amp 0\end{matrix}\right|\left.\begin{matrix}0\\0\\0\\1\end{matrix}\right)
\xrightarrow{\text{RREF}}
\left(\begin{matrix} 1\amp 0\amp 0\amp 0\\0\amp 1\amp 0\amp 0\\0\amp 0\amp 1\amp 0\\0\amp 0\amp 0\amp 0\end{matrix}\right|\left.\begin{matrix}1\\0\\0\\0\end{matrix}\right)\text{,}
\end{equation*}
so \(\xx = t\xx_1+\xx_2\text{,}\) where \(\xx_2 = \bbm 1\\0\\0\\0\ebm\text{.}\) We take \(\xx_2\) as our first generalized eigenvector. Note that \((M-I)^2\xx_2 = (M-I)\xx_1=\zer\text{,}\) so \(\xx_2\in \nll (M-I)^2\text{,}\) as expected.
Finally, we look for an element of \(\nll (M-I)^3\) of the form \(\xx_3\text{,}\) where \((M-I)\xx_3=\xx_2\text{.}\) We set up and solve the system \((M-I)\xx=\xx_2\) as follows:
\begin{equation*}
\left(\begin{matrix}0\amp 1\amp 0\amp 0\\0\amp 0\amp 0\amp 0\\0\amp -1\amp 1\amp 0\\1\amp -1\amp 1\amp 0\end{matrix}\right|\left.\begin{matrix}1\\0\\0\\0\end{matrix}\right)
\xrightarrow{\text{RREF}}
\left(\begin{matrix} 1\amp 0\amp 0\amp 0\\0\amp 1\amp 0\amp 0\\0\amp 0\amp 1\amp 0\\0\amp 0\amp 0\amp 0\end{matrix}\right|\left.\begin{matrix}0\\1\\1\\0\end{matrix}\right)\text{,}
\end{equation*}
so \(\xx = t\xx_1+\xx_3\text{,}\) where \(\xx_3 =\bbm 0\\1\\1\\0\ebm\text{.}\)
Finally, we deal with the eigenvalue \(2\text{.}\) The reduced row-echelon form of \(M-2I\) is
\begin{equation*}
R_2 = \bbm 1\amp 0\amp 0\amp 0\\0\amp 1\amp 0\amp 0\\0\amp 0\amp 1\amp -1\\0\amp 0\amp 0\amp 0\ebm\text{,}
\end{equation*}
so
\begin{equation*}
E_2(M) = \spn\{\yy\}, \text{ where } \yy = \bbm 0\\0\\1\\1\ebm\text{.}
\end{equation*}
Our basis of column vectors is therefore \(B=\{\xx_1,\xx_2,\xx_3,\yy\}\text{.}\) Note that by design,
\begin{align*}
M\xx_1 \amp =\xx_1\\
M\xx_2 \amp =\xx_1+\xx_2\\
M\xx_3 \amp= \xx_2+\xx_3\\
M\yy \amp = 2\yy\text{.}
\end{align*}
The corresponding Jordan basis for \(\R^4\) is
\begin{equation*}
\{(0,0,0,1),(1,0,0,0),(0,1,1,0),(0,0,1,1)\}\text{,}
\end{equation*}
and with respect to this basis, we have
\begin{equation*}
M_B(T) = \bbm 1\amp 1\amp 0\amp 0\\
0\amp 1\amp 1\amp 0\\
0\amp 0\amp 1\amp 0\\
0\amp 0\amp 0\amp 2\ebm\text{.}
\end{equation*}