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. 
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.
 A: Look at the intersection, the sum, and the product of the two ideals. What can you say?
A: Supoose you have two nonzero ideals. The are both maximal and minimal, so their sum is the whole ring and their intersection is zero: it follows that the ring is the direct sum of the two ideals. Since they are both proper, neither of them contains $1$, so they are both rings with unit. As rings, the don't have any nonzero proper ideals, so they are in fact fields.
Our ring is therefore the direct product of two fields. By inspection, we can easily find all its ideals.
(we also get all possible examples, btw)
A: Let $I$ and $J$ be two distinct ideals of $R$. We know that neither is a subset of the other, so $I \subset I + J$. Since $I$ is maximal, $I + J = R$.
Assume there is a third non-zero proper ideal of $R$, call it $K$. Consider $(I + J)K$. On one hand, this must be $K$, because $I + J = R$, and $1 \in R$.
But it is also equal to $IK + JK$. If all non-zero proper ideals are maximal, what do you know about $IK$ and $JK$?
A: 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. 
A: Let $I_1,I_2,I_3$ be three distinct proper ideals of $R$. The maximality condition implies that $I_1 \cap I_2$ is the zero ideal. So, $I_3$ contains the intersection of $I_1$ and $I_2$. But $I_3$ is a prime ideal; therefore, $I_3$ contains one of $I_1$ or $I_2$. From maximality again, $I_3 = I_2$ or $I_3 = I_1$, contradicting the assumption of the ideals being distinct.
