<s>[INST] Find an invertible matrix $S$ and a matrix $J$ in Jordan form, such that $S^{-1}AS = J$ $A =  \begin{pmatrix}
        0 & -1 & 0 & 0 \\
        2 & 0 & -1 & 0 \\
        3 & -1 & -2 & -1 \\
        -1 & 0 & 1 & 1 \\
        \end{pmatrix}$
We need to find an invertible matrix $S$ and a matrix in Jordan form $J$, such that $S^{-1}AS=J$.
I've found that the characteristic polynomial is $P_A(\lambda) = \lambda^3(\lambda+1)$. Therefore, $\lambda = 0,-1$.
The minimal polynomial is $m_A(\lambda) = P_A(\lambda).$
At this stage, we know that $J = \begin{pmatrix}
        -1 & 0 & 0 & 0 \\
        0 & 0 & 1 & 0 \\
        0 & 0 & 0 & 1 \\
        0 & 0 & 0 & 0 \\
        \end{pmatrix}$ (up to blocks' order).
Next, I've found the Null Spaces:
For $\lambda=0$:
$N(A) = N \begin{pmatrix}
        0 & -1 & 0 & 0 \\
        2 & 0 & -1 & 0 \\
        3 & -1 & -2 & -1 \\
        -1 & 0 & 1 & 1 \\
        \end{pmatrix} = span \begin{Bmatrix} \begin{pmatrix}
        -1 \\ 0 \\ -2 \\ 1
        \end{pmatrix} \end{Bmatrix}$
$N(A^2) = N \begin{pmatrix}
        -2 & 0 & 1 & 0 \\
        -3 & -1 & 2 & 1 \\
        -7 & -1 & 4 & 1 \\
        2 & 0 & -1 & 0 \\
        \end{pmatrix} = span \begin{Bmatrix}
        \begin{pmatrix}
        1 \\ 1 \\ 2 \\ 0
        \end{pmatrix},
        \begin{pmatrix}
        0 \\ 1 \\ 0 \\ 1
        \end{pmatrix}
        \end{Bmatrix}$
$N(A^3) = N \begin{pmatrix}
        3 & 1 & -2 & -1 \\
        3 & 1 & -2 & -1 \\
        9 & 3 & -6 & -3 \\
        3 & -1 & 2 & 1 \\
        \end{pmatrix} = span \begin{Bmatrix}
        \begin{pmatrix}
        -1 \\ 3 \\ 0 \\ 0
        \end{pmatrix},
        \begin{pmatrix}
        2 \\ 0 \\ 3 \\ 0
        \end{pmatrix},
        \begin{pmatrix}
        1 \\ 0 \\ 0 \\ 3
        \end{pmatrix}
        \end{Bmatrix}$
For $\lambda=-1$:
$N(A+I) = N \begin{pmatrix}
        1 & -1 & 0 & 0 \\
        2 & 1 & -1 & 0 \\
        3 & -1 & -1 & -1 \\
        -1 & 0 & 1 & 2 \\
        \end{pmatrix} = span \begin{Bmatrix} \begin{pmatrix}
        1 \\ 1 \\ 3 \\ -1
        \end{pmatrix} \end{Bmatrix}$
I'm not sure how to continue from here...
 [/INST] Once you have found $J$, finding $S$ is very easy. Just write $S=(s_{ij})$ and solve the linear equations in these coefficients given by the equation 
$$
AS=SJ.
$$
There are many solutions for $S$ here, and you have to pick one which satisfies $\det(S)\neq 0$.
Edit: Say, $S=(x_1,x_2,x_3,x_4)$ with column vectors $x_1=(s_1,s_2,s_3,s_4)^T$ until $x_4=(s_{13},s_{14},s_{15},s_{16})^T$. Then
$AS=SJ$ is equivalent to $16$ easy equations
$$
s_1-s_2 = 0,\; s_6 =0, \; \cdots ,\; - s_{12} - s_{13} + s_{15} 
+ s_{16} = 0.
$$
This can be solved even by hand in a few minutes, e.g.,
$$
S=\begin{pmatrix} 1 & 1 & -1 & 0 \cr 1 & 0 & -1 & 1 \cr
3 & 2 & -2 & 1 \cr -1 & -1 & 0 & -1\end{pmatrix}
$$
</s>