Is $G$ always the automorphism group of the trivial $G$-torsor?

If $G$ is just an ordinary set-theoretic group, then the answer to the question in the title is yes: the automorphisms of $G$ as a (left) $G$-set are all of the form "multiply (on the right) by an element of $G$."

I'm trying to understand the case where $G$ is a group scheme; then as I understand it the stack of $G$-torsors is equivalent to the stack quotient $[\ast/G]$, the stackification of the fibered category whose fiber over a scheme $X$ is a single object with $G(X)$ automorphisms. The image of that single object in the stackification is the trivial $G$-torsor on $X$ (namely the base change $G_X$ of $G$ to $X$) and so the automorphisms of that trivial $G$-torsor should again be $G(X)$.

But consider the case $G=\mu_2$, the group of square roots of unity, which is represented by $\mathrm{Spec}\bigl(\mathbb{Z}[x]/(x^2-1)\bigr)$. Letting $R$ be the ring $\mathbb{F}_2[\varepsilon]/(\varepsilon^2)$, we have $G(R) = \{1,1+\varepsilon\}$. These give us two automorphisms of $G_R = R[x]/(x^2-1)$, namely $x\mapsto x$ and $x\mapsto (1+\varepsilon)x$. But $G_R$ has two more automorphisms that commute with the action by $G(R)$; we can send $x\mapsto x+\varepsilon$ or $x\mapsto (1+\varepsilon)x + \varepsilon$. So how can this be the trivial $G$-torsor over $R$ if it has too many automorphisms as a $G$-object?

The two morphisms are no $G$-morphisms. An $R$-algebra homomorphism $f : R[x]/(x^2-1) \to R[x]/(x^2-1)$ commutes with the $G$-action if and only if the diagram $$\begin{array}{c} R[x]/(x^2-1) & \xrightarrow{f} & R[x]/(x^2-1) \\ \Delta \downarrow ~~~&& ~~~\downarrow\Delta \\ R[x]/(x^2-1) \otimes_R R[y]/(y^2-1) & \xrightarrow{~f \otimes \mathrm{id}~}& R[x]/(x^2-1) \otimes_R R[y]/(y^2-1) \end{array}$$ commutes, where $\Delta(x) = x \otimes y$. For $x \mapsto x+\varepsilon$ this would mean $$(x \otimes y)+\varepsilon = (x+\varepsilon) \otimes y,$$ which is not correct. For $x \mapsto (1+\varepsilon)x + \varepsilon$ this would mean $$(1+\varepsilon) (x \otimes y) + \varepsilon = ((1+\varepsilon)x + \varepsilon) \otimes y,$$ which is not correct either. Actually, you can see directly from the diagram that $G$-morphisms $f$ satisfy $f(x)= ax$ for some $a \in R$.
• That makes sense, thank you! I see I was just checking that the maps commuted with the action of all the square roots of 1 that existed in $R$, but not with the square roots that could exist in arbitrary $R$-algebras. Does the result then hold for a general group scheme? So far all my arguments have felt rather ad hoc. – Owen Biesel Dec 8 '16 at 18:17
• Sure. The natural map $G \to \underline{\mathrm{Aut}}(G) = \underline{\mathrm{End}}(G)$ is an isomorphism. This is especially clear from the functorial point of view. – HeinrichD Dec 8 '16 at 18:33
• @HeinrichD You mean the automorphism group of any torsor is the global section of $G$? Even for trivial torsor I don't see why this is true. The OP says: If $G$ is just an ordinary set-theoretic group, then the answer to the question in the title is yes: the automorphisms of $G$ as a (left) $G$-set are all of the form "multiply (on the right) by an element of $G$." But I think multiply (on the right) gives only an identification of the automorphism group to the opposite group of $G$. – Lao-tzu Sep 12 at 13:09
• @HeinrichD Sorry, maps $a$ to multiply (on the right) by $a^{-1}$ make things right for trivial torsor though. – Lao-tzu Sep 12 at 13:34