AA is symmetric (or selfadjoint, if your matrices are complex), so it is diagonalizable.
The minimal polynomial of A is pm(t)=t(t−5) pm(t)=t(t−5), while the characteristic polynomial is
pc(t)=t^(4)(t−5). So they are different
The eigenvalues are then 5,0,0,0,0, and so pc(t)=t^(4)(t−5) . As A^(5)−5A=0 the minimal polynomial is at most t(t−5). But it also requires 0 and 5 as roots, so pm(t)=t(t−5).