Having read this (which is now technically correct), it makes sense to fill in some missing details, which could help other readers.
To be completely correct, one needs:
- Assume $I \neq R$
- Define $P=\{I \subset A : A \text{ is a proper ideal in } R\}$
Assumption 1 is necessary because the result is not true if $I=R$. A maximal ideal is by definition a proper subset of the ring.
For $P$ in assumption 2 above to exist, $P$ must contain at least one element. This follows #1 because $I$ is contained $P$.
To prove that $P$ contains a maximal ideal (which would clearly contain $I$) requires invoking the Zorn's lemma. Since set inclusion is a partial ordering on any collection of sets, we use the set inclusion predicate as the partial ordering on $P$.
To apply Zorn's lemma we take an arbitrary chain $C$ in $P$ and show it has an upper bound in $P$. Define $U_C = \cup C$ (which exists by the axiom of union of set theory). You can show that $U_C$ is an ideal and that it contains $I$. This takes a little bit of work, but it is routine. To show that $U_C$ is in $P$, one notices that $1 \neq U_C$ because none of the elements in $C$ contain $1$ (else they would not be proper ideals in $R$ and would not belong to $P$). Finally, it obvious that $U_C$ is an upper bound for the chain $C$.
Since we have shown that every chain $C$ in $P$ has an upper bound in $P$, Zorn's lemma states that $P$ has a maximal element. The maximal element in in $P$. Hence, by the definition of $P$, it contains $I$.
One more note, the ring $R$ must have unity. The unity requirement is essential to show that $U_C$ is an ideal not equal to $R$. Without assuming $1 \in R$, one CANNOT show that $U_C$ is a proper ideal in $P$.
To prove the result I will use two facts which can be easily find in internet (if not, just tell me):
- Let $R$ be a integral domain. Then, $R$ is a UFD iff every non zero prime ideal contains a prime element (Kaplansky criterion).
- In an integral domain every prime ideal is principal iff it is a PID.
Now we are going to prove:
If $R$ is a UFD of Krull dimension one, then it is a PID.
Let $ \mathfrak{p} $ be a non-trivial prime ideal of $ R $ (the ideal $ \langle 0\rangle $ is principal and prime since we are working over integral domains). Since $ R $ is a UFD, we know that there exists some prime element $ p\in\mathfrak{p} $ (Kaplansky). But then $ \langle p\rangle\subseteq\mathfrak{p} $ which implies that $ \mathfrak{p}=\langle p\rangle$, as we assumed every prime ideal to be maximal. Since every non trivial prime ideal is now principal, we conclude that $ R $ is a PID.
Actually you can prove that the converse is also true, using the fact that every PID is a UFD. Then take a prime ideal which we know to be principal and suppose that it is not maximal, which leads you directly to a contradiction
Best Answer
It is well known that every proper ideal is contained in a maximal ideal. If $a$ is a noninvertible element, then the generated ideal $(a)$ is not the whole ring. If it were, then $1\in (a)$, implying $ab=1$ for some $b$, a contradiction. As a proper ideal, $(a)$, and hence $a$, must then be contained in a maximal ideal.