# Closed subspace cut off by the ideal sheaf coming from a locally closed immersion

$$\def\sO{\mathcal{O}} \def\sI{\mathcal{I}}$$Given a locally ringed space $$Y$$ and an ideal sheaf $$\sI\subset\sO_Y$$, we can consider the closed subspace of $$Y$$ cut off by $$\sI$$, i.e., the closed immersion of locally ringed spaces $$Z\to Y$$ where $$Z=\operatorname{Supp}(\sO_Y/\sI)$$ and $$\sO_Z=\sO_Y/\sI|_Z$$. Now let $$f:X\to Y$$ be a locally closed immersion of locally ringed spaces. By definition, this means that $$f^{-1}\sO_Y\to\sO_X$$ is surjective and that on spaces $$f$$ is a homeomorphism of $$X$$ onto a locally closed subset of $$Y$$. What is the closed subspace $$Z$$ of $$Y$$ cut off by the ideal sheaf $$\sI=\ker(\sO_Y\to f_*\sO_X)$$?

$$\def\sO{\mathcal{O}}$$We claim $$Z=\overline{f(X)}$$. On the one hand, it is clear that $$f(X)\subset Z$$ (there is open $$U\subset Y$$ containing $$f(X)$$ as a closed subset; thus $$Z\cap U=\operatorname{Supp}(\mathcal{O}_U/\mathcal{I}|_U)=f(X)$$), whence $$\overline{f(X)}\subset Z$$. Conversely, let $$z\in Z$$ and suppose $$V\subset Y$$ is an open neighborhood of $$z$$. Then $$(\mathcal{I}|_V)_z=\mathcal{I}_z\neq \sO_{X,z}=\sO_{V,z}$$. In particular, there is an open neighborhood $$W\subset V$$ of $$z$$ with $$\mathcal{I}(W)\neq\sO_Y(W)$$; thus, $$\mathcal{O}_X(f^{-1}(W))\neq 0$$, so $$\varnothing\neq W\cap f(X)\subset V\cap f(X)$$. This means $$z\in\overline{f(X)}$$.