Preliminary notion: Suppose that $X$ is an algebraic variety over a field $K$ ($K$-scheme, integral separated, of finite type). If $L$ is a subfield of $K$, we say that $X$ is defined over $L$ if $X\cong X_L\times_{\text{Spec}L}\text{Spec} K$ for some variety $X_L$ over $L$.
If $f:X\longrightarrow Y$ is a morphism of varieties (over $K$) I would like to know what is the field of definition of a morphism. By looking this question there are two choices:
(The most natural one in my opinion) $f$ is defined over $L$ if the graph $\Gamma_f\subseteq X\times_{\text{Spec} K} Y$ is a variety defined over $L$.
$f$ is defined over $L$ if there are two varieties $X_L$ and $Y_L$ over $L$ with a morphism $g:X_L\longrightarrow Y_L$ such that $f=g\times\text{id}_{\text{Spec}\mathbb C}$.
I have problems to show that these definitions are equivalent. Do you have any idea?
Many thanks in advance.
As pointed out in the comments, as a $K$-variety, the graph of a morphism $f\colon X\to Y$ of $K$-varieties is isomorphic to $X$ via the projection onto $X$, so the first condition is equivalent to "$X$ is defined over $L$", no matter what $f$ is, so this doesn't seem very natural to me. However, the way $X\cong \Gamma_f$ is embedded into $X\times Y$ 'sees', wether $f$ is defined over $L$ or not.
Let's say a morphism $f\colon X\to Y$ is defined over $L$, if there is a morphism $f'\colon X'\to Y'$ of $L$-varieties and if there are isomorphisms $X'\otimes_L K = X$ and $Y'\otimes_L K = Y$ in such a way that $f = f'\otimes_L K$. Then we define: A $K$-subvariety $Z\subset X$ is defined over $L\subset K$ as a subvariety, if the inclusion morphism is defined over $L$.
I now claim that $\Gamma_f\subset X\times Y$ is defined over $L$ as a subvariety if and only if $f\colon X\to Y$ is obtained from a morphism $f'\colon X'\to Y'$ of $L$-varieties after extension to $K$.
In fact, if the latter holds, then the the inclusion of the graph $\Gamma_{f'}\subset X'\times_L Y'$ induces the inclusion of $\Gamma_f\subset X\times Y$. Now suppose there is a morphism $i'\colon\Gamma'\to X'\times_L Y'$ of $L$-varieties such that $i'\otimes_L K = i$ is the inclusion morphism of $\Gamma_f\subset X\times Y$. Then $p:=pr_1\circ i'\colon \Gamma'\to X'$ is such that $p\otimes_L K\colon \Gamma_f\to X$ is the projection and hence an isomorphism. Thus $p'$ also is an isomorphism and $f' := pr_2\circ p'^{-1}$ is a well defined morphism from $X'$ ton $Y'$ with $f'\otimes_L K = f$, as desired.
However, this is not equivalent to the first condition of the question. Let me give an example. (I know, the following lacks in the point that $L=\mathbb{R}$ isn't algebraically closed, but I like it and I haven't found a better one.) Consider the two affine curves $C,D\subset\mathbb{A}_{\mathbb{C}}^2 = \mathop{Spec}(\mathbb{C}[s,t])$ given by the equations $st=1$ and $s^2+t^2 = 1$ respectively. Over $\mathbb{C}$, they are isomorphic, e.g. via $D\to C$, $(s,t)\mapsto(s+it,s-it)$, and both are given by equations which define $\mathbb{R}$-varieties $C',D'\subset\mathbb{A}_{\mathbb{R}}^2$ such that $C'\otimes_\mathbb{R}\mathbb{C} = C$ and $D'\otimes_\mathbb{R}\mathbb{C} =D$, but $C'$ and $D'$ are not isomorphic over $\mathbb{R}$! Now the point with the first definition is: take $C'$ as a $\mathbb{R}$-model for $C$ and $D$. Then the graph of the identity $\Delta\subset C'\times_\mathbb{R} C'$, i.e. the diagonal, induces the diagonal in $C\times C$ after extension to $K$ and this is, as $K$-variety, isomorphic to the graph of any isomorphism $f\colon C\to D$ in $C\times D$ via the isomorphism $C\times C\xrightarrow{\mathrm{id}\times f}C\times D$. Hence the graph is defined over $\mathbb{R}$ as variety but not as a subvariety.
It would be interesting to see, what all this has to do with the behaviour of the morphism on $L$-points, e.g. under which conditions on $L\subset K$, a morphism is defined over $L$ if and only if it maps $L$-points to $L$-points.