The category of schemes
Schemes form a category if we take as morphisms the morphisms of locally ringed spaces.
Morphisms from schemes to affine schemes are completely understood in terms of ring homomorphisms by the following contravariant adjoint pair: For every scheme X and every commutative ring A we have a natural equivalence
Since Z is an initial object in the category of rings, the category of schemes has Spec(Z) as a final object.
The category of schemes has finite products, but one has to be careful: the underlying topological space of the product scheme of (X, OX) and (Y, OY) is normally not equal to the product of the topological spaces X and Y. In fact, the underlying topological space of the product scheme often has more points than the product of the underlying topological spaces. For example, if K is the field with nine elements, then Spec K × Spec K ≈ Spec (K ⊗Z K) ≈ Spec (K ⊗Z/3Z K) ≈ Spec (K × K), a set with two elements, though Spec K has only a single element.
For a scheme , the category of schemes over has also fibre products, and since it has a final object , it follows that it has finite limits.
Just as the R-modules are central in commutative algebra when studying the commutative ring R, so are the OX-modules central in the study of the scheme X with structure sheaf OX. (See locally ringed space for a definition of OX-modules.) The category of OX-modules is abelian. Of particular importance are the coherent sheaves on X, which arise from finitely generated (ordinary) modules on the affine parts of X. The category of coherent sheaves on X is also abelian.