Definition

If is a topological space, we define the dimension of (denoted ) to be the supremum of all integers such that there exists a chain of distinct irreducible closed subsets of .

We define the dimension of an affine or quasi-affine variety to be its dimension as a topological space.

Example. The dimension of is . Indeed, the only irreducible closed subsets of are the whole space and single points.

Definition

In a ring , the height of a prime ideal is the supremum of all integers such that there exists a chain of distinct prime ideals. We define the dimension (or Krull dimension) of to be the supremum of the heights of all prime ideals.

Proposition

If is an affine algebraic set, then the dimension of is equal to the dimension of its affine coordinate ring .

\begin{proof} If is an affine algebraic set in , then the closed irreducible subsets of correspond to prime ideals of containing . These in turn correspond to prime ideals of . Hence is the length of the longest chain of prime ideals in , which is its dimension.