# Dihedral group of order 10 in GAP

The dihedral group of order $$10$$ is given by $$D_{10} = \langle a,b| a^5 = b^2 = 1, bab^{-1} = a^{-1}\rangle$$. Now I need to find all the elements in GAP. But whenever I type DihedralGroup(10); in GAP the output show the elements $$[\text{ of ...}, f_2, f_2^2, f_2^3, f_2^4, f_1, f_1f_2, f_1f_2^2, f_1f_2^3, f_1f_2^4 ]$$ How do I get the elements in representatives of $$a$$ and $$b$$?

• Does ShowMultiplicationTable(DihedralGroup(IsFpGroup,10)); help? – fourier1234 Jul 3 at 18:04
• Looks to me like $a=f_2$ and $b=f_1$. – Cheerful Parsnip Jul 3 at 18:09

## 1 Answer

GAP is treating the Dihedral Group as a "pc-group" - this is good for GAP, but when you are just learning group theory it might not be so clear for you :D

Here is one option that might help you. We can just build the group with the presentation/letters exactly as you gave in the question.

gap> f:=FreeGroup("a","b");
<free group on the generators [ a, b ]>
gap> g := f/[f.1^5 ,f.2^2, f.2*f.1*f.2^-1*f.1];
<fp group on the generators [ a, b ]>
gap> SetReducedMultiplication(g);
gap> ShowMultiplicationTable(g);


We can double check we have the group we think we do...

gap> IdGroup(g);
[ 10, 1 ]
gap> IdGroup(DihedralGroup(10));
[ 10, 1 ]


Also maybe you want to be able to do some arithmetic in this group, you could do the following:

gap> a:=g.1;;
gap> b:=g.2;;
gap> a*b*a;
b
gap> a^2*b*a*b;
a

• You also might want to call SetReducedMultiplication(g); after creatingg, that way elements are always represented in unique form when forming arithmetic. – ahulpke Jul 3 at 19:30
• Thanks I have added this to the answer. – fourier1234 Jul 3 at 19:54
• Thanks, I got it. – idiot Jul 4 at 5:02
• @idiot if this has helped please consider marking this as the accepted answer by pressing the tick that appears next to the question.(If you have other answered questions you could do this for them too). – fourier1234 Jul 4 at 8:21