Canonical: https://knowlpedia.com/algebraic-geometry-foundations/locally-ringed-space/

# Locally ringed space

A topological space with a sheaf of rings whose stalks are local rings.

A **locally ringed space** is a pair \((X,\mathcal O_X)\) consisting of a [topological space](https://knowlpedia.com/topology/topological-space/) \(X\) and a [sheaf](https://knowlpedia.com/algebraic-geometry-foundations/sheaf/) of commutative rings \(\mathcal O_X\) such that every [stalk](https://knowlpedia.com/algebraic-geometry-foundations/stalk/) \(\mathcal O_{X,x}\) is a [local ring](https://knowlpedia.com/algebra-commutative/local-ring/). The sheaf \(\mathcal O_X\) is called the [structure sheaf](https://knowlpedia.com/algebraic-geometry-foundations/structure-sheaf/).

The unique maximal ideal in \(\mathcal O_{X,x}\) distinguishes functions that vanish at \(x\) from those locally invertible near \(x\). This extra condition makes points and local algebra interact correctly.

## Examples

For example, if \(A\) is a commutative ring, then \((\operatorname{Spec}A,\mathcal O_{\operatorname{Spec}A})\) is locally ringed because the stalk at a prime ideal \(\mathfrak p\) is the local ring \(A_{\mathfrak p}\). Such examples are precisely the [affine schemes](https://knowlpedia.com/algebraic-geometry-foundations/affine-scheme/).
