Graph of morphism , reduced scheme. Let  $f:X \rightarrow Y $ be a morphism of S-schemes. Let us suppose that X is reduced and endow the image of the graph morphism $\Gamma_f:X \rightarrow X \times_S Y $ , call it A, with a reduced closed subscheme structure. Show that if Y is separated over S, then the projection $X \times_S Y \rightarrow X$ induces an isomorphism from A onto X.
 A: The graph morphism $\Gamma_f : X \to X \times_S Y$ induces a morphism $g : X \to A$ which satisfies by definition $(p|_A) \circ g = 1_X$ and $(q|_A) \circ g = f$, where $p : X \times_S Y \to X$ and $q : X \times_S Y \to Y$ are the projections.  Since $Y$ is separated over $S$, the graph morphism $\Gamma_f$ is in fact a closed immersion; this is easy, see for example (EGA I, (5.2.4)) (in the Springer edition).  Hence there exists a closed subscheme $A' \subset X \times_S Y$ and isomorphism $g' : X \stackrel{\sim}{\to} A'$ such that $\Gamma_f$ factors through $g'$ and the inclusion, so $\Gamma_f = g \circ j = g' \circ j'$, where $j : A \hookrightarrow X \times_S Y$ and $j' : A' \hookrightarrow X \times_S Y$ are the inclusions.  It follows that $p \circ j \circ g = p \circ j' \circ g'$.  Since the former is equal to the identity $1_X$ on $X$, one has $p \circ j' \circ g' = 1_X$; since $g'$ is an isomorphism, $p$ is thus an isomorphism on $A'$.  Considered as a map of the underlying topological spaces, $g : X \to A$ is clearly surjective (and hence a homeomorphism) since $A = g(X)$.  Consider the homeomorphisms $u = g' \circ g^{-1} : A \to A'$ and $v = g \circ g'^{-1} : A' \to A$ of the underlying spaces of $A$ and $A$'; since $j \circ v = j \circ g \circ g'^{-1} = j' \circ g' \circ g'^{-1} = j'$ and similarly $j' \circ u = j$, one obtains an equality $A = A'$ of the underlying spaces of $A$ and $A'$.  Since $A'$ is isomorphic as a scheme to the reduced scheme $X$, and $A$ is by definition the unique reduced subscheme of $X \times_S Y$ having $A$ as its underlying space, it follows that $A$ and $A'$ are indeed the same subscheme of $X \times_S Y$.  Finally, one sees that $p \circ j = p \circ j'$ is an isomorphism from $A = A'$ to $X$.
