## Compute the Jordan canonical form of a given matrix

Let $A$ be a $2 \times 2$ matrix with entries in $\mathbb{Q}$ such that $A^3 = I$ and $A \neq I$. Compute the rational canonical form of $A$ and the Jordan canonical form of $A$ over $\mathbb{C}$.

The minimal polynomial of $A$ divides $x^3-1 = (x-1)(x^2+x+1)$ and is not $x-1$, and so must be $p(x) = x^2+x+1$. Since $A$ has dimension 2, $p(x)$ is the list of invariant factors of $A$. So the rational canonical form of $A$ is $\begin{bmatrix} 0 & -1 \\ 1 & -1 \end{bmatrix}$.

Now $p(x)$ factors over $\mathbb{C}$ as $p(x) = (x - \frac{-1+i\sqrt{3}}{2})(x-\frac{-1-i\sqrt{3}}{2})$. So the Jordan canonical form of $A$ is $\begin{bmatrix} \frac{-1+i\sqrt{3}}{2} & 0 \\ 0 & \frac{-1-i\sqrt{3}}{2} \end{bmatrix}$.