# How to prove a simple proposition about local rings and maximal ideals

(The word ring shall mean a commutative ring with an identity element in this question.)

Actually, there is a proof about this proposition, but I don't get it, even the first step.

Proposition: Let $A$ be a ring and $m \ne (1)$ an ideal of $A$ such that every $x\in A-m$ is a unit in $A$. Then $A$ is a local ring and $m$ its maximal ideal.

Proof on book: every ideal $\ne (1)$ consist of non-units, hence is contained in $m$. Hence $m$ is the only maximal ideal of $A$.

And I think I can use proposition that every non-unit of ring $A$ is contained in a maximal ideal to prove it, but I failed.

And I assumed I have proved that every ideal $\ne(1)$ consist of non-units. Then I can't figure the whole proof.

Suppose an ideal $I \subset A$ has an element $u \in I$ such that $u$ is a unit. Then by definition this means there exists $u^{-1} \in A$ such that $u^{-1}u = 1$. Now since $u^{-1}u \in I$, we get that $1 \in I$. Use this to conclude $I = (1)$.

The contrapositive of this statement is the one you seek: If $I \neq (1)$, then the all elements of $I$ are nonunits.

Now we have that no element of $I$ can be in $A - m$, since $A-m$ consists of only units and $I$ has no units in it. Thus, we get that $I \subset m$.

Since proper ideals cannot contain units, every element of a proper ideal is not an element of $A \setminus \mathfrak{m}$....

Step 1. Let $I$ be any ideal of the ring $R$. If $I$ contains a unit $u$, such that $uu'=1$, then as $u'I \subset I$ we get $1 =u'u \in I$, i.e. $I=R$

Step 2. Assume that $R$ is not local. Let $\mathfrak{m}'$ be a maximal ideal. Then by step 1 $\mathfrak{m}'$ can not contain elements of $R \setminus \mathfrak{m}$. Thus $\mathfrak{m}' \subset \mathfrak{m}$. But $\mathfrak{m}'$ is maximal. Thus $\mathfrak{m}'=\mathfrak{m}$.

Combinig 1 and 2 we get:

$\mathfrak{m}$ is the unique maximal ideal of $R$. Q.E.D