Lemma 29.7.7. Let $h : Z \to X$ be an immersion. Assume either $h$ is quasi-compact or $Z$ is reduced. Let $\overline{Z} \subset X$ be the scheme theoretic image of $h$. Then the morphism $Z \to \overline{Z}$ is an open immersion which identifies $Z$ with a scheme theoretically dense open subscheme of $\overline{Z}$. Moreover, $Z$ is topologically dense in $\overline{Z}$.

Proof. By Lemma 29.3.2 or Lemma 29.3.3 we can factor $Z \to X$ as $Z \to \overline{Z}_1 \to X$ with $Z \to \overline{Z}_1$ open and $\overline{Z}_1 \to X$ closed. On the other hand, let $Z \to \overline{Z} \subset X$ be the scheme theoretic closure of $Z \to X$. We conclude that $\overline{Z} \subset \overline{Z}_1$. Since $Z$ is an open subscheme of $\overline{Z}_1$ it follows that $Z$ is an open subscheme of $\overline{Z}$ as well. In the case that $Z$ is reduced we know that $Z \subset \overline{Z}_1$ is topologically dense by the construction of $\overline{Z}_1$ in the proof of Lemma 29.3.3. Hence $\overline{Z}_1$ and $\overline{Z}$ have the same underlying topological spaces. Thus $\overline{Z} \subset \overline{Z}_1$ is a closed immersion into a reduced scheme which induces a bijection on underlying topological spaces, and hence it is an isomorphism. In the case that $Z \to X$ is quasi-compact we argue as follows: The assertion that $Z$ is scheme theoretically dense in $\overline{Z}$ follows from Lemma 29.6.3 part (3). The last assertion follows from Lemma 29.6.3 part (4). $\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).