When is diagonal morphism the diagonal map Suppose $X, Y$ are schemes and $f : X \rightarrow Y$ a morphism and $\pi_1, \pi_2 : X \times_Y X \rightarrow X$ be the two projections and $\Delta : X \rightarrow X \times_Y X$ is diagonal morphism. Is it true that any $p \in X \times_Y X$ such that $\pi_1(p) = \pi_2(p)$ must necessarily be in the image of $\Delta$? In general, under what circumstances does $\Delta$ behave like a real diagonal map i.e. $x \mapsto (x, x)$ and when is it the diagonal map?
 A: This is often not true.  First, a concrete example to get a sense for how this fails: take $Y=\operatorname{Spec}\mathbb{R}$ and $X=\operatorname{Spec}\mathbb{C}$.  Note that $\mathbb{C}\otimes_{\mathbb{R}}\mathbb{C}\cong \mathbb{C}\times \mathbb{C}$, so $X\times_Y X$ has two points.  Only one of these points is in the image of $\Delta$.  The other point is a $\mathbb{C}$-point such that one of its projections is the identity $X\to X$ and the other is complex conjugation.
For another illustrative example, let $Y$ be Spec of an algebraically closed field, $X=\mathbb{A}^1$, and $x\in X$ be the generic point.  Then $\Delta(x)$ is the generic point of the diagonal line in $\mathbb{A}^2$.  But there are many other points of $\mathbb{A}^2$ both of whose projections are $x$: there is the generic point of $\mathbb{A}^2$, and also the generic point of any curve that is not a horizontal or vertical line.
Now let's look at the general case.  Fix a point $x\in X$ with residue field $k(x)$, and let $y=f(x)$ with residue field $k(y)$.  Then there is a natural map $\operatorname{Spec}k(x)\times_{\operatorname{Spec}k(y)}\operatorname{Spec}k(x)\to X\times_Y X$ which is injective and whose image is exactly the points of $X\times_Y X$ both of whose projections are $x$.  (To prove this, you can assume everything is affine, and then you just use the fact that $k(x)\otimes_{k(y)}k(x)$ is a certain localization of a certain quotient of $A\otimes_B A$, if $X=\operatorname{Spec} A$ and $Y=\operatorname{Spec} B$).  Of course, only one of the points of $\operatorname{Spec}k(x)\times_{\operatorname{Spec}k(y)}\operatorname{Spec}k(x)$ can be in the image of $\Delta$, namely the point that is $\Delta(x)$.
So we are reduced to the case that $X=\operatorname{Spec} k(x)$ and $Y=\operatorname{Spec} k(y)$, and we ask whether $X\times_Y X$ has only one point (the diagonal point).  A point of $X\times_Y X$ then corresponds to a homomorphism $k(x)\otimes_{k(y)} k(x)\to K$ to a field $K$, and we are asking whether such a homomorphism must agree on the two copies of $k(x)$ inside $k(x)\otimes_{k(y)} k(x)$.  That is, we are asking whether given any field $K$ and any homomorphism $\alpha:k(y)\to K$, $\alpha$ has at most one extension to $k(x)$.  This is true iff $k(x)$ is purely inseparable over $k(y)$.
So our conclusion is that for any fixed $x\in X$, every point $p\in X\times_Y X$ such that $\pi_1(p)=\pi_2(p)=x$ is in the image of $\Delta$ iff $k(x)$ is purely inseparable over $k(y)$.  (Note that in particular this includes the case that $k(x)=k(y)$, such as when $X$ and $Y$ are varieties over an algebraically closed field and $x$ is a closed point.)
