TITLE: Let $R$ be a commutative ring with $1$. Suppose that every nonzero proper ideal of $R$ is maximal. Prove that there are at most two such ideals.
QUESTION [12 upvotes]: Let $R$ be a commutative ring with $1$. Suppose that every nonzero proper ideal of $R$ is maximal. Prove that there are at most two such ideals.

Help me some hints. I have no idea to start.
Thanks in advanced.

REPLY [14 votes]: Suppose that $R$ has more than one maximal ideal, say $M_1$ and $M_2$. Then $M_1\cap M_2$ is a proper ideal and it can not be maximal (since it is contained in both $M_1$ and $M_2$) therefore we must have $M_1\cap M_2 = 0$. Now by the chinese rimainder theorem we have 
$$R \cong \frac{R}{0} = \frac{R}{M_1\cap M_2} \cong \frac{R}{M_1}\times\frac{R}{M_2}$$
the right hand side is a product of two fields so it has exactly two maximal ideal. Thus $R$ can not have more than two maximal ideals.