You can verify that all the group axioms are satisfied for the operation defined above, but checking associativity directly can be rather time consuming. Fortunately, we have a theorem.

Let $\displaystyle G$ be any group, $\displaystyle H=\left<h\right>$ a cyclic group of order $\displaystyle r$ and $\displaystyle \vartheta$ an automorphism of $\displaystyle G$ such that $\displaystyle \vartheta^r$ is the identity automorphism. Then $\displaystyle K=G\times H$ is a group with respect to the operation $\displaystyle \circ$ where

$\displaystyle \left(g_1,h^i\right)\circ\left(g_2,h^j\right)\ =\ \left(g_1\vartheta^i(g_2),h^{i+j}\right)$

for all $\displaystyle g_1,g_2\in G$ and $\displaystyle i,j\in\mathbb Z.$

$\displaystyle K$ is known as the cyclic extension of $\displaystyle G$ by $\displaystyle H$ induced by the automorphism $\displaystyle \vartheta.$ For a proof of the theorem (and more on cyclic extensions) see Chapter 21 of John F. Humphreys,

*A Course in Group Theory*, Oxford University Press, 1996.

In our example, $\displaystyle \vartheta$ is the mapping $\displaystyle g\mapsto g^{-1}$ which is an automorphism because $\displaystyle G$ is Abelian. And $\displaystyle K$ is not Abelian because $\displaystyle (g,1)(g,h)=(g^2,h)$ whereas $\displaystyle (g,h)(g,1)=(1,h);$ the two are not equal if $\displaystyle g^2\ne1.$