Does the ring of global sections functor on the category of locally ringed spaces have an adjoint functor? Let $Rng$ be the category of commutative rings.
Let $Loc$ be the category of locally ringed spaces.
Let $(X, \mathcal{O}_X)$ be an locally ringed space.
Then $\Gamma(X) = \Gamma(X, \mathcal{O}_X)$ is an commutative ring.
Hence $\Gamma(X)$ induces an functor $\Gamma\colon Loc \rightarrow Rng^o$, where $Rng^o$ is the oposite category of $Rng$.
Does $\Gamma$ have an adjoint functor?

The $Spec$ functor is the desired adjoint functor to the category of locally ringed spaces (it is right adjoint to $\Gamma$). I think Hartshorne has an exercise where he asks us to prove this when $Loc$ is replaced by the category of schemes.
I like Anton Geraschenko's answer here: https://mathoverflow.net/questions/731/points-in-algebraic-geometry-why-shift-from-m-spec-to-spec/756#756
