First observe that the second statement follows from the first by taking the ideal
\(I=(0)\text{:}\) a maximal ideal containing
\((0)\) is the same thing as a maximal ideal.
Now let \(I\) be a proper ideal of \(R\text{,}\) and let \(X\) be the set of all proper ideals of \(R\) containing \(I\text{:}\)
\begin{align*}
X \amp =\{J\subseteq R\mid J \text{ a proper ideal}, I\subseteq J\}\text{.}
\end{align*}
Note that \(X\) is nonempty since \(I\in X\text{.}\) The binary relation given by set inclusion \(\subseteq\) gives \(X\) the structure of a POSET. We use Zornβs lemma to show that \(X\) has a maximal element with respect to \(\subseteq\text{.}\)
Consider any subset \(Y\subseteq X\) that is totally ordered with respect to \(\subseteq\text{.}\) We must show that \(Y\) has an upper bound in \(X\text{.}\) To this end we let
\begin{align*}
J^* \amp =\bigcup_{J\in Y}J\text{.}
\end{align*}
It is clear that \(J\subseteq J^*\) for all \(J\in Y\text{,}\) so it remains to show that \(J^*\in X\text{:}\) that is, we must show that (i) \(J^*\) is an ideal containing \(I\text{,}\) and (ii) \(J^*\ne R\text{.}\)
Since \(I\subseteq J\) for all \(J\in Y\text{,}\) and since \(J^*\) is the union of all such ideals, we have \(I\subseteq J^*\text{.}\) To show \(J^*\) is an ideal, we must show that it is a subgroup of \((R,+)\) and is closed under left and right multiplication by elements of \(R\text{.}\) Since \(I\subseteq J^*\text{,}\) we have \(0\in J^*\text{.}\) Now take \(a,b\in J^*\text{.}\) By definition we have \(a\in J\) and \(b\in J'\) for some ideals \(J,J'\in Y\text{.}\) Since \(Y\) is totally ordered, we have either \(J\subseteq J'\) or \(J'\subseteq\text{.}\) Assuming without loss of generality that the first condition holds, we may assume that \(a,b\in J\text{.}\) Since \(J\) is an ideal it follows that
\begin{align*}
-a\amp \in J \amp a+b\amp \in J \amp ab\amp \in J \text{,}
\end{align*}
and thus that \(-a,a+b,ab\in J^*\text{.}\) This shows that \(J^*\) is an ideal.
Next we show that
\(J^*\ne R\text{.}\) This is a consequence of the fact that in any ring
\(J=R\) for an ideal
\(J\) if and only if
\(1\in J\text{.}\) Since
\(J\ne R\) for all
\(J\in Y\text{,}\) it follows that
\(1\notin J\) for all
\(J\in Y\text{,}\) and hence that
\(1\notin J^*\text{.}\) Thus
\(J^*\ne R\text{.}\)
Having verified the conditions of Zornβs lemma for all nonempty well-ordered subsets of
\(X\text{,}\) we conclude that
\(X\) has a maximal element
\(M\text{.}\) By definition
\(M\ne R\) and
\(I\subseteq M\text{.}\) We conclude our proof by showing that
\(M\) is maximal. Suppose
\(M\subseteq J\) for some proper ideal
\(J\ne R\text{:}\) then
\(J\in X\) by definition, and hence
\(M=J\) by maximality. Thus
\(M\) is a maximal ideal of
\(R\text{.}\)