# What do functions on affine schemes preserve?

I apologize in advance for what is probably an obvious question but here goes:

What structure do functions on affine schemes respect?

If we consider other types of 'spaces' we have a notion of function on them which respect structure relevant to the type of 'space'.

For a smooth manifold, we consider differential functions to $\mathbb{R}$(or $\mathbb{C}$ if you like) which respect the Differential structure.

In the case of affine schemes, functions are simply elements of our ring. Why is this natural to think of functions on schemes as elements of the underlying ring, and what structure preservation does this emerge from?

I hope this is clear.

-

I'm still very much a novice in algebraic geometry, but as far as I know, when one views the elements of a ring $R$ as "functions" on $\text{Spec}(R)$, this is not from the point of view of preserving any structure. In fact, they aren't actually functions per se, since the "value" of $f\in R$ at $p\in\text{Spec}(R)$ is $\overline{f}\in\kappa(p)$, and the field $\kappa(p)$ can vary as $p$ varies. One reason that viewing $R$ as "functions" on $\text{Spec}(R)$ is useful (besides the fact that it generalizes the case of a variety $X$, when all the $\kappa(p)$'s are $\mathbb{C}$, and the elements of the coordinate ring $A(X)$ are actually functions) is that it motivates the definition of a morphism of affine schemes $f:\text{Spec}(S)\rightarrow\text{Spec}(R)$ to be a map such that we can "pull back" "functions" on $\text{Spec}(R)$ to "functions" on $\text{Spec}(S)$ (i.e., send elements of $R$ to elements of $S$, i.e. have a homomorphism from $R$ to $S$, which we know is in fact equivalent to a map of schemes from $\text{Spec}(S)$ to $\text{Spec}(R)$). By analogy, a map of manifolds $f:M\rightarrow N$ is smooth iff for any smooth function $g:N\rightarrow\mathbb{R}$, the pullback $g\circ f$ is a smooth function on $M$.

So I think that $R$-as-functions-on-$\text{Spec}(R)$ should really be considered as something special, and inherent to the structure of $\text{Spec}(R)$ (specifically, this is the structure sheaf), and that this then motivates the definition of a morphism of schemes as something which preserves that.

EDIT: Oh, I should also mention a neat idea from Eisenbud + Harris that also motivates the "function" analogy:

-

If you like, "affine structure." A scheme is a gadget that locally looks like an affine scheme, and a morphism of schemes is a gadget that locally looks like a morphism of affine schemes. Then an element of a ring $R$ is precisely a morphism $\mathbb{Z}[x] \to R$, or in the other direction a morphism $\text{Spec } R \to \text{Spec } \mathbb{Z}[x] \cong \mathbb{A}^1(\mathbb{Z})$.

But it is also valid to argue that the functions are the structure, in the sense that all of these categories (manifolds, smooth manifolds, schemes, etc.) are full subcategories of the category of locally ringed spaces.

-