Lemma 26.6.2. Let $X$ be a locally ringed space. Let $f \in \Gamma (X, \mathcal{O}_ X)$. The set

$D(f) = \{ x \in X \mid \text{image }f \not\in \mathfrak m_ x\}$

is open. Moreover $f|_{D(f)}$ has an inverse.

Proof. This is a special case of Modules, Lemma 17.24.10, but we also give a direct proof. Suppose that $U \subset X$ and $V \subset X$ are two open subsets such that $f|_ U$ has an inverse $g$ and $f|_ V$ has an inverse $h$. Then clearly $g|_{U\cap V} = h|_{U\cap V}$. Thus it suffices to show that $f$ is invertible in an open neighbourhood of any $x \in D(f)$. This is clear because $f \not\in \mathfrak m_ x$ implies that $f \in \mathcal{O}_{X, x}$ has an inverse $g \in \mathcal{O}_{X, x}$ which means there is some open neighbourhood $x \in U \subset X$ so that $g \in \mathcal{O}_ X(U)$ and $g\cdot f|_ U = 1$. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).