# introducing locally ringed space definition necessary at all?

Hartshorne defined locally ringed space $(X,O_X)$ as for every $p\in X$, $O_{X,p}$ stalk is local ring where $O_X$ is the structural sheaf over $X$.

For $X=\operatorname{Spec}(A)$ for unital rings, $O_{X,p}$ is always local as $p\in \operatorname{Spec}(A)$ and $O_{X,p}\cong A_p$.

Q1. Why do I need definition of locally ringed space? For classical variety, this holds trivially. For $X=\operatorname{Spec}(A)$ where $A$ is an unital ring, this holds trivially as well.

Q2. Where can I find the case such that $O_{X,p}$ is not local? It seems that structural sheaf is going to be weird.

An example of a ringed space that is not a locally ringed space is almost any example where $O_X$ is the constant sheaf $\mathbb{Z}$.