# Constructing a semidirect product in MAGMA

I am trying to construct in MAGMA the group $$(C_3 \times C_3) \rtimes Q_8$$

in which the action of $Q_8$ on $C_3 \times C_3$ is given by the center $Z(Q_8)$ acting trivially, and the quotient $Q_8 / Z(Q_8) \simeq C_2 \times C_2$ acting on $C_3 \times C_3$ component per component, so for example if $Q_8=\{1,x,i,xi,j,xj,k,xk\}$, $C_3 \times C_3 = \{(a^i, b^j)\}$ then saying that $i$ acts on the first $C_3$ and $j$ acts on the second one we would get calculations like $$xi.(a,b) = i.(a,b) = (a^2, b)$$

I tried the following

K:=SmallGroup(9,2);
H:=SmallGroup(8,4);
A:=AutomorphismGroup(K);
phi:= hom< H -> A | < H.1,A.1 >, < H.2, A.2*A.2*A.1*A.2 > >;
G:=SemidirectProduct(K,H,phi);

because the command $H;$ gave

GrpPC : H of order 8 = 2^3
PC-Relations:
H.1^2 = H.3,
H.2^2 = H.3,
H.2^H.1 = H.2 * H.3

and the command $A;$ gave

A group of automorphisms of GrpPC : K
Generators:
Automorphism of GrpPC : K which maps:
K.1 |--> K.1^2
K.2 |--> K.2
Automorphism of GrpPC : K which maps:
K.1 |--> K.1^2 * K.2
K.2 |--> K.1^2

but I get the following error message

In file "/magma/package/Group/GrpFin/semidirect_product.m", line 86, column 19:
$\quad$ >> G := Extension(K, H, [H.i @ phi: i in [1..NPCgens(H)]]);
$\qquad \qquad \qquad$ ^
Runtime error in 'Extension': Group presentation is not consistent

Can someone help me seeing the error? (oh, and while I am here, what does the $H_2$^$H_1$ notation mean there?)

As Morgan Rogers says, H.2^H.1 means H.1^-1 * H.2 * H.1.

The mistake is that your image A.2*A.2*A.1*A.2 of H.2 under phi is not what you wanted it to be.

> K:=SmallGroup(9,2);
> H:=SmallGroup(8,4);
> A:=AutomorphismGroup(K);
> A.2*A.2*A.1*A.2;
Automorphism of GrpPC : K which maps:
K.1 |--> K.1
K.2 |--> K.1^2 * K.2^2


and in fact this automorphism of $K$ does not commute with A.1, so the phi you have defined is not a homomorphism. (Ideally Magma would check that that property holds, but it cannot easily check everything like that, and to attempt to do so might take time.)

You can do it by defining the required images directly.

> t := hom< K->K | [K.1^2,K.2] >;
> u := hom< K->K | [K.1,K.2^2] >;
> phi:= hom< H -> A | < H.1,t >, < H.2, u > >;
> G:=SemidirectProduct(K,H,phi);
> Order(G);
72

• I didn't know you could do that, that looks much easier. Thank you :) – AnalysisStudent0414 Mar 18 '17 at 1:33