Solution (source code)

= Solution

The <Jordan–Chevalley decomposition> is characterized by
$$
\boxed{X=X_s+X_n,\quad X_s\text{ diagonalizable},\quad X_n\text{ nilpotent},\quad[X_s,X_n]=0.}
$$
Over $\mathbb C$, a semisimple <linear operator> is a diagonalizable one. These conditions determine the two parts uniquely. Concretely, on the <generalized eigenspace> for an <eigenvalue> $\lambda$, the semisimple part is $\lambda I$ and the nilpotent part is $X-\lambda I$; both are polynomials in $X$. To see uniqueness, any commuting candidate parts preserve each generalized eigenspace; diagonalize the proposed semisimple part there, and nilpotence then forces its eigenvalue to be the sole eigenvalue $\lambda$ of $X$ on that space.

For the displayed matrix, $\det(tI-X)=(t-1)^2$ and
$$
N=X-I=\begin{pmatrix}1&1\\-1&-1\end{pmatrix},\qquad N^2=0.
$$
Since $I$ is semisimple and commutes with $N$, the required parts are
$$
\boxed{X_s=I_2,\qquad X_n=\begin{pmatrix}1&1\\-1&-1\end{pmatrix}.}
$$