Locally ringed space
From Academic Kids

In mathematics, a locally ringed space (or local ringed space) is, intuitively speaking, a space together with, for each of its open sets, a commutative ring the elements of which are thought of as "functions" defined on that open set. Locally ringed spaces appear throughout analysis and are also used to define the schemes of algebraic geometry.
Contents 
Definition
A locally ringed space is a topological space X, together with a sheaf F of commutative rings on X, such that all stalks of F are local rings. (Note that it is not required that F(U) be a local ring for every open set U — in fact, that is almost never going to be the case.)
The sheaf F is also called the structure sheaf of the locally ringed space X, and is denoted by O_{X}.
Examples
If X is an arbitrary topological space, we can take O_{X} to be the sheaf of continuous functions on open subsets of X with real values (or alternatively: with complex values) (there are continuous functions over open subsets of X which isn't the restriction of any continuous function over X). The stalk at x∈X can be thought of as the set of all germs of continuous functions at x; this is a local ring with maximal ideal consisting of those germs whose value at x is 0.
If X is a manifold with some extra structure, we can also take the sheaf of differentiable, or complexanalytic functions. Both of these give rise to locally ringed spaces.
If X is an algebraic variety carrying the Zariski topology, we can define a locally ringed space by taking O_{X}(U) to be the ring of rational functions defined on the Zariskiopen set U which does not blow up (become infinite) within U. The important generalization of this example is that of the spectrum of any commutative ring; these spectra are also locally ringed spaces. Schemes are locally ringed spaces obtained by "gluing together" spectra of commutative rings.
If X is a smooth supermanifold with X, a real smooth manifold being its real projection, then O_{X} is the sheaf of smooth sections of the algebra bundle. This is a sheaf of noncommutative rings.
Morphisms
Given two locally ringed spaces (X, O_{X}) and (Y, O_{Y}), a morphism of locally ringed spaces from X to Y is given by the following data:
 (1) a continuous map f : X → Y
 (2) for every open set V of Y, a ring homomorphism φ_{V} : O_{Y}(V) → O_{X}(f^{ 1}(V)) such that:
 (2a) the ring homomorphisms are compatible with the restriction homomorphisms of the sheaves, i.e. if V_{1} ⊂ V_{2} are two open subsets of Y, then the following diagram is commutative (the vertical maps are the restriction homomorphisms):
LocallyRingedSpace01.png
Image:LocallyRingedSpace01.png
 (2b) the ring homomorphisms induced by φ between the stalks of Y and the stalks of X are local homomorphisms, i.e. for every x ∈ X the maximal ideal of the local ring (stalk) at f(x) ∈ Y is mapped to the maximal ideal of the local ring at x ∈ X.
Two such morphisms can be composed to form a new morphism, and we obtain the category of locally ringed spaces and the notion of isomorphic locally ringed spaces.
Tangent spaces
Locally ringed spaces have just enough structure to allow the meaningful definition of tangent spaces. Let X be locally ringed space with structure sheaf O_{X}; we want to define the tangent space T_{x} at the point x ∈ X. Take the local ring (stalk) R_{x} at the point x, with maximal ideal m_{x}. Then k_{x} := R_{x}/m_{x} is a field and m_{x}/m_{x}^{2} is a vector space over that field (the cotangent space). The tangent space R_{x} is defined as the dual of this vector space.
The idea is the following: a tangent vector at x should tell you how to "differentiate" "functions" at x, i.e. the elements of R_{x}. Now it is enough to know how to differentiate functions whose value at x is zero, since all other functions differ from these only by a constant, and we know how to differentiate constants. So we only need to worry about m_{x}. Furthermore, if two functions are given with value zero at x, then their product has derivative 0 at x, by the product rule. So we only need to know how to assign "numbers" to the elements of m_{x}/m_{x}^{2}, and this is what the dual space does.
O_{X} modules
Given a locally ringed space (X, O_{X}), certain sheaves of modules on X occur in the applications, the O_{X}modules. To define them, consider a sheaf F of abelian groups on X. If F(U) is a module over the ring O_{X}(U) for every open set U in X, and the restriction maps are compatible with the module structure, then we call F an O_{X}module. In this case, the stalk of F at x will be a module over the local ring (stalk) R_{x}, for every x∈X.
A morphism between two such O_{X}modules is a morphism of sheaves which is compatible with the given module structures. The category of O_{X}modules over a fixed locally ringed space (X, O_{X}) is an abelian category.