Any scheme S has a unique morphism to Spec(Z), the scheme associated to the ring of integers. Therefore a scheme may be identified to its morphism to Spec(Z), in a similar way as rings may be identified to associative algebras over the integers. This is the starting point, of the relative point of view, which consists of studying only morphisms of schemes. This does not restrict the generality, and allows easily specifying some properties of schemes. For example, an algebraic variety over a field F defines a morphism of a scheme to Spec(F), to which the variety may be identified.

For details on the development of scheme theory, which quickly becomes technically demanding, see first glossary of scheme theory.

The algebraic geometers of the Italian school had often used the somewhat foggy concept of "generic point" when proving statements about algebraic varieties. What is true for the generic point is true for all points of the variety except a small number of special points. In the 1920s, Emmy Noether had first suggested a way to clarify the concept: start with the coordinate ring of the variety (the ring of all polynomial functions defined on the variety); the maximal ideals of this ring will correspond to ordinary points of the variety (under suitable conditions), and the non-maximal prime ideals will correspond to the various generic points, one for each subvariety. By taking all prime ideals, one thus gets the whole collection of ordinary and generic points. Noether did not pursue this approach.

In the 1930s, Wolfgang Krull turned things around and took a radical step: start with any commutative ring, consider the set of its prime ideals, turn it into a topological space by introducing the Zariski topology, and study the algebraic geometry of these quite general objects. Others did not see the point of this generality and Krull abandoned it.

André Weil was especially interested in algebraic geometry over finite fields and other rings. In the 1940s he returned to the prime ideal approach; he needed an abstract variety (outside projective space) for foundational reasons, particularly for the existence in an algebraic setting of the Jacobian variety. In Weil's main foundational book (1946), generic points are constructed by taking points in a very large algebraically closed field, called a universal domain.

Alexander Grothendieck then gave the decisive definition, bringing to a conclusion a generation of experimental suggestions and partial developments.[citation needed] He defined the spectrum of a commutative ring as the space of prime ideals with Zariski topology, but augments it with a sheaf of rings: to every Zariski-open set he assigns a commutative ring, thought of as the ring of "polynomial functions" defined on that set. These objects are the affine schemes; a general scheme is then obtained by "gluing together" several such affine schemes, in analogy to the fact that general varieties can be obtained by gluing together affine varieties.

The generality of the scheme concept was initially criticized: some schemes are removed from having straightforward geometrical interpretation, which made the concept difficult to grasp. However, admitting arbitrary schemes makes the whole category of schemes better-behaved. Moreover, natural considerations regarding, for example, moduli spaces, lead to schemes that are "non-classical". The occurrence of these schemes that are not varieties (nor built up simply from varieties) in problems that could be posed in classical terms made for the gradual acceptance of the new foundations of the subject.

An affine scheme is a locally ringed space isomorphic to the spectrum of a commutative ring. We denote the spectrum of a commutative ring A by Spec(A). A scheme is a locally ringed space X admitting a covering by open sets Ui, such that the restriction of the structure sheaf OX to each Ui is an affine scheme. Therefore one may think of a scheme as being covered by "coordinate charts" of affine schemes. The above formal definition means exactly that schemes are obtained by glueing together affine schemes for the Zariski topology.

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

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 ⊗ZK) ≈ Spec (K ⊗Z/3ZK) ≈ Spec (K × K), a set with two elements, though Spec K has only a single element.

For a scheme S{\displaystyle S}, the category of schemes over S{\displaystyle S} has also fibre products, and since it has a final object S{\displaystyle S}, it follows that it has finite limits.

The sections of the structure sheaf OX of X are called regular functions, which are defined on each open subsets U in X. The invertible subsheaf of OX, denoted O*X, consists only of the invertible germs of regular functions under the multiplication. In most situations, the sheaf KX is defined on an open affine subset Spec A of X as the total quotient ringsQ(A) (though there are cases where the definition is more complicated).[3] The sections of KX are called rational functions on X. The invertible subsheaf of KX is denoted by K*X. The equivalent class of this invertible sheaf turns to be an abelian group with tensor products and isomorphic to H1(X, O*X), which is called Picard group. On projective varieties the sections of the structure sheaf OX defined on each open subsets U of X are also called regular functions though there are no global sections except for constants.

A commonly used generalization of schemes are the algebraic stacks. All schemes are algebraic stacks, but the category of algebraic stacks is richer in that it contains many quotient objects and moduli spaces that cannot be constructed as schemes; stacks can also have negative dimension. Standard constructions of scheme theory, such as sheaves and étale cohomology, can be extended to algebraic stacks.