A morphism of schemes f:X→Yf:X\to Y is a . It consists of a of underlying spaces and a compatible of into a :

f#:OY⟶f∗OX.f^\#:\mathcal O_Y\longrightarrow f_*\mathcal O_X.

For every x∈Xx\in X, the induced map on

fx#:OY,f(x)⟶OX,xf_x^\#:\mathcal O_{Y,f(x)}\longrightarrow\mathcal O_{X,x}

must be a local ring homomorphism: the inverse image of the target's maximal ideal is the source's maximal ideal.

The basic example comes from a φ:A→B\varphi:A\to B. It induces a morphism of

Spec⁡B⟶Spec⁡A,q⟼φ−1(q).\operatorname{Spec}B\longrightarrow\operatorname{Spec}A, \qquad \mathfrak q\longmapsto\varphi^{-1}(\mathfrak q).

The reversed direction is fundamental: Spec⁡\operatorname{Spec} is contravariant. In particular, a field inclusion F↪KF\hookrightarrow K gives Spec⁡K→Spec⁡F\operatorname{Spec}K\to\operatorname{Spec}F.