= Solution
\b[The <affine-target adjunction for schemes> gives the natural bijection]
$$
\boxed{\operatorname{Hom}_{\mathrm{Sch}}(X,\operatorname{Spec}A)
\simeq\operatorname{Hom}_{\mathrm{Ring}}(A,\Gamma(X,\mathcal O_X)).}
$$
A <morphism of schemes> $f$ gives the homomorphism on <global sections> induced by $f^\#$, using $\Gamma(\operatorname{Spec}A,\mathcal O)=A$.
Conversely, let $\alpha:A\to\Gamma(X,\mathcal O_X)$ be a <ring homomorphism>. Choose an <affine open subscheme> cover $U_i=\operatorname{Spec}B_i$ of $X$. Restriction of <global sections> gives homomorphisms $A\to B_i$, hence <morphisms of schemes> $f_i:U_i\to\operatorname{Spec}A$. On any <affine open subscheme> $W\subseteq U_i\cap U_j$, both restrictions correspond to the same homomorphism $A\to\Gamma(W,\mathcal O_W)$. They therefore agree on $W$. Such affine opens cover the overlap, so the $f_i$ glue uniquely to a <morphism of schemes> $f:X\to\operatorname{Spec}A$.
The two constructions are inverse: the first recovers $\alpha$ on each $U_i$, hence on all of $X$, and the second recovers every restriction $f|_{U_i}$ of a given $f$. This proof needs neither affineness nor <quasi-compactness> of $X$.
Back to article page