Give an example of two groups $G$ and $H$ and a subgroup $K$ of the direct product $G\times H$ such that $K$ cannot be written as $K=G_1\times H_1$, where $G_1$ and $H_1$ are subgroups of $G$ and $H$, respectively.

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.

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 \in A, b_i \in B$ for $i=1, 2$.

Let $f: A \to A’$ and $g:B \to B’$ be group isomorphisms. Define $\phi’: B’\to \Aut(A’)$ by sending $b’ \in B’$ to $f\circ \phi(g^{-1}(b’))\circ f^{-1}$.

\[\require{AMScd}
\begin{CD}
B @>{\phi}>> \Aut(A)\\
@A{g^{-1}}AA @VV{\sigma_f}V \\
B’ @>{\phi’}>> \Aut(A’)
\end{CD}\]
Here $\sigma_f:\Aut(A) \to \Aut(A’)$ is defined by $ \alpha \in \Aut(A) \mapsto f\alpha f^{-1}\in \Aut(A’)$.
Then show that
\[A \rtimes_{\phi} B \cong A’ \rtimes_{\phi’} B’.\]