Lemma 28.10.2. Let $X$ be a scheme. The following are equal

1. The dimension of $X$.

2. The supremum of the dimensions of the local rings of $X$.

3. The supremum of $\dim _ x(X)$ for $x \in X$.

Proof. Note that given a chain of specializations

$\xi _ n \leadsto \xi _{n - 1} \leadsto \ldots \leadsto \xi _0$

of points of $X$ all of the points $\xi _ i$ correspond to prime ideals of the local ring of $X$ at $\xi _0$ by Schemes, Lemma 26.13.2. Hence we see that the dimension of $X$ is the supremum of the dimensions of its local rings. In particular $\dim _ x(X) \geq \dim (\mathcal{O}_{X, x})$ as $\dim _ x(X)$ is the minimum of the dimensions of open neighbourhoods of $x$. Thus $\sup _{x \in X} \dim _ x(X) \geq \dim (X)$. On the other hand, it is clear that $\sup _{x \in X} \dim _ x(X) \leq \dim (X)$ as $\dim (U) \leq \dim (X)$ for any open subset of $X$. $\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).