In Hartshorne’s, it’s proved that:
Morphisms between two affine schemes are always separated.
But his proof omitted the part showing under the diagonal map: $\triangle :X\to X\times X$ , $\triangle (X)$ is closed, where $X=Spec(A)$ for some ring $A$.
I got stuck showing this step. In fact, I don’t know much about $Spec(A\otimes A)$. For example, what are points(i.e. prime ideals in $A\otimes A$) look like? What are closed set in it? Hope someone could help. Thanks!
Let $f:A\rightarrow B$ be a morphism of rings. Consider a morphism $\delta$ given by formula
$$B\otimes_AB \ni b_1\otimes b_2\mapsto b_1\cdot b_2\in B$$
Then you can show that
$$\mathrm{Spec}\,\delta:\mathrm{Spec}B\rightarrow \mathrm{Spec}B\times_{\mathrm{Spec}A} \mathrm{Spec}B$$
is the diagonal and since $\delta$ is surjective, you can deduce that the diagonal is a closed immersion.