TITLE: Representable functor from scheme to Groups
QUESTION [5 upvotes]: I want to do the following question (6.6k) in Vakli's Foundations of algebraic geometry

Suppose we have a contravariant functor $F$ from $Sch$ to $Groups$. Suppose further that $F$ composed  with the forgetful functor is represented by the object Y. Show that the group operations on $F(X)$ uniquely determine $m:Y×Y \rightarrow Y$, $i:Y \rightarrow Y$, $e:Spec\mathbb{Z} \rightarrow Y$. And the group operation on $Mor(X,Y)$ is the same as on $F(X)$

Suppose $F$ composites with the forgetful functor is equal to $h_Y$
I know that $m:Y×Y \rightarrow Y$ must be the product of  the projection morphism $π:Y×Y \rightarrow Y$ with itself and $e$ must be identity element of the group $Mor(spec\mathbb{Z} ,Y)$ For the morphism $i$, it composites with $f \in Mor(Y,Y) $ to give $f^{-1}$. But I have no idea why this morphism is unique. Also I don't know why $F(X)$ should have group structure induced by $Y$. I'm sorry if this is a stupid question. Any help or hints are appreciated.

REPLY [4 votes]: Consider the diagram given to you by the problem
$$
\begin{matrix}
& & \textbf{Groups} \\
F\nearrow & & \downarrow \\
\textbf{Schemes}^{op} & \xrightarrow{h_X} & \textbf{Sets}
\end{matrix}
$$
The question can be answered purely from a functor of points perspective since morphisms between representable functors can be turned into morphisms of schemes; so, what does it mean for $h_X$ to have the structure of a group schemes? You should have natural transformations
$$
\begin{align*}
&m:h_X\times h_X \to h_X \\
&\iota:h_X\to h_X \\
&e:h_\mathbb{Z} \to h_X
\end{align*}
$$
but what is a natural transformation? It's a map described on the functor evaluated on objects in your source category. So, because of the factorization of $h_X$ as $\text{Forget}\circ F$ we have for any morphism of schemes $S \to T$ a commutative diagram
$$
\begin{matrix}
h_X(T)\times h_X(T) & \xrightarrow{m(T)} & h_X(T) \\
\downarrow & & \downarrow \\
h_X(S)\times h_X(S) & \xrightarrow{m(S)} & h_X(S)
\end{matrix}
$$
where each row satisfies the diagrams for a group object in a category. You can do the same argument for the other group operations and call it a day.