By definition, the dimension of a schemeX is the dimension of the underlyingtopological space: the supremum of the lengthsℓ of chains ofirreducible closed subsets:
In particular, if is anaffine scheme, then such chains correspond to chains ofprime ideals (inclusion reversed) and so the dimension ofX is precisely theKrull dimension ofA.
IfY is an irreducible closed subset of a schemeX, then the codimension ofY inX is the supremum of the lengthsℓ of chains of irreducible closed subsets:
An irreducible subset ofX is anirreducible component ofX if and only if the codimension of it inX is zero. If is affine, then the codimension ofY inX is precisely the height of the prime ideal definingY inX.
If a finite-dimensionalvector spaceV over a field is viewed as a scheme over the field,[note 1] then the dimension of the schemeV is the same as the vector-space dimension ofV.
Let,k a field. Then it has dimension 2 (since it contains thehyperplane as an irreducible component). Ifx is a closed point ofX, then is 2 ifx lies inH and is 1 if it is in. Thus, for closed pointsx can vary.
LetR be adiscrete valuation ring and the affine line over it. Let be the projection. consists of 2 points, corresponding to themaximal ideal and closed and the zero ideal and open. Then the fibers are closed and open, respectively. We note that has dimension one,[note 2] while has dimension and is dense in. Thus, the dimension of the closure of an open subset can be strictly bigger than that of the open set.
Continuing the same example, let be the maximal ideal ofR and a generator. We note that has height-two and height-one maximal ideals; namely, and the kernel of. The first ideal is maximal since thefield of fractions ofR. Also, has height one byKrull's principal ideal theorem and has height two since. Consequently,
Anequidimensional scheme (or,pure dimensional scheme) is ascheme all of whoseirreducible components are of the samedimension (implicitly assuming the dimensions are all well-defined).
Inaffine space, the union of a line and a point not on the line isnot equidimensional. In general, if two closed subschemes of some scheme, neither containing the other, have unequal dimensions, then their union is not equidimensional.
If a scheme issmooth (for instance,étale) over Spec k for some field k, then everyconnected component (which is then in fact an irreducible component), is equidimensional.
Let be amorphism locally offinite type between twoschemes and. The relative dimension of at a point is thedimension of thefiber. If all the nonempty fibers[clarification needed] are purely of the same dimension, then one says that is of relative dimension.[6]