# Sheaf of rings with vanishing stalk?

How common is that a sheaf of rings has a vanishing stalk? To define the rank of a locally free sheaf of $\mathscr{O}$-modules, for instance, $\mathscr{O}_x=0$ may cause some problem, since the rank of a free $A$-module is not well-defined if $A=0$. It would make life easier if $\mathscr{O}_x\neq0\ \forall x\in X$, but is this condition somehow incorporated in the definition of sheaf of rings?

-
I believe that you can define the rank by continuously extending it from the support of $\mathcal{O}$, so long as $\mathcal{O}$ doesn't vanish on an entire connected component. – Hurkyl Jun 30 '12 at 18:45
Work with locally ringed spaces. – Martin Brandenburg Jun 30 '12 at 20:34

I will presume that by "a sheaf of rings" you mean "a sheaf of rings with $1$" (since this is what is usually so meant). If the stalk of $\mathcal O_X$ vanishes at $x$, then this means that $1 = 0$ in the stalk, and hence in $\mathcal O_X(U)$ for some neighbourhood $U$ of $x$. Thus the stalk of $\mathcal O_X$ vanishes at $x$ if and only if the sheaf $\mathcal O_X$ restricts to the zero sheaf in some n.h of $x$.
If e.g. $X$ is not only ringed, but locally ringed, then the stalks of $\mathcal O_X$ (which are then local rings by definition) never vanish at a point (since local rings are non-zero, again by definition).
Added: If $U$ is an open subset of $X$ with complement $Z$, and $i: Z \to X$ is the inclusion, then for any sheaf of rings $\mathcal O_Z$ on $Z$, the pushforward $i_* \mathcal O_Z$ will be a sheaf of rings on $X$ whose stalks vanish on $U$. Thus we can always find examples realizing the discussion of the first paragraph. More generally, if we let $Z$ be the support of any sheaf of rings $\mathcal O_X$ on $X$, this will coincide with the support of the identity section $1 \in \mathcal O_X(X)$, and hence will be a closed subset of $X$, and we will have that $\mathcal O_X = i_* i^{-1} \mathcal O_X,$ with $i^{-1}\mathcal O_X$ a sheaf of rings on $Z$, none of whose stalks vanish. Consequently, any sheaf of rings on $X$ can be obtained by a sheaf of rings with non-vanishing stalks on a closed subspace by pushing forward.