Lemma 43.13.3. Let $X$ be a nonsingular variety. Then the diagonal $\Delta : X \to X \times X$ is a regular immersion of codimension $\dim (X)$.

Proof. In fact, any closed immersion between nonsingular projective varieties is a regular immersion, see Divisors, Lemma 31.22.11. $\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).