I'm solving two problems that envolved to find a inversible matrix $P$ such that $P^{-1}AP=J$ is in the Jordan form.
When $A=\begin{bmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ -2 & -1 & 0 & -1 & 0 & 0 \\ 0 & 0 & -1 & -1 & 0 & 1 \\ 0 & 0 & 2 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 0 & -1 & -1 \\ \end{bmatrix}$ and $A=\begin{bmatrix} 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & -1 & 0 \\ \end{bmatrix}$.
To me it's easy to find the jordan form for this two matrices:
$J=\begin{bmatrix} i & 0 & 0 & 0 & 0 & 0 \\ 0 & i & 0 & 0 & 0 & 0 \\ 0 & 0 & i & 0 & 0 & 0 \\ 0 & 0 & 0 & -i & 0 & 0 \\ 0 & 0 & 0 & 0 & -i & 0 \\ 0 & 0 & 0 & 0 & 0 & -i \\ \end{bmatrix}$ and $J=\begin{bmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & i & 0 \\ 0 & 0 & 0 & -i \\ \end{bmatrix}$ resp.
But how can I find the matrix $P$ in each case in a easy way and also, I would like to know if there exist a standard form to do it, thanks!