Are morphisms of schemes determined by morphisms of $A$-valued points where $A$ is an affine scheme

algebraic-geometrycommutative-algebraschemes

Let $X$ be an $S$-scheme. Then by Yoneda lemma we know it's determined by $X(Y) = Hom_S(Y,X)$ where $Y$ ranges over all schemes over $S$.

But it seems like it is enough to consider $Y$ where $Y$ ranges only over all affine schemes over $S$.

Why is this so?

Also, does this extend to morphisms? Suppose we have two $S$-schemes $X_1$ and $X_2$. To give a morphism $f: X_1 \rightarrow X_2$, is enough to give a compatible set of morphisms $f_R : X_1(R) \rightarrow X_2(R)$ where $R$ is an affine scheme over $S$?

Best Answer

Following Pedro Tamaroff's comment, the correct idea should be that a scheme is a colimit (gluing) of affine schemes, and as $\rm Hom$ functors preserve colimits, this means that once you know $\rm {Hom}(Y,X)$ for all affine schemes, you can compute what $\rm{Hom}(Y,X)$ has to be for general schemes by writing $Y$ as a colimit of affines.

The details of the statement "every scheme is a colimit of affine schemes" are basic category theory, but you have to find the correct lens to look through. This MO post gives complete details.

Related Question