Lemma 10.114.4. Let $k$ be a field. Let $S$ be a finite type $k$-algebra which is an integral domain. Then $\dim (S) = \dim (S_{\mathfrak m})$ for any maximal ideal $\mathfrak m$ of $S$. In words: every maximal chain of primes has length equal to the dimension of $S$.

Proof. Write $S = k[x_1, \ldots , x_ n]/\mathfrak p$. By Proposition 10.114.2 and Lemma 10.114.3 all the maximal chains of primes in $S$ (which necessarily end with a maximal ideal) have length $n - \text{height}(\mathfrak p)$. Thus this number is the dimension of $S$ and of $S_{\mathfrak m}$ for any maximal ideal $\mathfrak m$ of $S$. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).