In mathematics, specifically algebraic geometry, a **scheme** is a 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* (EGA); 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.

Schemes elaborate the fundamental idea that an algebraic variety is best analyzed through the coordinate ring of regular algebraic functions defined on it (or on its subsets), and each subvariety corresponds to the ideal of functions which vanish on the subvariety. Intuitively, a scheme is a topological space consisting of closed points which correspond to geometric points, together with non-closed points which are generic points of irreducible subvarieties. The space is covered by an atlas of open sets, each endowed with a coordinate ring of regular functions, with specified coordinate changes between the functions over intersecting open sets. Such a structure is called a ringed space or a sheaf of rings.

Formally, a scheme is a ringed space covered by affine schemes. An affine scheme is the spectrum of a commutative ring; its points are the prime ideals of the ring, and its closed points are maximal ideals. The coordinate ring of an affine scheme is the ring itself, and the coordinate rings of open subsets are rings of fractions.

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 the base** *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 over the real numbers is simplified by working over the field of complex numbers, which has the advantage of being algebraically closed.^{[2]} The early 20th century saw analogies between algebraic geometry and number theory, suggesting the question: can algebraic geometry be developed over other fields, such as those with positive characteristic, and more generally over number rings like the integers, where the tools of topology and complex analysis used to study complex varieties do not seem to apply.

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 commutative algebra in the 1920s and 1930s.^{[3]} Their work generalizes algebraic geometry in a purely algebraic direction, generalizing the study of points (maximal ideals in a polynomial ring) to the study of prime ideals in any commutative ring. For example, Krull defined the dimension of a commutative ring in terms of prime ideals and, at least when the ring is Noetherian, he proved that this definition satisfies many of the intuitive properties of geometric 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 they 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 metric 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 abstract 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]} This worked awkwardly: 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 pursued 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]}

The theory took its definitive form in Grothendieck's *Éléments de géométrie algébrique* (EGA) and the later *Séminaire de géométrie algébrique* (SGA), bringing to a conclusion a generation of experimental suggestions and partial developments.^{[7]} Grothendieck 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*), which may be thought of as the coordinate ring of regular functions on *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,* most often over the complex numbers. Grothendieck developed a large body of theory for arbitrary schemes extending much of the geometric intuition for varieties. 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. Applying Grothendieck's theory to schemes over the integers and other number fields led to powerful new perspectives in number theory.

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" that 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]} The sheaf properties of *O*_{X}(*U*) mean that its elements*,* which are not necessarily functions, can neverthess be patched together from their restrictions in the same way as functions.

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.

Let be an algebraically closed field. The affine space is the algebraic variety of all points with coordinates in ; its coordinate ring is the polynomial ring . The corresponding scheme is a topological space with the Zariski topology, whose closed points are the maximal ideals , the set of polynomials vanishing at . The scheme also contains a non-closed point for each non-maximal prime ideal , whose vanishing defines an irreducible subvariety ; the topological closure of the scheme point is the subscheme , including all the closed points of the subvariety, i.e. with , or equivalently .

The scheme has a basis of open subsets given by the complements of hypersurfaces,

for irreducible polynomials . This set is endowed with its coordinate ring of regular functions

.

This induces a unique sheaf which gives the usual ring of rational functions regular on a given open set .

Each ring element , a polynomial function on , also defines a function on the points of the scheme whose value at lies in the quotient ring , the *residue ring*. We define as the image of under the natural map . A maximal ideal gives the *residue field* , with the natural isomorphism , so that corresponds to the original value .

The vanishing locus of a polynomial is a hypersurface subvariety , corresponding to the principal ideal . The corresponding scheme is , a closed subscheme of affine space. For example, taking to be the complex or real numbers, the equation defines a nodal cubic curve in the affine plane , corresponding to the scheme .

The ring of integers can be considered as the coordinate ring of the scheme . The Zariski topology has closed points , the principal ideals of the prime numbers ; as well as the generic point , the zero ideal, whose closure is the whole scheme. Closed sets are finite sets, and open sets are their complements, the cofinite sets; any infinite set of points is dense.

The basis open set corresponding to the irreducible element is , with coordinate ring . For the open set , this induces .

A number corresponds to a function on the scheme , a function whose value at lies in the residue field , the finite field of integers modulo *:* the function is defined by , and also in the generic residue ring . The function is determined by its values at the points only, so we can think of as a kind of "regular function" on the closed points, a very special type among the arbitrary functions with .

Note that the point is the vanishing locus of the function , the point where the value of is equal to zero in the residue field. The field of "rational functions" on is the fraction field of the generic residue ring, . A fraction has "poles" at the points corresponding to prime divisors of the denominator.

The affine space is a variety with coordinate ring , the polynomials with integer coefficients. The corresponding scheme is , whose points are all of the prime ideals . The closed points are maximal ideals of the form , where is a prime number, and is a non-constant polynomial with no integer factor and which is irreducible modulo . Thus, we may picture as two-dimensional, with a "characteristic direction" measured by the coordinate , and a "spatial direction" with coordinate .

A given prime number defines a "vertical line", the subscheme of the prime ideal : this contains for all , the "characteristic points" of the scheme. Fixing the -coordinate, we have the "horizontal line" , the subscheme of the prime ideal . We also have the line corresponding to the rational coordinate , which does not intersect for those which divide .

A higher degree "horizontal" subscheme like corresponds to -values which are roots of , namely . This behaves differently under different -coordinates. At , we get two points , since . At , we get one ramified double-point , since . And at , we get that is a prime ideal corresponding to in an extension field of ; since we cannot distinguish between these values (they are symmetric under the Galois group), we should picture as two fused points. Overall, is a kind of fusion of two Galois-symmetric horizonal lines, a curve of degree 2.

The residue field at is , a field extension of adjoining a root of ; this is a finite field with elements, . A polynomial corresponds to a function on the scheme with values , that is . Again each is determined by its values at closed points; is the vanishing locus of the constant polynomial ; and contains the points in each characteristic corresponding to Galois orbits of roots of in the algebraic closure .

The scheme is not proper, so that pairs of curves may fail to intersect with the expected multiplicity. This is a major obstacle to analyzing Diophantine equations with geometric tools. Arakelov theory overcomes this obstacle by compactifying affine arithmetic schemes, adding points at infinity corresponding to valuations.

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, where are all singular schemes.^{[13]} For example, if is a prime number and then its discriminant is . This curve is singular over the prime numbers .

- 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 as For 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.^{[14]} - 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.^{[15]} - 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*.^{[16]}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.)

This section needs expansion. You can help by adding to it. (March 2024)

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.

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 morphism This in turn is equivalent to the degree-2 extension of fields Thus, 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.- Nilpotent elements arise naturally in intersection theory. For example in the plane over a field , with coordinate ring , consider the
*x-*axis, which is the variety , and the parabola , which is . Their scheme-theoretic intersection is defined by the ideal . Since the intersection is not transverse, this is not merely the point defined by the ideal , but rather a fat point containing the*x-*axis tangent direction (the common tangent of the two curves) and having coordinate ring:The intersection multiplicity of 2 is defined as the length of this -module, i.e. its dimension as a -vector space. - 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* that 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 that is a sheaf of sets for the Zariski topology on the category of commutative rings, and that, 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 that is a sheaf in the étale topology and that, 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 that 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 that 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 that 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.