How many idempotent elements are in Z_m or How many roots have this polynomial in Z_m
f(x)=x^2 +x procedure of proof is important for me.
How many idempotent elements are in Z_m or How many roots have this polynomial in Z_m f(x)=x^2 +x procedure of proof is important for me. 

closed as too localized by Gjergji Zaimi, Andrés E. Caicedo, Ryan Budney, Torsten Ekedahl, Bruce Westbury Nov 14 '11 at 8:40This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. 


Idempotent elements are roots of $g(x)=x^2x$; my answer will apply equally well to $f(x)=x^2+x$. The important step is the Chinese Remainder Theorem: one way of stating it is that if $m=p_1^{r_1}\times\cdots\times p_k^{r_k}$ is factored into powers of distinct primes, then the ring $Z_m$ is equal to the direct product of rings $Z_{p_1^{r_1}} \times \cdots \times Z_{p_k^{r_k}}$. So it suffices to count the number of roots in each ring $Z_{p_i^{r_i}}$ and then multiply those numbers together to obtain the number of roots in $Z_m$. I think it will be easy to convince yourself that the polynomial $g(x)=x^2x$ has exactly two roots in any ring of the form $Z_{p^r}$. (By the way, the isomorphism between $Z_m$ and $Z_{p_1^{r_1}} \times \cdots \times Z_{p_k^{r_k}}$ is completely explicit, so this even gives a way to construct the idempotent elements, not just count them.) 

