what is the precise definition of a morphism defined over $k$? Let $k$ be a field and $X$ an algebraic variety over $k$. I have often seen people write $Aut(X/k)$ for the automorphisms "defined over k". 
What is the exact definition? My guess is that $X$ comes with a structural morphism $\pi: X \to Spec(k)$ and we want $g: X \to X$ to satisfy $\pi \circ g=\pi$, is that correct? 
Can someone explain why this corresponds to the intuitive idea of "in coordinates the automorphism only involves elements of $k$"? 
Sorry if this is too basic, I'm a beginner in algebraic geometry :( 
 A: You are correct. Since "in coordinates" must be local anyway, let us assume that $X=\operatorname{Spec}(A)$ is affine and $A=k[x_1,\ldots,x_n]$ is a finitely generated $k$-algebra. Now $g$ corresponds to a ring homomorphism $g^\sharp: A\to A$ which is defined by $g^\sharp(\varphi)=\varphi\circ g$. The condition $\pi\circ g = \pi$ means that $g^\sharp$ is not just a Ring homomorphism, but in fact a homomorphism of $k$-algebras. Indeed, $\pi^\sharp:k\to A$ is the embedding of $k$ in $A$ and $g^\sharp(\pi^\sharp(t))=g^\sharp(t\circ\pi)=t\circ\pi\circ g=t\circ\pi=\pi^\sharp(t)$ so $g^\sharp$ is the identity on $k$ (Here, I think of $t\in k$ as a constant function on the space $\operatorname{Spec}(k)=\{\ast\}$). 
Since $g^\sharp$ is a $k$-algebra homomorphism, it is completely defined by its values on the coordinates $g^\sharp(x_i)$ and these, in turn, are polynomial expressions in the $x_i$ with certain coefficients in $k$, so $g^\sharp$ is completely defined by a set of values in $k$. 
More precisely, if $p\in X$ has the coordinates $p_i=x_i(p)$, then the coordinates of $g(p)$ are precisely the $(x_i\circ g)(p)=g^\sharp(x_i)(p)$, which are polynomial expressions in the $p_i$.
