# Krull dimension

In commutative algebra, the Krull dimension of a commutative ring R, named after Wolfgang Krull, is the supremum of the lengths of all chains of prime ideals. The Krull dimension need not be finite even for a Noetherian ring. More generally the Krull dimension can be defined for modules over possibly non-commutative rings as the deviation of the poset of submodules.
The Krull dimension was introduced to provide an algebraic definition of the dimension of an algebraic variety: the dimension of the affine variety defined by an ideal I in a polynomial ring R is the Krull dimension of R/I.
A field k has Krull dimension 0; more generally, k[x$_1$, ..., x$_n$] has Krull dimension n. A principal ideal domain that is not a field has Krull dimension 1. A local ring has Krull dimension 0 if and only if every element of its maximal ideal is nilpotent.
There are several other ways that have been used to define the dimension of a ring. Most of them coincide with the Krull dimension for Noetherian rings, but can differ for non-Noetherian rings.

## Explanation

We say that a chain of prime ideals of the form ${\mathfrak {p}}_{0}\subsetneq {\mathfrak {p}}_{1}\subsetneq \ldots \subsetneq {\mathfrak {p}}_{n}$ has length n. That is, the length is the number of strict inclusions, not the number of primes; these differ by 1. We define the Krull dimension of $R$ to be the supremum of the lengths of all chains of prime ideals in $R$.
Given a prime ideal ${\mathfrak {p}}$ in R, we define the height of ${\mathfrak {p}}$, written $\operatorname {ht} ({\mathfrak {p}})$, to be the supremum of the lengths of all chains of prime ideals contained in ${\mathfrak {p}}$, meaning that ${\mathfrak {p}}_{0}\subsetneq {\mathfrak {p}}_{1}\subsetneq \ldots \subsetneq {\mathfrak {p}}_{n}={\mathfrak {p}}$. In other words, the height of ${\mathfrak {p}}$ is the Krull dimension of the localization of R at ${\mathfrak {p}}$. A prime ideal has height zero if and only if it is a minimal prime ideal. The Krull dimension of a ring is the supremum of the heights of all maximal ideals, or those of all prime ideals. The height is also sometimes called the codimension, rank, or altitude of a prime ideal.
In a Noetherian ring, every prime ideal has finite height. Nonetheless, Nagata gave an example of a Noetherian ring of infinite Krull dimension. A ring is called catenary if any inclusion ${\mathfrak {p}}\subset {\mathfrak {q}}$ of prime ideals can be extended to a maximal chain of prime ideals between ${\mathfrak {p}}$ and ${\mathfrak {q}}$, and any two maximal chains between ${\mathfrak {p}}$ and ${\mathfrak {q}}$ have the same length. A ring is called universally catenary if any finitely generated algebra over it is catenary. Nagata gave an example of a Noetherian ring which is not catenary.
In a Noetherian ring, a prime ideal has height at most n if and only if it is a minimal prime ideal over an ideal generated by n elements (Krull's height theorem and its converse). It implies that the descending chain condition holds for prime ideals in such a way the lengths of the chains descending from a prime ideal are bounded by the number of generators of the prime.
More generally, the height of an ideal I is the infimum of the heights of all prime ideals containing I. In the language of algebraic geometry, this is the codimension of the subvariety of Spec($R$) corresponding to I.

## Schemes

It follows readily from the definition of the spectrum of a ring Spec(R), the space of prime ideals of R equipped with the Zariski topology, that the Krull dimension of R is equal to the dimension of its spectrum as a topological space, meaning the supremum of the lengths of all chains of irreducible closed subsets. This follows immediately from the Galois connection between ideals of R and closed subsets of Spec(R) and the observation that, by the definition of Spec(R), each prime ideal ${\mathfrak {p}}$ of R corresponds to a generic point of the closed subset associated to ${\mathfrak {p}}$ by the Galois connection.

## Examples

* The dimension of a polynomial ring over a field k[x$_1$, ..., x$_n$] is the number of variables n. In the language of algebraic geometry, this says that the affine space of dimension n over a field has dimension n, as expected. In general, if R is a Noetherian ring of dimension n, then the dimension of R[x] is n + 1. If the Noetherian hypothesis is dropped, then R[x] can have dimension anywhere between n + 1 and 2n + 1.
* For example, the ideal ${\mathfrak {p}}=(y^{2}-x,y)\subset \mathbb {C} [x,y]$ has height 2 since we can form the maximal ascending chain of prime ideals$(0)={\mathfrak {p}}_{0}\subsetneq (y^{2}-x)={\mathfrak {p}}_{1}\subsetneq (y^{2}-x,y)={\mathfrak {p}}_{2}={\mathfrak {p}}$.
* Given an irreducible polynomial $f\in \mathbb {C} [x,y,z]$, the ideal $I=(f^{3})$ is not prime (since $f\cdot f^{2}\in I$, but neither of the factors are), but we can easily compute the height since the smallest prime ideal containing $I$ is just $(f)$.
* The ring of integers Z has dimension 1. More generally, any principal ideal domain that is not a field has dimension 1.
* An integral domain is a field if and only if its Krull dimension is zero. Dedekind domains that are not fields (for example, discrete valuation rings) have dimension one.
* The Krull dimension of the zero ring is typically defined to be either $-\infty$ or $-1$. The zero ring is the only ring with a negative dimension.
* A ring is Artinian if and only if it is Noetherian and its Krull dimension is ≤0.
* An integral extension of a ring has the same dimension as the ring does.
* Let R be an algebra over a field k that is an integral domain. Then the Krull dimension of R is less than or equal to the transcendence degree of the field of fractions of R over k. The equality holds if R is finitely generated as an algebra (for instance by the Noether normalization lemma).
* Let R be a Noetherian ring, I an ideal and $\operatorname {gr} _{I}(R)=\bigoplus _{k=0}^{\infty }I^{k}/I^{k+1}$ be the associated graded ring (geometers call it the ring of the normal cone of I). Then $\operatorname {dim} \operatorname {gr} _{I}(R)$ is the supremum of the heights of maximal ideals of R containing I.
* A commutative Noetherian ring of Krull dimension zero is a direct product of a finite number (possibly one) of local rings of Krull dimension zero.
* A Noetherian local ring is called a Cohen–Macaulay ring if its dimension is equal to its depth. A regular local ring is an example of such a ring.
* A Noetherian integral domain is a unique factorization domain if and only if every height 1 prime ideal is principal.
* For a commutative Noetherian ring the three following conditions are equivalent: being a reduced ring of Krull dimension zero, being a field or a direct product of fields, being von Neumann regular.

## Of a module

If R is a commutative ring, and M is an R-module, we define the Krull dimension of M to be the Krull dimension of the quotient of R making M a faithful module. That is, we define it by the formula:
    $\dim _{R}M:=\dim(R/{\operatorname {Ann} _{R}(M)})$
where Ann$_R$(M), the annihilator, is the kernel of the natural map R → End$_R$(M) of R into the ring of R-linear endomorphisms of M.
In the language of schemes, finitely generated modules are interpreted as coherent sheaves, or generalized finite rank vector bundles.

## For non-commutative rings

The Krull dimension of a module over a possibly non-commutative ring is defined as the deviation of the poset of submodules ordered by inclusion. For commutative Noetherian rings, this is the same as the definition using chains of prime ideals. The two definitions can be different for commutative rings which are not Noetherian.