If $A$ is a $5 \times 5$ complex matrix with $A^4=A^2 \neq A$, then what are its possible minimal polynomials?
Solution 1:
The hypotheses mean that $X^4-X^2$ is an annihilating polynomial of $A$ but $X^2-X$ is not. As you remarked $X^4-X^2$ factors as $X^2(X-1)(X+1)$ and one also has $X^2-X=X(X-1)$. The minimal polynomial must divide the former but not the latter (and it must be monic). The monic divisors of $X^2(X-1)(X+1)$ are $X^a(X-1)^b(X+1)^c$ with $a\in\{0,1,2\}$ and $b,c\in\{0,1\}$; of these $12$ candidates those with $a\leq1$ and $c=0$ are disqualified for dividing $X(X-1)$. There are $4$ of the latter which leaves $8$ viable candidates, where $(a,b,c)$ runs over the set $\{(0,0,1),(0,1,1),(1,0,1),(1,1,1),(2,0,0),(2,0,1),(2,1,0),(2,1,1)\}$.
It remains to be seen whether each of these $8$ polynomial$~P$ can be realised as minimal polynomial of a $5\times 5$ complex matrix. Since $\deg(P)$ is some $d\in\{1,2,3,4\}$, the answer is yes: we can make a square matrix of the size$~d$ by taking the companion matrix of$~P$, and we can complete that to a block diagonal matrix of size $5\times 5$ by taking for the remaining $5-d$ factors for instance $\lambda I_{5-d}$ where $\lambda$ is any root of$~P$ (and it has at least one since $\deg(P)>0$). For instance for $P=X+1$ (with $(a,b,c)=(0,0,1)$) one gets the matrix $-I_5$, and for $P=X^2(X-1)=X^3-X^2$ (with $(a,b,c)=(2,1,0)$) one gets for instance (taking the root $\lambda=1$) $$\pmatrix{0&0&0&0&0\\1&0&0&0&0\\0&1&1&0&0\\0&0&0&1&0\\0&0&0&0&1},$$ and the other cases are similar. No Jordan normal forms are needed (though you can use them if you must), nor for that matter complex numbers (as the polynomials split over$~\Bbb Q$).