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 any nontrivial group, and let $G=H$.
(For example, you may take $G=H=\Zmod{2}$.)

Then consider the subset $K$ in the direct product given by
\[K:=\{(g,g) \mid g\in G\} \subset G\times G.\]

We claim that $K$ is a subgroup of $G\times G$.
In fact, we have
\begin{align*}
(g,g)(h,h)=(gh,gh)\in K \text{ and }\\
(g,g)^{-1}=(g^{-1}, g^{-1})\in K
\end{align*}
for any $g, h\in G$.
Thus, $K$ is closed under multiplications and inverses, and hence $K$ is a subgroup of $G\times G$.

Now we show that $K$ is not of the form $G_1\times H_1$ for some subgroups $G_1, H_1$ of $G$.
Assume on the contrary $K=G_1\times H_1$ for some subgroups $G_1, H_1$ of $G$.

Since $G$ is a nontrivial group, there is a nonidentity element $x\in G$.
So $(x,x)\in K$ and $K$ is not the trivial group.
Thus, both $G_1$ and $H_1$ cannot be the trivial group.

Without loss of generality, assume that $G_1$ is nontrivial.
Then $G_1$ contains a nonidentity element $y$.

Since the identity element $e$ is contained in all subgroups, we have
\[(y,e)\in G_1\times H_1.\]
However, this element cannot be in $K$ since $y\neq e$, a contradiction.

Abelian Group and Direct Product of Its Subgroups
Let $G$ be a finite abelian group of order $mn$, where $m$ and $n$ are relatively prime positive integers.
Then show that there exists unique subgroups $G_1$ of order $m$ and $G_2$ of order $n$ such that $G\cong G_1 \times G_2$.
Hint.
Consider […]

Non-Abelian Group of Order $pq$ and its Sylow Subgroups
Let $G$ be a non-abelian group of order $pq$, where $p, q$ are prime numbers satisfying $q \equiv 1 \pmod p$.
Prove that a $q$-Sylow subgroup of $G$ is normal and the number of $p$-Sylow subgroups are $q$.
Hint.
Use Sylow's theorem. To review Sylow's theorem, check […]

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 […]

Eckmann–Hilton Argument: Group Operation is a Group Homomorphism
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 […]

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 […]

A Condition that a Commutator Group is a Normal Subgroup
Let $H$ be a normal subgroup of a group $G$.
Then show that $N:=[H, G]$ is a subgroup of $H$ and $N \triangleleft G$.
Here $[H, G]$ is a subgroup of $G$ generated by commutators $[h,k]:=hkh^{-1}k^{-1}$.
In particular, the commutator subgroup $[G, G]$ is a normal subgroup of […]

Fundamental Theorem of Finitely Generated Abelian Groups and its application
In this post, we study the Fundamental Theorem of Finitely Generated Abelian Groups, and as an application we solve the following problem.
Problem.
Let $G$ be a finite abelian group of order $n$.
If $n$ is the product of distinct prime numbers, then prove that $G$ is isomorphic […]

A Simple Abelian Group if and only if the Order is a Prime Number
Let $G$ be a group. (Do not assume that $G$ is a finite group.)
Prove that $G$ is a simple abelian group if and only if the order of $G$ is a prime number.
Definition.
A group $G$ is called simple if $G$ is a nontrivial group and the only normal subgroups of $G$ is […]