Solution (source code)

= Solution

The <multiplicative algebraic group> $\mathbb G_m$ has <coordinate ring> $\mathbb C[t,t^{-1}]$. An algebraic morphism $f:\mathbb G_m\to\mathbb G_m$ therefore sends the invertible coordinate on the target to a <unit> of this <Laurent polynomial ring>.

Every unit of $\mathbb C[t,t^{-1}]$ has the form $ct^i$, with $c\in\mathbb C^*$ and $i\in\mathbb Z$. To prove this, suppose Laurent polynomials $P,Q$ satisfy $PQ=1$. Write their least and greatest active exponents as $a\le b$ and $c\le d$. The least and greatest exponents in their product are $a+c$ and $b+d$, since their endpoint coefficients are nonzero. Both must be zero. Consequently
$$
(b-a)+(d-c)=0,
$$
so each factor has only one active exponent. This proves the asserted unit description.

Thus $f(t)=ct^i$. A <group homomorphism> sends the identity to the identity, so $f(1)=1$ and $c=1$. Conversely, for every integer $i$, including negative integers and zero, $t\mapsto t^i$ is regular on $\mathbb G_m$ and satisfies $(st)^i=s^it^i$. We obtain
$$
\boxed{\operatorname{Hom}_{\mathrm{alg.grp}}(\mathbb G_m,\mathbb G_m)=\{t\mapsto t^i:i\in\mathbb Z\}.}
$$
These are exactly the <characters of an algebraic torus> in the one-dimensional case. The algebraic-morphism requirement is essential to the argument: the map must come from the Laurent coordinate ring.