Definition of morphism of affine space

I am a little bit confused about some basic terminology: What exactly do we mean by a morphism of the affine space $\mathbb{A}_k^n \rightarrow \mathbb{A}_k^n$, where e.g. $k$ is algebraically closed field?

How is this definition adapted if we assume that we have a structural sheaf on $\mathbb{A}_k^n$?

-
That depends on what formalism you're working with (in that there are several definitions which are equivalent but it takes a little work to prove that they are equivalent). When you say "morphism" you need to specify both a source and a target; if they're both affine space, then the simplest definition is a tuple of polynomials. – Qiaochu Yuan Oct 3 '12 at 18:18
@QiaochuYuan: Thanks. If we consider the Zariski topology, does it make any difference? A simple choice is a tuple of polynomials because they preserve the structural sheaf? – Manos Oct 3 '12 at 18:26
The affine category on its own doesn't have any notion of multiplication with which to define polynomials-of course this depends on the context, but an affine space morphism normally just means an affine linear function, i.e. an equivariant map for the action of $k^n$ on $\mathbb{A}^n$. – Kevin Carlson Oct 3 '12 at 18:28

If you're thinking of $\mathbf{A}_k^n$ as the affine scheme $\mathrm{Spec}(k[X_1,\ldots,X_n])$, then a morphism $\mathbf{A}_k^n\rightarrow\mathbf{A}_k^n$ means a morphism of $k$-schemes. The $\mathrm{Spec}$ functor is fully faithful, so any morphism from $\mathbf{A}_k^n$ to itself is $\mathrm{Spec}(\varphi)$ for a unique $k$-algebra map $\varphi:k[X_1,\ldots,X_n]\rightarrow k[X_1,\ldots,X_n]$. The universal property of the polynomial algebra over $k$ says that such a morphism is equivalent to the data of an $n$-tuple of elements in the target, i.e., $n$ polynomials $f_1,\ldots,f_n$. So specifying a morphism is the same as giving an $n$-tuple of polynomials in $k[X_1,\ldots,X_n]$. This extends to $k$-morphisms $X\rightarrow\mathbf{A}_k^n$ for any $k$-scheme $X$: such a morphism is uniquely determined by the data of an $n$-tuple of global sections of $\mathscr{O}_X$, i.e., an element of $\mathscr{O}_X(X)^n$. In fact it works for $R$-morphisms $X\rightarrow\mathbf{A}_R^n$ for any $R$-scheme $X$ and any ring $R$...or even any base scheme $S$.

-
Could you please give me a reference to the "universal property of the polynomial algebra"? – Manos Oct 3 '12 at 18:58
I would think that almost any abstract algebra textbook that develops polynomial rings from scratch will state this property (e.g. Lang, Hungerford): if $R$ is a ring and $A$ is an $R$-algebra, then given $a_1,\ldots,a_n\in A$, there is a unique $R$-algebra homomorphism $R[X_1,\ldots,X_n]\rightarrow A$ with $X_i\mapsto a_i$. – Keenan Kidwell Oct 3 '12 at 19:04
This looks like the evaluation homomorphism. – Manos Oct 3 '12 at 19:10
Yes. The universal property says that any set of $n$ elements gives rise to an evaluation" homomorphism. The point is that the multiplication law in $R[X_1,\ldots,X_n]$, i.e., multiplication of formal polynomials, is universal. It remains valid when you replace all the variables with elements of any $R$-algebra. – Keenan Kidwell Oct 3 '12 at 19:17
Got it, thanks! – Manos Oct 3 '12 at 19:25

Another answer has described morphisms of $\mathbb{A}^n$ within the category of affine schemes. Here's a discussion of maps in the category of affine spaces, since both are useful in many contexts.

$\mathbb{A}^n$ is a $k^n$-torsor, which means there's a regular group action of $k^n$ on $\mathbb{A}^n$, namely the one sending $x\in\mathbb{A}^n\mapsto x+v,v\in k^n$. This is usually intuitively described as $\mathbb{A}^n$ being $k^n$ without an origin. (Indeed there's a forgetful functor $U$ taking a vector space to its underlying affine space, as well as a functor $D$ taking $\mathbb{A}^n$ to $k^n$. These aren't quite adjoints, because $UD$ isn't naturally isomorphic to the identity functor on the affine category.)

So the only operation we get inside $\mathbb{A}^n$ is subtraction: $x-y$ is the unique $v\in k^n$ such that $x+v=y$. Then the endomorphisms of $\mathbb{A}^n$ are its endomorphisms as a $k^n$-torsor, which might be described as $f:\mathbb{A}^n\to\mathbb{A^n}$ such that $f(x)-f(y)=A(x-y)$ for $A$ a linear transformation $k^n\to k^n$, a map that preserves subtraction "up to a linear transformation."

If you were to (non-naturally) associate $\mathbb{A}^n$ with $k^n$, you would see that the affine linear maps $f: v\mapsto Av+u$ satisfy the above definition, while conversely you could get $u$ as the image of whatever affine point was sent to $0$ and $A$ as the $f-u$, but it's cleaner to avoid using the functor $D$.

-