Is a nonzero divisor locally nonzero divisor? Suppose $X$ is a scheme (or locally ringed space), $a\in \Gamma (X,O_X)$, not a zero divisor. Can we show $a_x$is also a nonzero divisor in $O_{X,x}$? 
(It is true if $X$ is an affine scheme)
 A: Let $f\in\Gamma(X,\mathcal{O}_X)$ and let
\begin{equation}
X_f=\{x\in X\mid f_x\in\mathcal{O}_{X,x}^{\times}\}
\end{equation}
because $f_x$ is not a zero divisor in $\mathcal{O}_{X,x}$ if and only if $f_x\notin\mathfrak{m}_x$ that is if and only if $f_x\in\mathcal{O}_{X,x}^{\times}$.
By definition of scheme:
\begin{gather}
\forall x\in X,\,\exists U\subseteq X\,\text{open,}\,R\,\text{commutative ring with unit}\mid x\in U,\\
(U,\mathcal{O}_{X|U})\cong(\operatorname{Spec}R,\mathcal{O}_R)\Rightarrow\mathcal{O}_{X,x}\cong\mathcal{O}_{R,x},
\end{gather}
therefore, fixed the open affine subset $U$ of $X$, we get:
\begin{equation}
r^X_U(f)=g\in\mathcal{O}_X(U)\cong\mathcal{O}_R(\operatorname{Spec}R)=R;
\end{equation}
where $r^X_U$ is the restricting morphism of $\mathcal{O}_X$ from $X$ to $U$.
Because
\begin{equation}
g:x\in\operatorname{Spec}R\to[g]_{\mathfrak{p}_x}\in\coprod_{\mathfrak{p}_x\in\operatorname{Spec}R}R_{\displaystyle/\mathfrak{p}_x},
\end{equation}
then
\begin{gather*}
\{x\in\operatorname{Spec}R\mid g_x\in R_{\mathfrak{p}_x}^{\times}\}=\{x\in\operatorname{Spec}R\mid g\notin\mathfrak{p}_x\}=\\
=\{x\in\operatorname{Spec}R\mid g(x)\not=0_{\mathfrak{p}_x}\}=D_{\operatorname{Spec}R}(g)\cong\operatorname{Spec}R_g;
\end{gather*}
that is
\begin{equation}
X_f\cap U\cong D_{\operatorname{Spec}R}(g),
\end{equation}
or in other words: for any $x\in X_f$ there exists an open affine neighbourhood of $x$ contained in $X_f$, and we can state that $X_f$ is an open subset of $X$.
In particular, if $X$ is an affine scheme then $X_f$ if an its open (affine) subscheme.
From all this: we can not state that, in general, for a nonzero divisor $f\in\Gamma(X,\mathcal{O}_X)$ one has that $f_x\in\mathcal{O}_{X,x}$ is a nonzero divisor for any $x\in X$; but this statement is true for any $x\in X_f$ as constructed before.
Sometimes $X_f$ is called support of $f$.
