Skip to main content
2 of 2
Added more comments outside the étale Galois case.

If $f$ is finite flat of degree $d$, then $f \times f \colon X \times X \to Y \times Y$ has degree $d^2$, but $\Delta_f \colon \Delta_X \to \Delta_Y$ has degree $d$. So equality cannot hold scheme-theoretically unless $f$ is an isomorphism.

A fairly explicit case is the finite étale Galois case, where $(f \times f)^{-1}(\Delta_Y)$ is the disjoint union of the graphs $\Gamma_\sigma$ of deck transformations $\sigma \colon X \to X$.

If $f$ is only étale but not Galois, then $(f\times f)^{-1}(\Delta_Y)$ will be smooth and $\Delta_X$ is still a connected component, but the other components will not map isomorphically onto $X$ under their projections.

If $f$ is generically étale (i.e. separable), then there is a dense open $U \subseteq Y$ above which the above holds, so $(f \times f)^{-1}(\Delta_Y)$ is still generically smooth (i.e. geometrically reduced). But for each component of the branch divisor $D \subseteq Y$, there will be another irreducible component of $(f \times f)^{-1}(\Delta_Y)$ intersecting $\Delta_X$ above $D$.

In the inseparable case, you get situations where $\Delta_X$ occurs with multiplicity $>1$, but that only happens in positive characteristic.