# [GAP Forum] Re: Computations with group elements

Mowsey gapforum at mowsey.org
Mon Oct 11 23:35:37 BST 2004

```I'll mostly just give some simple answers to your questions,
but I am worried that they will not help relieve any
frustration. I'll label my attempt at answering this

1.a.1.i. There is only one multiplication defined for
permutations, composition. The result of (1,2,3)*(4,2,1)
is always (2,3,4) no matter which group you think (1,2,3)
and (4,2,1) come from. If it helps, function are written
on the right, x^f is the result of applying f to x. So
to find what (1,2,3) does to 7, ask gap for "7^(1,2,3)"
and it will tell you "7". So x^(f*g) = (x^f)^g and 2^((1,2,3)*(4,2,1))
is (2^(1,2,3))^(4,2,1) = 3^(4,2,1) = 3, etc. giving (2,3,4).

1.a.1.ii. Q8 and Z4 do not use permutation representations because
you did not request them as permutation groups. Permutation
representations are extremely useful for insoluable groups,
but for soluable groups much more efficient representations
are known, and these are used by default. Here is how to
request permutation representations:

q8perm:= Image(IsomorphismPermGroup(SmallGroup(8,4)));
z4perm:= CyclicGroup(IsPermGroup,4);

1.a.2. To add 5 + 13 mod 15, just use

(5+13) mod 15;

1.a.3. To work with the additive group of integers mod 15,
one can use "ZmodnZ(15)" to construct the group, and "ZmodnZ(1,15)"
to get a generator. You can tell which operation is in use for
a group using:

If you use "+" it will use addition, if you use "*" it will use
multiplication. If one or the other is not defined, you will

If you are planning on doing much group theory which such a group,
it may be more efficient to work with the cyclic group of order 15,
which is written multiplicatively.

G:=CyclicGroup(15);
generator:=G.1;

2. If you wish to see a listing of the elements of a group,
you can use:

G:=SmallGroup(8,4);
Elements(G);

You will notice all 8 elements are printed, not just the generators.
G is in an efficient representation which is extremely similar to
a vector space, the basis is {f1,f2,f3} and the elements are products
f1^i*f2^j*f3^k where i,j,k is in {0,1}.

Hopefully it is clear that there is no need to name every element of
a vector space, only the basis elements need be given names.

To quickly access these generators, one can use "G.1" to refer to
"f1" in G, and of course "G.2" and "G.3". Try computing G.1^2,
and notice that it is not the identity, but rather is G.3. In Q8,
the square of every element g is -1 or 1 (the latter happenning only
for g=+-1), so we now know that G.3 is -1 and G.1 is one of i,j,
or k. Exercise: "Which one is it?" is a misguided question, figure
out why.  Short solution: We'll label G.1 as "i" for convenience
and since G.1,G.2,G.3 is a generating set of Q8 (while {i,-1,1,-i}
is not) we are free to label G.2 as "j". Now -i is G.1*G.3, -j is
G.2*G.3, k is G.1*G.2, and -k is G.1*G.2*G.3.

3. I think you'll understand that this feature would be less than
useless for anything other than toy groups of small size. Working with
generators (usually a special system of generators) leads to much
better understanding and much faster algorithms.

5. Given a list of generators of a subgroup of G, you use the
Subgroup command to generate the subgroup.

H:=Subgroup(G,[G.3]);

will produce the center of the quaternion group.

6. I was initially frustrated with GAP, but mostly because I
misunderstood its purpose and methods. GAP is certainly a great aid
in learning some basic group theory, but it is probably important to
realize that it is also a tool allowing mathematicians to solve for
the first time very very difficult problems in Algebra.  Even more,
it also contains many of those beautiful solutions in algorithmic
form. It is really amazing how many deep results from the mid 1800s
to the 21st century are made precise in the GAP distribution.

I guess basically I would suggest trying to think of how your
improvements would be applied to the 51 groups of order 32, which
were calculated by Miller in 1896. For instance, produce meaningful
names for all 1632 elements involved, or even just for the groups
themselves.

Suppose you were asked to list the elements of S_5, do you think
it would be useful to produce a list of 120 permutations in cycle
notation? At the very least the list should be organized into
smaller sections, for instance into conjugacy classes.  Often times
a very reasonable question for a tiny group becomes silly tedium
or incomprehensible data for even a moderately sized group. The
degree 11 group of Mathieu is a very interesting subgroup of S_11
generated by (1,2,3,4,5,6,7,8,9,10,11) and (3,7,11,8)(4,10,5,6).
It would be somewhat ridiculous to ask for a list of its
7920 elements, whereas this seems a very natural thing to do
for Q8 or Z4.

```