In mathematics, a **scheme** is a mathematical structure that enlarges the notion of algebraic variety in several ways, such as taking account of multiplicities (the equations *x* = 0 and *x*^{2} = 0 define the same algebraic variety but different schemes) and allowing "varieties" defined over any commutative ring (for example, Fermat curves are defined over the integers).

**Scheme theory** was introduced by Alexander Grothendieck in 1960 in his treatise "Éléments de géométrie algébrique"; one of its aims was developing the formalism needed to solve deep problems of algebraic geometry, such as the Weil conjectures (the last of which was proved by Pierre Deligne).^{[1]} Strongly based on commutative algebra, scheme theory allows a systematic use of methods of topology and homological algebra. Scheme theory also unifies algebraic geometry with much of number theory, which eventually led to Wiles's proof of Fermat's Last Theorem.

Formally, a scheme is a topological space together with commutative rings for all of its open sets, which arises from gluing together spectra (spaces of prime ideals) of commutative rings along their open subsets. In other words, it is a ringed space which is locally a spectrum of a commutative ring.

The relative point of view is that much of algebraic geometry should be developed for a morphism *X* → *Y* of schemes (called a scheme *X* **over** *Y*), rather than for an individual scheme. For example, in studying algebraic surfaces, it can be useful to consider families of algebraic surfaces over any scheme *Y*. In many cases, the family of all varieties of a given type can itself be viewed as a variety or scheme, known as a moduli space.

For some of the detailed definitions in the theory of schemes, see the glossary of scheme theory.

The origins of algebraic geometry mostly lie in the study of polynomial equations over the real numbers. By the 19th century, it became clear (notably in the work of Jean-Victor Poncelet and Bernhard Riemann) that algebraic geometry was simplified by working over the field of complex numbers, which has the advantage of being algebraically closed.^{[2]} Two issues gradually drew attention in the early 20th century, motivated by problems in number theory: how can algebraic geometry be developed over any algebraically closed field, especially in positive characteristic? (The tools of topology and complex analysis used to study complex varieties do not seem to apply here.) And what about algebraic geometry over an arbitrary field?

Hilbert's Nullstellensatz suggests an approach to algebraic geometry over any algebraically closed field *k*: the maximal ideals in the polynomial ring *k*[*x*_{1},...,*x*_{n}] are in one-to-one correspondence with the set *k*^{n} of *n*-tuples of elements of *k*, and the prime ideals correspond to the irreducible algebraic sets in *k*^{n}, known as affine varieties. Motivated by these ideas, Emmy Noether and Wolfgang Krull developed the subject of **commutative algebra** in the 1920s and 1930s.^{[3]} Their work generalizes algebraic geometry in a purely algebraic direction: instead of studying the prime ideals in a polynomial ring, one can study the prime ideals in any commutative ring. For example, Krull defined the dimension of any commutative ring in terms of prime ideals. At least when the ring is Noetherian, he proved many of the properties one would want from the geometric notion of dimension.

Noether and Krull's commutative algebra can be viewed as an algebraic approach to *affine* algebraic varieties. However, many arguments in algebraic geometry work better for projective varieties, essentially because projective varieties are compact. From the 1920s to the 1940s, B. L. van der Waerden, André Weil and Oscar Zariski applied commutative algebra as a new foundation for algebraic geometry in the richer setting of projective (or quasi-projective) varieties.^{[4]} In particular, the Zariski topology is a useful topology on a variety over any algebraically closed field, replacing to some extent the classical topology on a complex variety (based on the topology of the complex numbers).

For applications to number theory, van der Waerden and Weil formulated algebraic geometry over any field, not necessarily algebraically closed. Weil was the first to define an *abstract variety* (not embedded in projective space), by gluing affine varieties along open subsets, on the model of manifolds in topology. He needed this generality for his construction of the Jacobian variety of a curve over any field. (Later, Jacobians were shown to be projective varieties by Weil, Chow and Matsusaka.)

