TITLE: Proof that an ideal $M$ is maximal iff $R/M$ is a field
QUESTION [5 upvotes]: I am referencing the proof located at http://www.maths.nuigalway.ie/MA416/section3-4.pdf, Theorem 3.4.2.
I am only looking at the right to left direction. I understand the following:
Let $a \in I, a \not\in M$.
$\rightarrow a + M$ is not the zero element of $R/M$.
$\rightarrow \exists \; b \in R \;$  s.t.  $\;(a+M)(b+M) = 1 + M$.
$\rightarrow ab-1 \in M$ *
Define $m = ab-1$.
$\rightarrow 1=ab-m$
$\rightarrow 1 \in I$ *
Except the starred steps, I do not understand how those were obtained from the information provided before them.

REPLY [4 votes]: It seems that you are trying to show that if $R/M$ is a field, then $M$ is maximal. So you assume that $I$ is another ideal of $R$ with $M \subset I$, and you want to show that $I = R$.
Note that $(a+M)(b+M) = ab + M$ by definition of multiplication on the quotient ring, so $(a+M)(b+M) = 1 + M \Leftrightarrow ab+M = 1 + M \Leftrightarrow (ab - 1) + M = M \Leftrightarrow ab - 1 \in M$.
As $a \in I$, $ab \in Ib = I$ as $I$ is an ideal. As $m = ab - 1 \in M$ and $M \subset I$, $m \in I$. As $I$ is an ideal $1 = ab - m \in I$.