Let $G$ be a group with the identity element $e$ and suppose that we have a group homomorphism $\phi$ from the direct product $G \times G$ to $G$ satisfying
\[\phi(e, g)=g \text{ and } \phi(g, e)=g, \tag{*}\]
for any $g\in G$.

Let $\mu: G\times G \to G$ be a map defined by
\[\mu(g, h)=gh.\]
(That is, $\mu$ is the group operation on $G$.)

Then prove that $\phi=\mu$.
Also prove that the group $G$ is abelian.

Since $\phi$ is a group homomorphism, for any $g, g’ \in G$ and $h, h’ \in H$, we have
\begin{align*}
\phi( (g,h)(g’,h’))=\phi(g,h)\phi(g’,h’).
\end{align*}
The left hand side is equal to
\[\phi(gg’, hh’),\]
and thus we have
\[\phi(gg’, hh’)=\phi(g,h)\phi(g’,h’).\]
Setting $g’=h=e$, we have
\begin{align*}
\phi(g, h’)&=\phi(g, e)\phi(e, h’)\\
&= gh’ && \text{ by (*)}\\
&=\mu(g, h’).
\end{align*}
Since this equality holds for any $g \in G$ and $h’\in H$, we obtain
\[\phi=\mu\]
as required.

$G$ is an abelian group

Now we prove that $G$ is an abelian group.
Let $g, h \in G$ be any two elements.
Then we have
\begin{align*}
gh&=\phi(e,g)\phi(h,e) && \text{ by (*)}\\
&=\phi(eh, ge) && \text{ since $\phi$ is a homomorphism}\\
&=\phi(h,g)\\
&=\mu(h,g)=hg.
\end{align*}
Thus we have proved that $gh=hg$ for any $g, h \in G$. Thus the group $G$ is abelian.

Combined version

Here is a combined version of the proofs of the two claims at once.
We have for any $g, h\in G$,
\begin{align*}
&\mu(g,h)\\
&=gh=\phi(e,g)\phi(h,e) && \text{ by (*)}\\
&=\phi((e,g)(h,e)) && \text{ since $\phi$ is a homomorphism}\\
&=\phi(eh, ge)\\
&=\phi(h,g) \\
&=\phi(he,eg)=\phi((h,e)(e,g))\\
&=\phi(h,e)\phi(e,g) && \text{ since $\phi$ is a homomorphism}\\
&=hg \qquad \text{ by (*)}\\
&=\mu(h,g)
\end{align*}

From these equalities, we see that $\phi=\mu$ and $G$ is an abelian group.

Remark.

This argument is called the Eckmann–Hilton argument.

Isomorphism Criterion of Semidirect Product of Groups
Let $A$, $B$ be groups. Let $\phi:B \to \Aut(A)$ be a group homomorphism.
The semidirect product $A \rtimes_{\phi} B$ with respect to $\phi$ is a group whose underlying set is $A \times B$ with group operation
\[(a_1, b_1)\cdot (a_2, b_2)=(a_1\phi(b_1)(a_2), b_1b_2),\]
where $a_i […]

Surjective Group Homomorphism to $\Z$ and Direct Product of Abelian Groups
Let $G$ be an abelian group and let $f: G\to \Z$ be a surjective group homomorphism.
Prove that we have an isomorphism of groups:
\[G \cong \ker(f)\times \Z.\]
Proof.
Since $f:G\to \Z$ is surjective, there exists an element $a\in G$ such […]

Prove a Group is Abelian if $(ab)^2=a^2b^2$
Let $G$ be a group. Suppose that
\[(ab)^2=a^2b^2\]
for any elements $a, b$ in $G$. Prove that $G$ is an abelian group.
Proof.
To prove that $G$ is an abelian group, we need
\[ab=ba\]
for any elements $a, b$ in $G$.
By the given […]

Pullback Group of Two Group Homomorphisms into a Group
Let $G_1, G_1$, and $H$ be groups. Let $f_1: G_1 \to H$ and $f_2: G_2 \to H$ be group homomorphisms.
Define the subset $M$ of $G_1 \times G_2$ to be
\[M=\{(a_1, a_2) \in G_1\times G_2 \mid f_1(a_1)=f_2(a_2)\}.\]
Prove that $M$ is a subgroup of $G_1 \times G_2$.
[…]

Group Homomorphism, Conjugate, Center, and Abelian group
Let $G$ be a group. We fix an element $x$ of $G$ and define a map
\[ \Psi_x: G\to G\]
by mapping $g\in G$ to $xgx^{-1} \in G$.
Then show that
(a) the map $\Psi_x$ is a group homomorphism,
(b) the map $\Psi_x=\id$ if and only if $x\in Z(G)$, where $Z(G)$ is the center of the […]

A Group Homomorphism and an Abelian Group
Let $G$ be a group. Define a map $f:G \to G$ by sending each element $g \in G$ to its inverse $g^{-1} \in G$.
Show that $G$ is an abelian group if and only if the map $f: G\to G$ is a group homomorphism.
Proof.
$(\implies)$ If $G$ is an abelian group, then $f$ […]

A Homomorphism from the Additive Group of Integers to Itself
Let $\Z$ be the additive group of integers. Let $f: \Z \to \Z$ be a group homomorphism.
Then show that there exists an integer $a$ such that
\[f(n)=an\]
for any integer $n$.
Hint.
Let us first recall the definition of a group homomorphism.
A group homomorphism from a […]

Abelian Normal subgroup, Quotient Group, and Automorphism Group
Let $G$ be a finite group and let $N$ be a normal abelian subgroup of $G$.
Let $\Aut(N)$ be the group of automorphisms of $G$.
Suppose that the orders of groups $G/N$ and $\Aut(N)$ are relatively prime.
Then prove that $N$ is contained in the center of […]