We have a square matrix A with entries from $Q$ and a polynomial $g(x) = (x^2 +3x+5)(x−1)^2(x^3 +1)$ $g \in Q[x]$
Such that g(A) is 0. The minimal polynomial is said to be of the degree 2 and we are asked to find all the possible forms of the invariant factor.
What can we say about the characteristic polynomial from the fact that g(A) is 0 ? For example, since we can't say if (A^3+1) will be 0 just because g(A) is and we can't say if it is a part of the characteristic polynomial for A so can we make any comment on the characteristic polynomial from this?
Secondly, all I have learnt in my class about invariant factors in class which I think might be relevant to finding an answer to this question is the fact that the maximum invariant factor must be the minimal polynomial and that they must successively divide the bigger one in a sequence. I don't know how this information helps us here since we can't make much of a comment about the minimal polynomial here as well. So how can I approach solving this question?