Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

I've just started a PhD in Group Theory and need to use the computer programme MAGMA. I wonder if anyone could help me with a couple of (probably very basic things).

  1. I need to produce a Hasse diagram for subgroups of a given group containing a given Sylow subgroup of the group. In MAGMA I can use the command Subgroups(G:OrderMultipleOf:=??) to obtain all subgroups of a group G which contain a Sylow subgroup, however is there a command I can use so that for a given group G and a Sylow subgroup S, I can produce all subgroups of G containing S.

  2. As I'm very new to MAGMA, does anyone know of any good books, publications or websites aiding someone to use MAGMA for group theoretical purposes.

Thanks in advance for your help.


share|improve this question
The MAGMA Handbook is usually well-written, with lots of examples. magma.maths.usyd.edu.au/magma/handbook –  Giuseppe Dec 7 '11 at 14:06
Thanks for the response. The MAGMA handbook is fairly thorough, but I'm afraid I can't seem to find what I'm looking for. It may require me to learn how to program in MAGMA. –  dward1996 Dec 7 '11 at 14:23
I don't want to sound like the (annoying) open-source guy, but I guess you also know GAP, right? I happened to use both actually, and for group theory I found GAP to be danm good, so in any case you may keep in mind that it exists, in case things shouldn't work with magma :) –  Maurizio Monge Jan 6 '12 at 17:13
How can we get a new version of MAGMA? I have the 2005 edition and after the comments on this post, I found that a lot of packages added to the new version. Can anybody help me for preparing a new version of MAGMA? Thanks –  Shahrooz Jan 6 '12 at 19:25
I am aware of GAP thanks. Unfortunately I am not the best person when it comes to learning to use computer programs so am currently focusing on MAGMA as this is the program my supervisor advises his students to use. However, once I have some confidence in using it, I will also look into using GAP. Thanks for the advice though. –  dward1996 Jan 7 '12 at 9:25
add comment

3 Answers

up vote 3 down vote accepted

  • Although you say you'd prefer not to use GAP, producing a Hasse diagram is very easy in GAP, at least with the right packages.
    You'll need the xgap GAP package; and either the xgap binaries, which requires an X Windows system (easiest done with Linux or a similar Unix-like system), or else Gap.app, which requires a Mac.
    Once you have these installed, start xgap/Gap.app, and follow these steps:

    • Type "GraphicSubgroupLattice(SymmetricGroup(4));"
    • In the window that pops up, go to the Subgroups | All Subgroups menu.

    The Hasse diagram of the subgroup lattice will appear.

  • It's also quite easy to show parts of the subgroup lattice -- essentially, you can take any list of subgroups and show the inclusion relations. To do this:

    • Type "GraphicSubgroupLattice(G);" as before.
    • Compute the list of subgroups you want to display. It should be the output of the last GAP command.
    • Go to the Subgroups | Insert Vertices menu.

    The Hasse diagram of the subposet consisting of subgroups from your list will appear.

    There's probably a comparably easy way to show Hasse diagrams in MAGMA. (But I'm telling you what I know...)

    Xgap is available from:
    Gap.app is available from:

  • share|improve this answer
    Thanks for that. –  dward1996 Mar 28 '12 at 7:59
    add comment

    &cat[[h: h in Conjugates(G,H`subgroup) | S subset h]: H in Subgroups(G)];

    will create a list of all subgroups of $G$ containing a given group $S$. The main caveat here is that the function Subgroups(G) produces a list of representatives of conjugacy classes of subgroups of $G$. So after that you have to go through all conjugates of each such representative. Also, the elements of the list that Subgroups(G) returns are so-called records. To actually access the subgroup itself, you use the construction H`subgroup, where H is one such record. The command &cat concatenates a list of lists into one long list, just like the command &+list adds all the elements of the list and so on.

    If you want to loop through this list, you can do something like

    for h in &cat[[h: h in Conjugates(G,H`subgroup) | S subset h]: H in Subgroups(G)] do


    end for;

    or just have two nested loops, one over the elements of Subgroup(G), and one over the $G$-conjugates of each of them.

    I am afraid there is no really good place to learn magma other than the online handbook and the people who already know it.

    share|improve this answer
    You could speed up that computation considerably by replacing "H in Subgroups(G)" by "H in Subgroups(G:OrderMultipleOf:=Order(S))". –  Derek Holt Dec 7 '11 at 17:25
    Thanks for the advice. –  dward1996 Dec 8 '11 at 9:05
    add comment

    Rather than searching the online handbook for MAGMA it is worth downloading the handbook fro a website such as:


    share|improve this answer
    Isn't that outdated? –  expmat Jan 6 '12 at 16:18
    It is a few years old, but for learning the basics of MAGMA, I am finding it to be quite useful. –  dward1996 Jan 7 '12 at 9:26
    add comment

    Your Answer


    By posting your answer, you agree to the privacy policy and terms of service.

    Not the answer you're looking for? Browse other questions tagged or ask your own question.