Lemma 29.2.2. Let $X$ be a scheme. Let $i : Z \to X$ and $i' : Z' \to X$ be closed immersions and consider the ideal sheaves $\mathcal{I} = \mathop{\mathrm{Ker}}(i^\sharp )$ and $\mathcal{I}' = \mathop{\mathrm{Ker}}((i')^\sharp )$ of $\mathcal{O}_ X$.

1. The morphism $i : Z \to X$ factors as $Z \to Z' \to X$ for some $a : Z \to Z'$ if and only if $\mathcal{I}' \subset \mathcal{I}$. If this happens, then $a$ is a closed immersion.

2. We have $Z \cong Z'$ over $X$ if and only if $\mathcal{I} = \mathcal{I}'$.

Proof. This follows from our discussion of closed subspaces in Schemes, Section 26.4 especially Schemes, Lemmas 26.4.5 and 26.4.6. It also follows in a straightforward way from characterization (3) in Lemma 29.2.1 above. $\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).