Is a representation of $\operatorname{SL}_n$ defined over a field $k$ if its image is contained in $\operatorname{GL}_n(k)$?

Yes, and in fact something much more general is true Let $X$ and $Y$ be affine varieties defined over a field $k$. If the $k$-points of $X$ are Zariski dense, $X$ is reduced, and $f: X_{\mathbb C} \to Y_{\mathbb C}$ sends $X(k)$ to $Y(k)$, then $f$ is defined over $k$.

This was inspired by comments of Martin Brandenburg, Jef L, Andy Putman, and Piotr Achinger.

Proof: First note that by embedding $Y$ in affine space, we may assume $Y = \mathbb A^n$. Second note that by viewing a map to $\mathbb A^n$ as an $n$-tuple of maps to $\mathbb A^1$, we may assume $Y =\mathbb A^1$. Thus $f$ is a polynomial function in $\mathbb C[X]$, and we want to check it lies in $k[X]$.

Because $\mathbb C[x]= k[X] \otimes_k \mathbb C$, we may write $f = \sum_{i=1}^n \alpha_i f_i$ where $\alpha_i \in \mathbb C$ and $f_i \in k[X]$. Without loss of generality, we may assume that $\alpha_1=1$ and that the $\alpha_i$ are $k$-linearly independent. (Add $1$ to the list of $\alpha_i$s, then for any linear relation, use that relation to remove whichever $\alpha_i$ is not $1$ and adjust the $f_i$s appropriately.)

Now for $x \in X(k)$, we have $f(x) = \sum_{i=1}^n \alpha_i f_i(x)$. Because the $\alpha_i$ are $k$-linearly independent, and $f(x)\in k$, this implies $f_i(x)=0$ for $i>1$. Then because $X(k)$ is Zariski dense, this implies $f_i=0$ for $i>1$, so $f=f_1 \in k[X]$. QED

The Zariski density can be checked for $SL_n$ using the birational map to affine space obtained by forgetting one entry, and for other semisimple groups using the Bruhat decomposition as suggested by Mikhail Borovoi.


This follows from Theorem 6 in Steinberg's "Some consequences of the elementary relations in $SL_n$" in "Finite groups — coming of age", Contemporary Math. 45 Amer. Math. Soc. (sorry, I could only find a Google books link), together with the remarks at the end of the proof. Restricting $f$ to $\Gamma = SL_n(\mathbb{Z})$, the theorem yields a polynomial map $g$ (which is equal to $f$ for us) and a map $h$ that is trivial for us (since it is trivial on a finite index subgroup of $\Gamma$). As remark (b) mentions, $g$ is defined over $\mathbb{Q}(f(\Gamma))$, which is what you want.