Lemma 31.15.9. Let $Z \subset X$ be a closed subscheme of a Noetherian scheme. Assume

1. $Z$ has no embedded points,

2. every irreducible component of $Z$ has codimension $1$ in $X$,

3. every local ring $\mathcal{O}_{X, x}$, $x \in Z$ is a UFD or $X$ is regular.

Then $Z$ is an effective Cartier divisor.

Proof. Let $D = \sum a_ i D_ i$ be as in Lemma 31.15.8 where $D_ i \subset Z$ are the irreducible components of $Z$. If $D \to Z$ is not an isomorphism, then $\mathcal{O}_ Z \to \mathcal{O}_ D$ has a nonzero kernel sitting in codimension $\geq 2$. This would mean that $Z$ has embedded points, which is forbidden by assumption (1). Hence $D \cong Z$ as desired. $\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).