Describe all prime and maximal ideals of $\mathbb{Z}_n$ I know that an ideal P in $\mathbb{Z}_n$ is prime if and only if $\mathbb{Z}_n/P$ is an integral domain and an ideal m in $\mathbb{Z}_n$ is maximal if and only if $\mathbb{Z}_n$/m is a field. 
I think I've figured out that $\mathbb{Z}_p$ where p is a prime that divides n make up the maximal ideals.
I have no idea how to figure out which are prime.  Help?
 A: Hint: Write $m=\Pi_{i=1}^{i=n}p_i^{n_i}$ where $p_i$ is a prime number, the prime and maximal ideals are generated by the class of $p_1^{n_1}..p_i^{n_i-1}..p_n^{i_n}$. The Chinese remainder theorem implies that $\mathbb{Z}_m\simeq \mathbb{Z}/p_1^{n_1}\times...\times \mathbb{Z}/p_1^{n_1}$ and $\mathbb{Z}_m/p_1^{n_1}..p_i^{n_i-1}..p_n^{i_n}\simeq\mathbb{Z}/p_i$.
A: All prime and maximal ideals of Z_n are precisely the principal ideal generated by the prime divisors of n.
The ideals of Z_n are precisely the principal ideal generated by the divisors of n. It is clear that ideal generated by prime divisors of n are prime. Now the ideal generated by composite divisors of n is not prime as xy=c €(c) but neither x € (c) nor y €(c), where c is a composite divisors of n.
Since Z_n is a finite comm ring with unity set of all prime ideals and maximal ideals coincide.
Hence the result....
A: Consider the canoncial map $$\pi:\Bbb Z\rightarrow \Bbb Z_n$$ If $\mathfrak m\subset\Bbb Z_n$ is a maximal ideal, then $\pi^{-1}(\mathfrak m)\subset\Bbb Z$ is maximal aswell. This means that $\pi^{-1}(\mathfrak m)=(p)$ for some prime $p\in\Bbb Z$. There are two cases to consider:

*

*If $p\mid n$ then $(p)$ is a maximal ideal of $\Bbb Z_n$, since $$\Bbb Z_n/(p)\equiv\Bbb Z_p$$


*If $p\not\mid n$ then $p$ is a unit in the ring $\Bbb Z_n$, so $(p)\cong \Bbb Z_n$
