# Sheaf of algebras

In algebraic geometry, a sheaf of algebras on a ringed space X is a sheaf of commutative rings on X that is also a sheaf of ${\mathcal {O}}_{X}$-modules. It is quasi-coherent if it is so as a module.
When X is a scheme, just like a ring, one can take the global Spec of a quasi-coherent sheaf of algebras: this results in the contravariant functor $\operatorname {Spec} _{X}$ from the category of quasi-coherent (sheaves of) ${\mathcal {O}}_{X}$-algebras on X to the category of schemes that are affine over X (defined below). Moreover, it is an equivalence: the quasi-inverse is given by sending an affine morphism $f:Y\to X$ to $f_{*}{\mathcal {O}}_{Y}.$

## Affine morphism

A morphism of schemes $f:X\to Y$ is called affine if $Y$ has an open affine cover $U_{i}$'s such that $f^{-1}(U_{i})$ are affine. For example, a finite morphism is affine. An affine morphism is quasi-compact and separated; in particular, the direct image of a quasi-coherent sheaf along an affine morphism is quasi-coherent.
The base change of an affine morphism is affine.
Let $f:X\to Y$ be an affine morphism between schemes and $E$ a locally ringed space together with a map $g:E\to Y$. Then the natural map between the sets:
    $\operatorname {Mor} _{Y}(E,X)\to \operatorname {Hom} _{{\mathcal {O}}_{Y}{\text{-alg}}}(f_{*}{\mathcal {O}}_{X},g_{*}{\mathcal {O}}_{E})$
is bijective.

## Examples

* Let $f:{\widetilde {X}}\to X$ be the normalization of an algebraic variety X. Then, since f is finite, $f_{*}{\mathcal {O}}_{\widetilde {X}}$ is quasi-coherent and $\operatorname {Spec} _{X}(f_{*}{\mathcal {O}}_{\widetilde {X}})={\widetilde {X}}$.
* Let $E$ be a locally free sheaf of finite rank on a scheme X. Then $\operatorname {Sym} (E^{*})$ is a quasi-coherent ${\mathcal {O}}_{X}$-algebra and $\operatorname {Spec} _{X}(\operatorname {Sym} (E^{*}))\to X$ is the associated vector bundle over X (called the total space of $E$.)
* More generally, if F is a coherent sheaf on X, then one still has $\operatorname {Spec} _{X}(\operatorname {Sym} (F))\to X$, usually called the abelian hull of F; see Cone (algebraic geometry)#Examples.

## The formation of direct images

Given a ringed space S, there is the category $C_{S}$ of pairs $(f,M)$ consisting of a ringed space morphism $f:X\to S$ and an ${\mathcal {O}}_{X}$-module $M$. Then the formation of direct images determines the contravariant functor from $C_{S}$ to the category of pairs consisting of an ${\mathcal {O}}_{S}$-algebra A and an A-module M that sends each pair $(f,M)$ to the pair $(f_{*}{\mathcal {O}},f_{*}M)$.
Now assume S is a scheme and then let $\operatorname {Aff} _{S}\subset C_{S}$ be the subcategory consisting of pairs $(f:X\to S,M)$ such that $f$ is an affine morphism between schemes and $M$ a quasi-coherent sheaf on $X$. Then the above functor determines the equivalence between $\operatorname {Aff} _{S}$ and the category of pairs $(A,M)$ consisting of an ${\mathcal {O}}_{S}$-algebra A and a quasi-coherent $A$-module $M$.
The above equivalence can be used (among other things) to do the following construction. As before, given a scheme S, let A be a quasi-coherent ${\mathcal {O}}_{S}$-algebra and then take its global Spec: $f:X=\operatorname {Spec} _{S}(A)\to S$. Then, for each quasi-coherent A-module M, there is a corresponding quasi-coherent ${\mathcal {O}}_{X}$-module ${\widetilde {M}}$ such that $f_{*}{\widetilde {M}}\simeq M,$ called the sheaf associated to M. Put in another way, $f_{*}$ determines an equivalence between the category of quasi-coherent ${\mathcal {O}}_{X}$-modules and the quasi-coherent $A$-modules.