# Identifying the group in GAP

I am defining a matrix group in GAP. I know that its a finite group, and can compute its order. Using sonata package and commands like AllGroups( Size( G ) ) and IsIsomorphicGroup( G, H ) commands, I can find the Group-ID in the GAP database.

I would like to identify this group with a well-known group like Dihedral, Quaternion, Cyclic, etc. Is there any way to achieve this?

m1 := [[0,-1],[1,0]] ;
m2 := [[0,1],[1,0]] ;
G := Group( m1, m2 );
Size( G );


One option I can think is to define these standard groups and check if $$G$$ is isomorphic to any of them! For example,

IsCyclic( G ); # This is easy!
Q := QuaternionGroup( Size( G ) );
IsIsomorphicGroup( G, Q );
D := DihedralGroup( Size( G ) );
IsIsomorphicGroup( G, D );


I know the term well-known is a vague, but these are the groups, I would understand from my textbook!

A possible (vague) general question can be asked, are there named groups in GAP?

• I usually use StructureDescription(G)
– Easy
Apr 12, 2019 at 13:29
• From the manual of StructureDescription: Note that StructureDescription is not intended to be a research tool, but rather an educational tool. Apr 12, 2019 at 16:50
• You can find the index in the small groups library easier with IdGroup. Apr 12, 2019 at 19:15
• What is a standard group is very subjective, beyond a handfull of small examples. There are libraries of groups in GAP that have names, but some names are specific to the library (even just: Number $x$ in the library), and classification provided by the library might involve actions and not only isomorphism. Apr 12, 2019 at 19:23
• A plug for a webpage of my colleague Tim Dokchitser: people.maths.bris.ac.uk/~matyd/GroupNames. Descriptions and impressively much information about impressively many groups of order up to 500, which you can find by their SmallGroups ID. Not all of them, of course. Apr 13, 2019 at 12:40

You might notice that $$m_2$$ and $$m_1m_2$$ both have order two, and your group is certainly generated by $$m_2$$ and $$m_1m_2$$, therefore, it must be dihedral. (In this case, of order $$8$$, since $$m_1$$ has order $$4$$.)