# Functor represented by a scheme

In algebraic geometry, a functor represented by a scheme X is a set-valued contravariant functor on the category of schemes such that the value of the functor at each scheme S is (up to natural bijections, or one-to-one correspondence) the set of all morphisms $S\to X$. The functor F is then said to be naturally equivalent to the functor of points of X; and the scheme X is said to represent the functor F, and to classify geometric objects over S given by F.
A functor producing certain geometric objects over S might be represented by a scheme X. For example, the functor taking S to the set of all line bundles over S (or more precisely n-dimensional linear systems) is represented by the projective space $X=\mathbb {P} ^{n-1}$. Another example is the Hilbert scheme X of a scheme Y, which represents the functor sending a scheme S to the set of closed subschemes of $Y\times S$ which are flat families over S.
In some applications, it may not be possible to find a scheme that represents a given functor. This led to the notion of a stack, which is not quite a functor but can still be treated as if it were a geometric space. (A Hilbert scheme is a scheme rather than a stack, because, very roughly speaking, deformation theory is simpler for closed schemes.)
Some moduli problems are solved by giving formal solutions (as opposed to polynomial algebraic solutions) and in that case, the resulting functor is represented by a formal scheme. Such a formal scheme is then said to be algebraizable if there is a scheme that can represent the same functor, up to some isomorphisms.

## Motivation

The notion is an analog of a classifying space in algebraic topology, where each principal G-bundle over a space S is (up to natural isomorphisms) the pullback of the universal bundle $EG\to BG$ along some map $S\to BG$. To give a principal G-bundle over S is the same as to give a map (called a classifying map) from S to the classifying space $BG$.
A similar phenomenon in algebraic geometry is given by a linear system: to give a morphism from a base variety S to a projective space $X=\mathbb {P} ^{n}$ is equivalent to giving a basepoint-free linear system (or equivalently a line bundle) on S. That is, the projective space X represents the functor which gives all line bundles over S.
Yoneda's lemma says that a scheme X determines and is determined by its functor of points.

## Functor of points

Let X be a scheme. Its functor of points is the functor
   Hom(−,X) : (Affine schemes)$^{op}$ ⟶ Sets
sending an affine scheme Y to the set of scheme maps $Y\to X$.
A scheme is determined up to isomorphism by its functor of points. This is a stronger version of the Yoneda lemma, which says that a X is determined by the map Hom(−,X) : Schemes$^{op}$ → Sets.
Conversely, a functor F : (Affine schemes)$^{op}$ → Sets is the functor of points of some scheme if and only if F is a sheaf with respect to the Zariski topology on (Affine schemes), and F admits an open cover by affine schemes.

## Examples
### Points as characters

Let X be a scheme over the base ring B. If x is a set-theoretic point of X, then the residue field $k(x)$ is the residue field of the local ring ${\mathcal {O}}_{X,x}$ (i.e., the quotient by the maximal ideal). For example, if X is an affine scheme Spec(A) and x is a prime ideal ${\mathfrak {p}}$, then the residue field of x is the function field of the closed subscheme $\operatorname {Spec} (A/{\mathfrak {p}})$.
For simplicity, suppose $X=\operatorname {Spec} (A)$. Then the inclusion of a set-theoretic point x into X corresponds to the ring homomorphism:
    $A\to k(x)$
(which is $A\to A_{\mathfrak {p}}\to k({\mathfrak {p}})$ if $x={\mathfrak {p}}$.)
The above should be compared to the spectrum of a commutative Banach algebra.

### Points as sections

By the universal property of fiber product, each R-point of a scheme X determines a morphism of R-schemes
    $\operatorname {Spec} (R)\to X_{R}{\overset {\mathrm {def} }{=}}X\times _{\operatorname {Spec} (B)}\operatorname {Spec} (R)$;
i.e., a section of the projection $X_{R}\to \operatorname {Spec} (R)$. If S is a subset of X(R), then one writes $|S|\subset X_{R}$ for the set of the images of the sections determined by elements in S.

### Spec of the ring of dual numbers

Let $D=\operatorname {Spec} (k[t]/(t^{2}))$, the Spec of the ring of dual numbers over a field k and X a scheme over k. Then each $D\to X$ amounts to the tangent vector to X at the point that is the image of the closed point of the map. In other words, $X(D)$ is the set of tangent vectors to X.

## Universal object

Let $F$ be the functor represented by a scheme $X$. Under the isomorphism $F(X)\cong {\text{Hom}}(X,X)$, there is a unique element of $F(X)$ that corresponds to the identity map ${\text{id}}_{X}:X\to X$. This unique element is known as the universal object or the universal family (when the objects being classified are families). The universal object acts as a template from which all other elements in $F(S)$ for any scheme $S$ can be derived via pullback along a morphism from $S$ to $X$.