In Katz's article p-adic properties of modular schemes and modular forms in the Antwerp proceedings, the following definition of an elliptic curve over a base scheme $S$ is given:
By an elliptic curve over a scheme $S$, we mean a proper smooth morphism $p: E \to S$, whose geometric fibres are connected curves of genus one, together with a section $e : S \to E$.
Now this is a quite reasonable definition, which coincides with the usual notion of an elliptic curve when $S$ is the spectrum of a field. However, it does not seem (to me) to follow directly from the definition that such an elliptic curve over $S$ should be a group scheme over $S$ (an obviously desirable property which Katz seems to take as an obvious fact). When $S= \text{Spec }k$, I understand that this essentially follows from Riemann-Roch...
So, what principle allows one to come to this conclusion in the general case?
Thank you!