Graph of a morphism of affine schemes Let $f:X\to Y$ be a morphism of schemes (here smooth, separated, of finite type over a field). Then the graph $\Gamma_f$ is defined as the image of the morphism $(id,f):X\to X\times Y$. 
Claim: The structure sheaf of the graph is a coherent $\mathcal O_{X\times Y}$-module. 
I tried to convince myself of this by considering the affine case first and got embarassingly confused:
So if $X=Spec\ (R)$ and $Y=Spec\ (S)$, then $X\times Y=Spec\ R\otimes S$. Let $f':S\to R$ be the corresponding ring homomorphism, then the graph should be just $\{s\otimes f'(s)\}$. And I guess I did something wrong here, because this is certainly no $S\otimes R$-module. The module generated by the set $\{s\otimes f'(s)\}$ on the other hand is the whole ring, because $f'(1)=1$.
It is easy to see that the graph is a closed subscheme, so it should be possible to write it as a quotient of $R\otimes S$. 

The (pushforward of the structure sheaf of the) graph is $R$ regarded as an $S$-module via the homomorphism $f$ and regarded as an $R$-module in the obvious way. 
