Canonical: https://knowlpedia.com/algebra-commutative/maximal-ideal-local-ring/

# Maximal ideal of a local ring

In a local ring, the unique maximal ideal is exactly the set of nonunits.

Let \(R\) be a [commutative ring](https://knowlpedia.com/algebra-rings/commutative-ring/). Write \(R^\times\) for its group of units and set
\[
\mathfrak m := R\setminus R^\times
\]
for the set of nonunits. Then the following are equivalent:

1. \(R\) is a [local ring](https://knowlpedia.com/algebra-commutative/local-ring/).
2. The set \(\mathfrak m\) is an ideal of \(R\).

When these conditions hold, \(\mathfrak m\) is the unique maximal ideal of \(R\).

## Remarks

For \(R_{\mathfrak p}\), the [localization at a prime](https://knowlpedia.com/algebra-commutative/localization-at-prime/), the unique maximal ideal is \(\mathfrak pR_{\mathfrak p}\), and the associated [residue field](https://knowlpedia.com/algebra-commutative/residue-field/) is \(R_{\mathfrak p}/\mathfrak pR_{\mathfrak p}\).

This units-versus-maximal-ideal dichotomy is used in [Nakayama's lemma](https://knowlpedia.com/algebra-commutative/nakayama-lemma/).

## Examples

1. **\(\mathbb Z_{(p)}\).** In \(R=\mathbb Z_{(p)}\), a fraction \(\frac{a}{b}\), where \(p\nmid b\), is a unit if and only if \(p\nmid a\). Thus the maximal ideal is \(p\mathbb Z_{(p)}\).

2. **\(k[x]_{(x)}\).** In \(R=k[x]_{(x)}\), the units are exactly the fractions \(\frac{f}{g}\) with \(f(0)\neq 0\). Hence the maximal ideal is generated by \(x\).

3. **A field.** In a field \(k\), the only nonunit is \(0\), so \(\mathfrak m=(0)\).
