A commutative ring is called local if it has a unique maximal ideal. Prove that if is a local ring with a maximal ideal then every element of is a unit. Prove conversely that if is a commutative ring with in which the set of nonunits forms an ideal , then is a local ring with unique maximal ideal .
Let . Consider the ideal ; if proper, this ideal must be contained in some maximal ideal, and is the only maximal ideal. Thus , a contradiction since . Thus , and for some we have . Thus is a unit.
Suppose now that the set of nonunits in form an ideal. First we show that is maximal. If for some ideal , then contains a unit, so that . Now we show that is the unique maximal ideal. Suppose that we have an ideal such that . Then contains some element not in , which is a unit. Thus . In particular, every proper ideal of is contained in . Thus is the unique proper ideal of , and is local.