In GAP,
to obtain the permutation matrix
corresponding to the cyclic permutation
of
which sends
,
,
...,
,
and
, type
P:=PermutationMat((
,...,
),n);.
For example, to obtain the permutation matrix
corresponding to the permutation
of
which sends
,
,
,
and
, type
P:=PermutationMat((1,2,3,5),5);. This is printed out as a
list of row vectors. To get
to print out as
a square matrix, type PrintArray(P).
To get the inverse permutation, type
PrintArray(P^(-1));.
a^(-1) is the inverse.
For example,
if you type
a:=(1,2,3,5); b:=(3,2,1)(4,5) a*b; a^(-1);returns the product
(3,4,5) and
the inverse (1,5,3,2).
(b) Make a
table of all
products
, where
run over all
permutations of
.