The algebraic geometers of the Italian school had often used the somewhat foggy concept of the generic point of an algebraic variety. What is true for the generic point is true for "most" points of the variety. In Weil's *Foundations of Algebraic Geometry* (1946), generic points are constructed by taking points in a very large algebraically closed field, called a *universal domain*.^{[4]} Although this worked as a foundation, it was awkward: there were many different generic points for the same variety. (In the later theory of schemes, each algebraic variety has a single generic point.)

In the 1950s, Claude Chevalley, Masayoshi Nagata and Jean-Pierre Serre, motivated in part by the Weil conjectures relating number theory and algebraic geometry, further extended the objects of algebraic geometry, for example by generalizing the base rings allowed. The word *scheme* was first used in the 1956 Chevalley Seminar, in which Chevalley was pursuing Zariski's ideas.^{[5]} According to Pierre Cartier, it was André Martineau who suggested to Serre the possibility of using the spectrum of an arbitrary commutative ring as a foundation for algebraic geometry.^{[6]}

Grothendieck then gave the decisive definition of a scheme, bringing to a conclusion a generation of experimental suggestions and partial developments.^{[7]} He defined the spectrum *X* of a commutative ring *R* as the space of prime ideals of *R* with a natural topology (known as the Zariski topology), but augmented it with a sheaf of rings: to every open subset *U* he assigned a commutative ring *O*_{X}(*U*). These objects Spec(*R*) are the affine schemes; a general scheme is then obtained by "gluing together" affine schemes.

Much of algebraic geometry focuses on projective or quasi-projective varieties over a field *k*; in fact, *k* is often taken to be the complex numbers. Schemes of that sort are very special compared to arbitrary schemes; compare the examples below. Nonetheless, it is convenient that Grothendieck developed a large body of theory for arbitrary schemes. For example, it is common to construct a moduli space first as a scheme, and only later study whether it is a more concrete object such as a projective variety. Also, applications to number theory rapidly lead to schemes over the integers which are not defined over any field.

An **affine scheme** is a locally ringed space isomorphic to the spectrum Spec(*R*) of a commutative ring *R*. A **scheme** is a locally ringed space *X* admitting a covering by open sets *U*_{i}, such that each *U*_{i} (as a locally ringed space) is an affine scheme.^{[8]} In particular, *X* comes with a sheaf *O*_{X}, which assigns to every open subset *U* a commutative ring *O*_{X}(*U*) called the **ring of regular functions** on *U*. One can think of a scheme as being covered by "coordinate charts" which are affine schemes. The definition means exactly that schemes are obtained by gluing together affine schemes using the Zariski topology.

In the early days, this was called a *prescheme*, and a scheme was defined to be a separated prescheme. The term prescheme has fallen out of use, but can still be found in older books, such as Grothendieck's "Éléments de géométrie algébrique" and Mumford's "Red Book".^{[9]}

A basic example of an affine scheme is **affine n-space** over a field

Schemes form a category, with morphisms defined as morphisms of locally ringed spaces. (See also: morphism of schemes.) For a scheme *Y*, a scheme *X* **over** *Y* (or a *Y*-**scheme**) means a morphism *X* → *Y* of schemes. A scheme *X* **over** a commutative ring *R* means a morphism *X* → Spec(*R*).

An algebraic variety over a field *k* can be defined as a scheme over *k* with certain properties. There are different conventions about exactly which schemes should be called varieties. One standard choice is that a **variety** over *k* means an integral separated scheme of finite type over *k*.^{[10]}

A morphism *f*: *X* → *Y* of schemes determines a **pullback homomorphism** on the rings of regular functions, *f**: *O*(*Y*) → *O*(*X*). In the case of affine schemes, this construction gives a one-to-one correspondence between morphisms Spec(*A*) → Spec(*B*) of schemes and ring homomorphisms *B* → *A*.^{[11]} In this sense, scheme theory completely subsumes the theory of commutative rings.

Since **Z** is an initial object in the category of commutative rings, the category of schemes has Spec(**Z**) as a terminal object.

