TITLE: push-forward of linear algebraic group schemes
QUESTION [6 upvotes]: Suppose that $\pi: X \to S$ is a proper morphism of schemes, and $G \to X$ is a flat affine algebraic group scheme over $X$. Is the push-forward $\pi_* G$ also affine? 
I'd be happy to assume more -- say that $\pi$ is smooth, and that $G$ is smooth over $X$, or even a torus...

REPLY [3 votes]: If $\pi \colon X \to S$ is proper, flat and of finite presentation and $W$ is an affine $X$-scheme, then  $\pi_*W \to S$ is affine and of finite presentation. Unless $W$ is etale over $X$, it is difficult to deduce much about the smoothness of $\pi_*W \to S$. 
To see this, you can combine an affine representability result for modules, such as https://stacks.math.columbia.edu/tag/08JY or [EGAIII-2, 7.7.8], with the ideas from Proposition 2.5 of:
Lieblich, Max, Remarks on the stack of coherent algebras, Int. Math. Res. Not. 2006, No. 11, Article ID 75273, 12 p. (2006). ZBL1108.14003.
A precise reference is Theorem 2.3 of 
Hall, Jack; Rydh, David, General Hilbert stacks and Quot schemes, Mich. Math. J. 64, No. 2, 335-347 (2015). ZBL1349.14013.1434731927. https://projecteuclid.org/euclid.mmj/1434731927