Classify up to similarity all the matrices A $\in Q^{3 \times 3}$ such that $A^3$ = I I know the minimal polynomial $p_A$ must divide $(x - 1)(x^2 + x + 1)$ since $A^3 - I = 0$. 
If $p_A$ = (x - 1), then A = I. 
If $p_A = (x - 1)(x^2 + x + 1)$, then $p_A$ is equal to the characteristic polynomial, since it is of degree three. Hence, $Q^3$ has an A-cyclic vector, and A is similar to the companion matrix \begin{bmatrix}
    0       & 0 & 1  \\
   1       & 0 & 0   \\
   0       & 1 & 0 \\ \end{bmatrix}
What can I say about the case if  $p_A =(x^2 + x + 1)$?

Hint:
 The minimal polynomial $p_A(x)$ is a divisor of $x^3-1$, so it is either $x-1$ or $x^2+x+1$ or $x^3-1$
Now the minimal polynomial and the characteristic polynomial  have the same irreducible  factors, so:


*

*if $p_A(x)=x-1$, $\chi_A(x)=(x-1)^3$ (the matrix is $I$);

*the case $p_A(x)=x^2+x+1$ cannot happen, since $\chi_A(x)$ should be a power of $p_A(x)$ of degree $3$

*if $p_A(x)=x^3-1$, it is equal to $\chi_A(x)$, and the matrix is diagonalisable over $\mathbf C$.