For a scheme *X* over a commutative ring *R*, an *R*-**point** of *X* means a section of the morphism *X* → Spec(*R*). One writes *X*(*R*) for the set of *R*-points of *X*. In examples, this definition reconstructs the old notion of the set of solutions of the defining equations of *X* with values in *R*. When *R* is a field *k*, *X*(*k*) is also called the set of *k*-rational points of *X*.

More generally, for a scheme *X* over a commutative ring *R* and any commutative *R*-algebra *S*, an *S*-**point** of *X* means a morphism Spec(*S*) → *X* over *R*. One writes *X*(*S*) for the set of *S*-points of *X*. (This generalizes the old observation that given some equations over a field *k*, one can consider the set of solutions of the equations in any field extension *E* of *k*.) For a scheme *X* over *R*, the assignment *S* ↦ *X*(*S*) is a functor from commutative *R*-algebras to sets. It is an important observation that a scheme *X* over *R* is determined by this functor of points.^{[12]}

The fiber product of schemes always exists. That is, for any schemes *X* and *Z* with morphisms to a scheme *Y*, the fiber product *X*×_{Y}*Z* (in the sense of category theory) exists in the category of schemes. If *X* and *Z* are schemes over a field *k*, their fiber product over Spec(*k*) may be called the **product** *X* × *Z* in the category of *k*-schemes. For example, the product of affine spaces A^{m} and A^{n} over *k* is affine space A^{m+n} over *k*.

Since the category of schemes has fiber products and also a terminal object Spec(**Z**), it has all finite limits.

Here and below, all the rings considered are commutative:

