TITLE: A commutative ring whose all proper ideals are prime is a field.
QUESTION [5 upvotes]: Let $R$ be a commutative ring with $1$. Suppose that all ideals $I \neq R$ are prime. Prove that $R$ is a field.

Help me some hints.
Thanks a lot.

REPLY [14 votes]: First show that $R$ is a domain, by a suitable choice of ideal.
Then let $x \ne 0$, and deduce consequences from the fact that $xx \in x^2 R$.

REPLY [6 votes]: Hint: Consider some $r\in R$ and examine the principal ideal generated by $r^2$.