returns the list of all elements of group.


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.


open allclose all

Basic Examples  (3)

Elements of a cyclic permutation group:

First three elements:

Last element:

Scope  (2)

A permutation group:

The first permutation is always the identity. Then we have permutations moving the last points of the support:

Alternating groups can be generated with 3-cycles:

Options  (1)

GroupActionBase  (1)

Take the symmetric group of degree 5, generated by a transposition and a shift:

By default the permutations are generated in standard ordering:

Generate the same permutations, but in a different order:

The role of the base can be understood as conjugation under the permutation relating the bases:

Applications  (1)

We can generate uniformly distributed random permutations in a group by generating uniform ranks and then constructing those permutations:

Properties & Relations  (1)

A permutation group:

It is still a small subgroup of :

Take some permutations in the group:

Find the positions of permutations:

Possible Issues  (3)

Position zero is not defined:

Positions must not be larger than the group order:

Permutations are sorted by images, not by the Wolfram Language's canonical order:

Neat Examples  (1)

These are generators of a permutation representation of the largest Mathieu group, :

Find a strong generating set for the group, relative to a sorted base:

A subgroup of order 960:

Construct its permutations using a non-sorted base:

Find their positions in the group:

They are not sorted:

Different bases produce different reordering patterns:

By default the base is taken sorted:

Wolfram Research (2010), GroupElements, Wolfram Language function,


Wolfram Research (2010), GroupElements, Wolfram Language function,


Wolfram Language. 2010. "GroupElements." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2010). GroupElements. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_groupelements, author="Wolfram Research", title="{GroupElements}", year="2010", howpublished="\url{}", note=[Accessed: 14-June-2024 ]}


@online{reference.wolfram_2024_groupelements, organization={Wolfram Research}, title={GroupElements}, year={2010}, url={}, note=[Accessed: 14-June-2024 ]}