- Every affine scheme Spec(
*R*) is a scheme. - A polynomial
*f*over a field*k*,*f*∈*k*[*x*_{1}, ...,*x*_{n}], determines a closed subscheme*f*= 0 in affine space A^{n}over*k*, called an affine hypersurface. Formally, it can be defined asFor example, taking*k*to be the complex numbers, the equation*x*^{2}=*y*^{2}(*y*+1) defines a singular curve in the affine plane A^{2}_{C}, called a nodal cubic curve. - For any commutative ring
*R*and natural number*n*,**projective space****P**^{n}_{R}can be constructed as a scheme by gluing*n*+ 1 copies of affine*n*-space over*R*along open subsets. This is the fundamental example that motivates going beyond affine schemes. The key advantage of projective space over affine space is that**P**^{n}_{R}is proper over*R*; this is an algebro-geometric version of compactness. A related observation is that complex projective space**CP**^{n}is a compact space in the classical topology (based on the topology of**C**), whereas**C**^{n}is not (for*n*> 0). - A homogeneous polynomial
*f*of positive degree in the polynomial ring*R*[*x*_{0}, ...,*x*_{n}] determines a closed subscheme*f*= 0 in projective space**P**^{n}over*R*, called a projective hypersurface. In terms of the Proj construction, this subscheme can be written asFor example, the closed subscheme*x*^{3}+*y*^{3}=*z*^{3}of**P**^{2}_{Q}is an elliptic curve over the rational numbers. - The
**line with two origins**(over a field*k*) is the scheme defined by starting with two copies of the affine line over*k*, and gluing together the two open subsets A^{1}− 0 by the identity map. This is a simple example of a non-separated scheme. In particular, it is not affine.^{[13]} - A simple reason to go beyond affine schemes is that an open subset of an affine scheme need not be affine. For example, let
*X*= A^{n}− 0, say over the complex numbers**C**; then*X*is not affine for*n*≥ 2. (The restriction on*n*is necessary: the affine line minus the origin is isomorphic to the affine scheme Spec(**C**[*x*,*x*^{−1}]). To show that*X*is not affine, one computes that every regular function on*X*extends to a regular function on A^{n}, when*n*≥ 2. (This is analogous to Hartogs's lemma in complex analysis, though easier to prove.) That is, the inclusion*f*:*X*→ A^{n}induces an isomorphism from*O*(A^{n}) =**C**[*x*_{1}, ....,*x*_{n}] to*O*(*X*). If*X*were affine, it would follow that*f*was an isomorphism. But*f*is not surjective and hence not an isomorphism. Therefore, the scheme*X*is not affine.^{[14]} - Let
*k*be a field. Then the scheme is an affine scheme whose underlying topological space is the Stone–Čech compactification of the positive integers (with the discrete topology). In fact, the prime ideals of this ring are in one-to-one correspondence with the ultrafilters on the positive integers, with the ideal corresponding to the principal ultrafilter associated to the positive integer*n*.^{[15]}This topological space is zero-dimensional, and in particular, each point is an irreducible component. Since affine schemes are quasi-compact, this is an example of a quasi-compact scheme with infinitely many irreducible components. (By contrast, a Noetherian scheme has only finitely many irreducible components.)

It is also fruitful to consider examples of morphisms as examples of schemes since they demonstrate their technical effectiveness for encapsulating many objects of study in algebraic and arithmetic geometry.

If we consider a polynomial then the affine scheme has a canonical morphism to and is called an Arithmetic surface. The fibers are then algebraic curves over the finite fields . If is an Elliptic curve then the fibers over its discriminant locus generated by where

then its discriminant is . In particular, this curve is singular over the prime numbers .

Here are some of the ways in which schemes go beyond older notions of algebraic varieties, and their significance.

**Field extensions.**Given some polynomial equations in*n*variables over a field*k*, one can study the set*X*(*k*) of solutions of the equations in the product set*k*^{n}. If the field*k*is algebraically closed (for example the complex numbers), then one can base algebraic geometry on sets such as*X*(*k*): define the Zariski topology on*X*(*k*), consider polynomial mappings between different sets of this type, and so on. But if*k*is not algebraically closed, then the set*X*(*k*) is not rich enough. Indeed, one can study the solutions*X*(*E*) of the given equations in any field extension*E*of*k*, but these sets are not determined by*X*(*k*) in any reasonable sense. For example, the plane curve*X*over the real numbers defined by*x*^{2}+*y*^{2}= −1 has*X*(**R**) empty, but*X*(**C**) not empty. (In fact,*X*(**C**) can be identified with**C**− 0.) By contrast, a scheme*X*over a field*k*has enough information to determine the set*X*(*E*) of*E*-rational points for every extension field*E*of*k*. (In particular, the closed subscheme of A^{2}_{R}defined by*x*^{2}+*y*^{2}= −1 is a nonempty topological space.)**Generic point.**The points of the affine line A^{1}_{C}, as a scheme, are its complex points (one for each complex number) together with one generic point (whose closure is the whole scheme). The generic point is the image of a natural morphism Spec(**C**(*x*)) → A^{1}_{C}, where**C**(*x*) is the field of rational functions in one variable. To see why it is useful to have an actual "generic point" in the scheme, consider the following example.- Let
*X*be the plane curve*y*^{2}=*x*(*x*−1)(*x*−5) over the complex numbers. This is a closed subscheme of A^{2}_{C}. It can be viewed as a ramified double cover of the affine line A^{1}_{C}by projecting to the*x*-coordinate. The fiber of the morphism*X*→ A^{1}over the generic point of A^{1}is exactly the generic point of*X*, yielding the morphismThis in turn is equivalent to the degree-2 extension of fieldsThus, having an actual generic point of a variety yields a geometric relation between a degree-2 morphism of algebraic varieties and the corresponding degree-2 extension of function fields. This generalizes to a relation between the fundamental group (which classifies covering spaces in topology) and the Galois group (which classifies certain field extensions). Indeed, Grothendieck's theory of the étale fundamental group treats the fundamental group and the Galois group on the same footing.

**Nilpotent elements**. Let*X*be the closed subscheme of the affine line A^{1}_{C}defined by*x*^{2}= 0, sometimes called a**fat point**. The ring of regular functions on*X*is**C**[*x*]/(*x*^{2}); in particular, the regular function*x*on*X*is nilpotent but not zero. To indicate the meaning of this scheme: two regular functions on the affine line have the same restriction to*X*if and only if they have the same value*and first derivative*at the origin. Allowing such non-**reduced**schemes brings the ideas of calculus and infinitesimals into algebraic geometry.- For a more elaborate example, one can describe all the zero-dimensional closed subschemes of degree 2 in a smooth complex variety
*Y*. Such a subscheme consists of either two distinct complex points of*Y*, or else a subscheme isomorphic to*X*= Spec**C**[*x*]/(*x*^{2}) as in the previous paragraph. Subschemes of the latter type are determined by a complex point*y*of*Y*together with a line in the tangent space T_{y}*Y*.^{[17]}This again indicates that non-reduced subschemes have geometric meaning, related to derivatives and tangent vectors.

Main article: Coherent sheaf |

A central part of scheme theory is the notion of coherent sheaves, generalizing the notion of (algebraic) vector bundles. For a scheme *X*, one starts by considering the abelian category of ** O_{X}-modules**, which are sheaves of abelian groups on

Coherent sheaves include the important class of **vector bundles**, which are the sheaves that locally come from finitely generated free modules. An example is the tangent bundle of a smooth variety over a field. However, coherent sheaves are richer; for example, a vector bundle on a closed subscheme *Y* of *X* can be viewed as a coherent sheaf on *X* which is zero outside *Y* (by the direct image construction). In this way, coherent sheaves on a scheme *X* include information about all closed subschemes of *X*. Moreover, sheaf cohomology has good properties for coherent (and quasi-coherent) sheaves. The resulting theory of coherent sheaf cohomology is perhaps the main technical tool in algebraic geometry.^{[18]}^{[19]}

Considered as its functor of points, a scheme is a functor which is a sheaf of sets for the Zariski topology on the category of commutative rings, and which, locally in the Zariski topology, is an affine scheme. This can be generalized in several ways. One is to use the étale topology. Michael Artin defined an **algebraic space** as a functor which is a sheaf in the étale topology and which, locally in the étale topology, is an affine scheme. Equivalently, an algebraic space is the quotient of a scheme by an étale equivalence relation. A powerful result, the Artin representability theorem, gives simple conditions for a functor to be represented by an algebraic space.^{[20]}

A further generalization is the idea of a stack. Crudely speaking, **algebraic stacks** generalize algebraic spaces by having an algebraic group attached to each point, which is viewed as the automorphism group of that point. For example, any action of an algebraic group *G* on an algebraic variety *X* determines a **quotient stack** [*X*/*G*], which remembers the stabilizer subgroups for the action of *G*. More generally, moduli spaces in algebraic geometry are often best viewed as stacks, thereby keeping track of the automorphism groups of the objects being classified.

Grothendieck originally introduced stacks as a tool for the theory of descent. In that formulation, stacks are (informally speaking) sheaves of categories.^{[21]} From this general notion, Artin defined the narrower class of algebraic stacks (or "Artin stacks"), which can be considered geometric objects. These include Deligne–Mumford stacks (similar to orbifolds in topology), for which the stabilizer groups are finite, and algebraic spaces, for which the stabilizer groups are trivial. The Keel–Mori theorem says that an algebraic stack with finite stabilizer groups has a coarse moduli space which is an algebraic space.

Another type of generalization is to enrich the structure sheaf, bringing algebraic geometry closer to homotopy theory. In this setting, known as derived algebraic geometry or "spectral algebraic geometry", the structure sheaf is replaced by a homotopical analog of a sheaf of commutative rings (for example, a sheaf of E-infinity ring spectra). These sheaves admit algebraic operations which are associative and commutative only up to an equivalence relation. Taking the quotient by this equivalence relation yields the structure sheaf of an ordinary scheme. Not taking the quotient, however, leads to a theory which can remember higher information, in the same way that derived functors in homological algebra yield higher information about operations such as tensor product and the Hom functor on modules.