(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.
Could you show me more detail about this 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$.