I am confused about why the following two definitions of group schemes is equivalent:
$Def\space 1$: Let $S$ be a scheme. A group scheme over $S$ is an $S$-scheme $G$ equipped with $S$-maps $m:G\times_SG\to G$ and $i:G\to G$ satisfying some natural identities and associativities.
$Def\space2$: Let $S$ be a scheme. A group scheme over $S$ is an $S$-scheme $G$ such that for any $S$-scheme $S^\prime$, the set $G(S^\prime)={Hom}_S(S^\prime, G)$ has a group structure functorial in $S^\prime$.
The second definition is from the remark in Brian Conrad's notes on abelian varieties. I'm not sure whether I have misunderstood some part. I am now confused about why the second definition implies the first one. Looking forward to your answer. Thanks
You’re missing one “neutral $S$-map” $S \rightarrow G$ in your first definition.
To go from the second definition to the first, take as neutral map $\nu: S \rightarrow G$ is the neutral element of $G(S)$. Take as inverse map $i: G \rightarrow G$ the inverse of identity in the group $G(G)$. Take as multiplication map $m: G\times_S G \rightarrow G$ the product (in the group $G(G\times_S G)$) of the first and the second projection.
I’ll let you check that the associativity and neutral identities are satisfied.