## Compute the Jordan canonical form of a given matrix

Compute the Jordan canonical form of the matrix $A = \begin{bmatrix} 3 & 0 & -2 & -3 \\ 4 & -8 & 14 & -15 \\ 2 & -4 & 7 & -7 \\ 0 & 2 & -4 & 3 \end{bmatrix}$. (Over $\mathbb{Q}$.)

Let $P = \begin{bmatrix} 0 & -1 & 2 & -1/2 \\ 0 & 2 & -3 & 2 \\ 2 & -2 & 2 & -5 \\ 0 & 1 & -2 & 1 \end{bmatrix}$. Evidently, $P^{-1}AP = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 2 \end{bmatrix}$ is in Jordan canonical form. (Computations performed with WolframAlpha; see here.)