Let $P(X) = a\_nX^n + \cdots + a\_1X + a\_0$ be a polynomial, $a\_i \in \mathbb{R}$ for all $i$. Set 
$$S = \lbrace A \in \mathbb{M}\_n: P(A) = 0 \rbrace.$$
We consider the following relation $\sim$ on $S$: $A \sim B$ iff there exists an invertible matrix $C$ such that $B = C^{-1}AC$. It is easy to see that $\sim$ is an equivalence relation on $S$. My question relates to the number of the equivalence classes of $\sim$.


Questions: 


(1) Is $S/\sim$ a finite set. 


(2) If (1) has an affirmative answer. Find an upper bound formula for $| S/ \sim|$ in term $n$.



The number of solutions of a matrix equation
The minimal polynomial $\mu\_A$ of each matrix $A\in M\_n(\mathbb R)$ with $P(A)=0$ divides $P$. Clearly, due to Jordan normal form, there are only finitely many conjugacy classes of such matrices. If you decompose $P$ into irreducible factors:
$$
 P = P\_1^{k\_1}\cdots P\_r^{k\_r}
$$
then representatives for each equivalence classes of solutions are given by diagonal joins Jordan blocks with minimal polynomial dividing one of the factors $P\_i^{k\_i}$. Assume for simplicity that the $P\_i$ all have degree $1$, then the number of equivalence classes is given by
$$
 \sum\_{\lambda \textrm{ partiton of $n$ with $r$ parts}} \prod\_{i=1}^r \textrm{(Number partitions of $\lambda\_i$ with parts $\leq k\_i$)}
$$
If $P$ doesn't split into linear factors you can modify the formula accordingly. Or, you could just work over $\mathbb C$, since the exact number of eq. classes of solutions over $\mathbb C$ will still be an upper bound for the number of solutions over $\mathbb R$.


