Group scheme endomorphisms of $G_a$ and $G_m$ I am working through some exercises on group schemes and had a few questions.  $k$ is a ring (commutative with identity, always), $G_a = \textrm{Spec }k[T], G_m = \textrm{Spec } k[T,T^{-1}] = D(T)$, where $D(T)$ is the principal open set in $G_a$ consisting of all primes not containing $T$.  

(i): I think I have everything here except the end.  If $\phi: k[T,T^{-1}] \rightarrow k[T,T^{-1}]$ is any $k$-algebra homomorphism, it is completely determined by its effect on $T$.  Since $k[T,T^{-1}]$ is the localization of $k[T]$ at $S  \{1,T,T^2, ... \}$, $\phi$ is well defined if and only if $\phi(T)$ is a unit in $k[T,T^{-1}]$.
So the end of (i) should involve a characterization of the units of $k[T,T^{-1}]$ as those elements $f$ "with no zeroes on any geometric fiber over $\textrm{Spec } k$."
I'm not exactly sure what this means.  My guess would be: for the composition $k \rightarrow k[T] \rightarrow k[T,T^{-1}]$, let $\mathfrak p$ be a prime of $k$.  We say that $f \in k[T,T^{-1}]$ vanishes on the fiber of $\mathfrak p$ if there exists a prime $P$ of $k[T,T^{-1}]$ which contains $f$ and for which $P \cap k= \mathfrak p$.
If that is the correct interpretation, then the assertion that $f$ is a unit if and only if it does not vanish on any fiber is obvious, because the union of the fibers is $\textrm{Spec } k[T,T^{-1}]$, and $f$ is a unit if and only if it does not lie in any prime ideal.
Is there something significant I'm missing?  I didn't really use any properties of the ring extension $k \rightarrow k[T,T^{-1}]$.
 A: I'm just going to do the $\mathbb{G}_m$ part of (i). I'm also not going to use $x,y$; I think that's weird. The comultiplication map is going to be $\Delta:k[t,t^{-1}]\rightarrow k[t,t^{-1}]\otimes_k k[t,t^{-1}]$ instead.
You're right, a map of group schemes $\phi^\#:\mathbb{G}_m\rightarrow \mathbb{G}_m$ over $k$ is determined by where $t$ goes. We also need $\phi\otimes \phi\circ \Delta=\Delta\circ \phi$. What this means is that $\Delta(\phi(t))=\phi(t)\otimes \phi(t)$. This is my translation of the given condition.
Write $\phi(t)$ as a Laurent polynomial, i.e. $\phi(t)=a_nt^n+\cdots +a_{-m}t^{-m}$. The above condition translates then into $$a_n t^n\otimes t^n+\cdots + a_{-m}t^{-m}\otimes t^{-m}= a_n^2t^n\otimes t^n+a_na_{n-1} t^n\otimes t^{n-1}+\cdots+a_{-m}^2t^{-m}\otimes t^{-m}.$$ From this we get that $a_i=a_i^2$, $a_ia_j=0$ if $i\neq j$. This can happen only if the $a_i$ form a system of orthogonal idempotents.
We need more conditions, of course. We could also consider the counit map $\epsilon:k[t,t^{-1}]\rightarrow k$ taking $t$ to $1$. Then the only other condition we need is $\epsilon\circ \Delta= \epsilon$. This would translate into the condition $$1=\epsilon(t)=\epsilon\circ \Delta(t)=\epsilon(a_nt^n+\cdots + a_{-m}t^{-m})=a_n+\cdots + a_{-m}.$$ This actually implies a decomposition of $k$ into a direct sum of "indecomposable" pieces. But it also completely characterizes group scheme endomorphisms of $\mathbf{G}_m$. This shows the forward direction at minimum. It might as well show the converse also: if we assume $\phi(t)$ doesn't vanish in any geometric fiber, then this impies (by taking the residue in the generic point of each connected component of $\text{Spec}(k)$) that the coefficients sum to $1$.
