The sheaf of rational functions KX of a scheme X is the generalization to scheme theory of the notion of function field of an algebraic variety in classical algebraic geometry. In the case of algebraic varieties, such a sheaf associates to each open set U the ring of all rational functions on that open set; in other words, KX(U) is the set of fractions of regular functions on U. Despite its name, KX does not always give a field for a general scheme X.
In the simplest cases, the definition of KX is straightforward. If X is an (irreducible) affine algebraic variety, and if U is an open subset of X, then KX(U) will be the fraction field of the ring of regular functions on U. Because X is affine, the ring of regular functions on U will be a localization of the global sections of X, and consequently KX will be the constant sheaf whose value is the fraction field of the global sections of X.
If X is integral but not affine, then any non-empty affine open set will be dense in X. This means there is not enough room for a regular function to do anything interesting outside of U, and consequently the behavior of the rational functions on U should determine the behavior of the rational functions on X. In fact, the fraction fields of the rings of regular functions on any affine open set will be the same, so we define, for any U, KX(U) to be the common fraction field of any ring of regular functions on any open affine subset of X. Alternatively, one can define the function field in this case to be the local ring of the generic point.
The trouble starts when X is no longer integral. Then it is possible to have zero divisors in the ring of regular functions, and consequently the fraction field no longer exists. The naive solution is to replace the fraction field by the total quotient ring, that is, to invert every element that is not a zero divisor. Unfortunately, in general, the total quotient ring does not produce a presheaf much less a sheaf. The well-known article of Kleiman, listed in the bibliography, gives such an example.
The correct solution is to proceed as follows:
For each open set U, let SU be the set of all elements in Γ(U, OX) that are not zero divisors in any stalk OX,x. Let KXpre be the presheaf whose sections on U are localizations SU−1Γ(U, OX) and whose restriction maps are induced from the restriction maps of OX by the universal property of localization. Then KX is the sheaf associated to the presheaf KXpre.
Once KX is defined, it is possible to study properties of X which depend only on KX. This is the subject of birational geometry.
If X is an algebraic variety over a field k, then over each open set U we have a field extension KX(U) of k. The dimension of U will be equal to the transcendence degree of this field extension. All finite transcendence degree field extensions of k correspond to the rational function field of some variety.
In the particular case of an algebraic curve C, that is, dimension 1, it follows that any two non-constant functions F and G on C satisfy a polynomial equation P(F,G) = 0.