# What conditions guarantee that all maximal ideals have the same height?

It fails in general that all maximal ideals in a commutative ring with unity have the same height. It's easy to construct a counter-example when the ring is NOT an integral domain (consider the coordinate ring of a line union a surface). The intuition is that the dimensions at different points are different.

It is indeed true that all maximal ideals have the same height when the ring $A$ is a finitely generated algebra over some field $k$ and does not have any nonzero zero-divisors. This height equals the transcendence degree of $A$ over $k$. However, in general, even when the ring is a Noetherian integral domain, the statement may be false. A counter-example can be found in Atiyah and Macdonald's Introduction to Commutative Algebra, Exercise 4, Chapter 11 on Pg 126. This ring is "large" in some sense.

My question is that is there some more suitable condition that guarantees that all maximal prime ideals in an integral domain have the same height?

Thanks!

-
An easy counterexample: consider the polynome ring $B=k[x,y]$ with coefficients in a field $k$, let $m$ be a maximal ideal and $p$ a prime ideal of height $1$ not contained in $m$ and localize $B$ at the multiplicative subset $B\setminus (m\cup p)$. The ring obtained this way is semi-local, one maximal ideal is generated by $m$ (so has height $2$), the other one is generated by $p$ and has height $1$. –  user18119 Dec 9 '12 at 10:06
Also, if $R$ is a (non-trivial) discrete valuation ring, then $R[T]$ has dimension $2$ but has lot of principal maximal ideals. –  user18119 Dec 9 '12 at 10:13
@QiL. Thanks very much for your counterexample. It tells us that unequidimensionality can happen in some nice rings! –  Yang Zhou Dec 9 '12 at 15:49

Not an answer, but other examples. If $R$ is a Dedekind domain with infinitely many maximal ideals (so $R$ is a Jacobson ring), then for any finitely generated domain $A$ over $R$, all maximal ideals have the same height:
Proof. One can suppose $R\to A$ is injective (otherwise $A$ is finitely generated over a field). Then $A$ is flat over $R$ because torsion-free. So the non-empty fibers of $X:=\mathrm{Spec}(A)\to S:=\mathrm{Spec}(R)$ are pure of the same dimension $d$ (EGA IV.13.2.10 or "Algebraic geometry and arithmetic curves, 8.2.8) and $\dim X= d+\dim S=d+1$. Let $x$ be a closed point of $X$ (maximal ideal of $A$). As $A$ is Jacobson, the image $s$ of $x$ in $S$ is closed. As all irreducible components of $X_s$ have dimension $d$ and $S$ has dimension $1$, it is easy to see that $\mathrm{codim}(x,X)\ge d+1$ (the codimension is the height of the corresponding maximal ideal). As this codimension is bounded by $\dim X=d+1$, we have equality.
Edit A domain such that all maximal ideals have the same height is called equicodimensional (see EGA IV.5.1.1.6). In EGA IV.10.6.1, it is proved that if (I simplify some assumptions) $R$ is a equicodimensional Jacobson domain, quotient of a regular domain, then any domain finitely generated over over $R$ is equicodimensional. My above example (with $R$ Dedekind) is a special case.