GroupElements[group]
returns the list of all elements of group.
GroupElements[group,{r1,…,rk}]
returns the elements numbered r1,…,rk in group in the standard order.
GroupElements
GroupElements[group]
returns the list of all elements of group.
GroupElements[group,{r1,…,rk}]
returns the elements numbered r1,…,rk in group in the standard order.
Details and Options
- The elements of a permutation group are found by constructing a strong generating set representation of the group.
- The order of elements returned by GroupElements depends on the base of the strong generating set. An explicit base can be chosen by setting GroupActionBase->{p1,p2,…}.
- GroupElements[group,{1}] gives the identity element for any choice of the group base.
- Negative positions are assumed to count from the end.
Examples
open all close allBasic Examples (3)
Elements of a cyclic permutation group:
GroupElements[PermutationGroup[{Cycles[{{1, 9, 6}, {3, 7}}]}]]GroupElements[PermutationGroup[{Cycles[{{1, 9, 6}, {3, 7}}]}], {1, 2, 3}]GroupElements[PermutationGroup[{Cycles[{{1, 9, 6}, {3, 7}}]}], {-1}]Scope (2)
perm1 = Cycles[{{1, 5, 3, 12, 8, 4, 16, 11, 7, 2, 20, 10, 6}, {9, 15, 17, 14, 19, 18, 13}}];
perm2 = Cycles[{{1, 4}, {2, 5, 3}}];
group = PermutationGroup[{perm1, perm2}];GroupOrder[group]The first permutation is always the identity. Then we have permutations moving the last points of the support:
GroupElements[group, Range[10]]PermutationReplace[Range[20], %]//ColumnAlternating groups can be generated with 3-cycles:
GroupElements[PermutationGroup[{Cycles[{{1, 2, 3}}], Cycles[{{2, 3, 4}}], Cycles[{{3, 4, 5}}], Cycles[{{4, 5, 6}}]}]] === GroupElements[AlternatingGroup[6]]Options (1)
GroupActionBase (1)
Take the symmetric group of degree 5, generated by a transposition and a shift:
group = PermutationGroup[{Cycles[{{1, 2}}], Cycles[{{1, 2, 3, 4, 5}}]}]By default the permutations are generated in standard ordering:
standardS5 = GroupElements[SymmetricGroup[5]];GroupElements[group] === standardS5Generate the same permutations, but in a different order:
perms = GroupElements[group, GroupActionBase -> {5, 3, 4, 1, 2}];perms === standardS5Sort[perms, Less] === standardS5The role of the base can be understood as conjugation under the permutation relating the bases:
g = FindPermutation[{1, 2, 3, 4, 5}, {5, 3, 4, 1, 2}]PermutationReplace[perms, g] === standardS5Applications (1)
We can generate uniformly distributed random permutations in a group by generating uniform ranks and then constructing those permutations:
group = PermutationGroup[{Cycles[{{1, 25, 5, 3, 12, 23, 24, 8, 4, 16, 11, 26, 7, 2, 20, 22, 10, 6}, {9, 15, 21, 27, 17, 14, 19, 18, 13}}], Cycles[{{1, 4}, {2, 5, 3}}]}];order = GroupOrder[group]SeedRandom[100];RandomInteger[order, 5]GroupElements[group, %]Properties & Relations (1)
group = PermutationGroup[{Cycles[{{1, 25, 5, 3, 12, 23, 24, 8, 4, 16, 11, 26, 7, 2, 20, 22, 10, 6}, {9, 15, 21, 27, 17, 14, 19, 18, 13}}], Cycles[{{1, 4}, {2, 5, 3}}]}];order = GroupOrder[group]It is still a small subgroup of
:
27! / orderTake some permutations in the group:
SeedRandom[200];positions = RandomInteger[order, 5]GroupElements[group, positions]Find the positions of permutations:
GroupElementPosition[group, %]% === positionsPossible Issues (3)
GroupElements[PermutationGroup[{Cycles[{{1, 2, 3, 4}}], Cycles[{{1, 2}}]}], {0}]Positions must not be larger than the group order:
GroupElements[PermutationGroup[{Cycles[{{1, 2, 3, 4}}], Cycles[{{1, 2}}]}], {30}]Permutations are sorted by images, not by the Wolfram Language's canonical order:
perms = GroupElements[AlternatingGroup[4]]Sort[perms] === permsSort[perms, Less] === permsNeat Examples (1)
These are generators of a permutation representation of the largest Mathieu group,
:
GroupGenerators[MathieuGroupM24[]]GroupOrder[MathieuGroupM24[]]Find a strong generating set for the group, relative to a sorted base:
chain = GroupStabilizerChain[MathieuGroupM24[]];SGS = chain[[1, 2]]base = chain[[-1, 1]]GroupOrder[subgroup = PermutationGroup[GroupGenerators[SGS][[{1, 5}]]]]Construct its permutations using a non-sorted base:
Length[perms = GroupElements[subgroup, GroupActionBase -> {1, 4, 2, 3, 7, 6, 5}]]Find their positions in the
group:
inM24 = GroupElementPosition[MathieuGroupM24[], perms];ListPlot[inM24, Frame -> True]Different bases produce different reordering patterns:
Length[perms = GroupElements[subgroup, GroupActionBase -> {6, 1, 7, 2, 5, 3, 4}]]inM24 = GroupElementPosition[MathieuGroupM24[], perms];ListPlot[inM24, Frame -> True]By default the base is taken sorted:
Length[perms = GroupElements[subgroup]]inM24 = GroupElementPosition[MathieuGroupM24[], perms];ListPlot[inM24, Frame -> True]Tech Notes
Related Guides
History
Text
Wolfram Research (2010), GroupElements, Wolfram Language function, https://reference.wolfram.com/language/ref/GroupElements.html.
CMS
Wolfram Language. 2010. "GroupElements." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GroupElements.html.
APA
Wolfram Language. (2010). GroupElements. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GroupElements.html
BibTeX
@misc{reference.wolfram_2026_groupelements, author="Wolfram Research", title="{GroupElements}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/GroupElements.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_groupelements, organization={Wolfram Research}, title={GroupElements}, year={2010}, url={https://reference.wolfram.com/language/ref/GroupElements.html}, note=[Accessed: 12-June-2026]}