SAGE has basic commands and subroutines which implement a number of functions in elementary group theory (and many other things). A general introduction to SAGE use and how SAGE can be accessed at UMBC can be found in a separate document.
SAGE can represent simple groups in a variety of manners, including as permutation and matrix groups. In addition to SAGE's native functions, the extensive functionality of GAP can also be used from within SAGE (tutorial).
http://www.sagemath.org/doc/tutorial/tour_groups.html]
http://www.sagemath.org/doc/reference/groups.html]
http://buzzard.ups.edu/sage/sage-group-theory-primer.pdf]
http://modular.math.washington.edu/home/wdj/expository/groups-sage.pdf]
sage: G = SymmetricGroup(4)
sage: G.order()
24
sage: G.exponent()
12
sage: K4 = PermutationGroup(['(1,2)(3,4)','(1,3)(2,4)'])
sage: K4.is_normal(G)
True
sage: K4.list()
[(), (1,2)(3,4), (1,3)(2,4), (1,4)(2,3)]
sage: K8 = G.sylow_subgroup(2)
sage: K8.order()
8
sage: K8.is_normal(G)
False
sage: K8.list()
[(), (3,4), (1,2), (1,2)(3,4), (1,3)(2,4), (1,3,2,4), (1,4,2,3), (1,4)(2,3)]
# Symmetries of the Cube
# Label vertices A..H (aka 1..8 to accomodate SAGE)
# Generated by flip (in x-direction), face rotations and corner rotations
# http://www.sagemath.org/doc/reference/sage/groups/perm_gps/permgroup.html
# http://www.sagemath.org/doc/reference/sage/groups/perm_gps/permgroup_element.h
tml
# http://www.sagemath.org/doc/constructions/groups.html
# For more heavy lifting use GAP, either directly or via SAGE
# http://www.sagemath.org/doc/reference/sage/interfaces/gap.html
# http://www.gap-system.org/
sage: f=[(1,4),(2,3),(5,8),(6,7)]
sage: rx = [(2,1,5,6),(3,4,8,7)]
sage: ry = [(2,1,4,3),(6,5,8,7)]
sage: rz = [(1,5,8,4),(2,6,7,3)]
sage: ra = [(4,5,2),(3,8,6)]
sage: rb = [(3,1,6),(4,5,7)]
sage: rc = [(2,7,4),(1,6,8)]
sage: rd = [(3,8,1),(2,7,5)]
sage: Scube = PermutationGroup([f,rx,ry,rz,ra,rb,rc,rd])
sage: Scube.order()
48
sage: F = Scube(f)
sage: Rx = Scube(rx)
sage: Ry = Scube(ry)
sage: Rz = Scube(rz)
sage: RA = Scube(ra)
sage: RB = Scube(rb)
sage: RC = Scube(rc)
sage: RD = Scube(rd)
sage: RA
(2,4,5)(3,8,6)
sage: F*RA*F
(1,8,3)(2,5,7)
# So conjugate RA with F and get RF = RD^(-1)
sage: Scube.centralizer(RA)
Permutation Group with generators [(2,4,5)(3,8,6), (1,7)(2,3,4,8,5,6)]
sage: Scube.centralizer(RA).order()
6
# So the conjugacy class of RA has o(Scube)/6 = 48/6 = 8 elements
sage: Scube.center()
Permutation Group with generators [(1,7)(2,8)(3,5)(4,6)]
# The center is the central inversion (order 2)
sage: Scube.conjugacy_classes_representatives()
[(),
(3,6)(4,5),
(2,4,5)(3,8,6),
(1,2)(3,4)(5,6)(7,8),
(1,2)(3,5)(4,6)(7,8),
(1,2,3,4)(5,6,7,8),
(1,2,3,7,8,5)(4,6),
(1,3)(2,4)(5,7)(6,8),
(1,3,8,6)(2,4,7,5),
(1,7)(2,8)(3,5)(4,6)]
http://www.sagemath.org/doc/constructions/rep_theory.html]
Consider the symmetric group on three symbols, which can also be viewed as
the group of symmetries of an equilateral triangle or the abstract dihedral group
D6 = 〈r,f | r3, f2, f-1rf = r2〉. If the triangle has vertices A,B,C,
this group is generated by a rotation r=(ABC) and a flip f=(BC).
Arbitrarily ordering the elements of the
group as (1, r, r2, f, fr=r2f, fr2=rf) and
expressing the group structure in terms of multiplication on the left, we
have the regular representation:
sage: t = matrix([[0,0,1,0,0,0],[1,0,0,0,0,0],[0,1,0,0,0,0],[0,0,0,0,1,0],[0,0,0,0,0,1],[0,0,0,1,0,0]])
sage: f = matrix([[0,0,0,1,0,0],[0,0,0,0,1,0],[0,0,0,0,0,1],[1,0,0,0,0,0],[0,1,0
,0,0,0],[0,0,1,0,0,0]])
sage: f*r
[0 0 0 0 1 0]
[0 0 0 0 0 1]
[0 0 0 1 0 0]
[0 0 1 0 0 0]
[1 0 0 0 0 0]
[0 1 0 0 0 0]
sage: f.eigenvalues()
[1, 1, 1, -1, -1, -1]
sage: r.eigenvalues()
[1, 1, -0.5000 + 0.8660*I, -0.5000 - 0.8660*I, -0.5000 + 0.8660*I, -0.5000 - 0.8660*I]
sage: f.eigenvectors_right()
[(1, [
(1, 0, 0, 1, 0, 0),
(0, 1, 0, 0, 1, 0),
(0, 0, 1, 0, 0, 1)
], 3),
(-1, [
(1, 0, 0, -1, 0, 0),
(0, 1, 0, 0, -1, 0),
(0, 0, 1, 0, 0, -1)
], 3)]
sage: r.eigenvectors_right()
[(1, [
(1, 1, 1, 0, 0, 0),
(0, 0, 0, 1, 1, 1)
], 2),
(-0.5000 + 0.8660*I,
[(1, -0.5000 - 0.8660*I, -0.5000 + 0.8660*I, 0, 0, 0),
(0, 0, 0, 1, -0.5000 + 0.8660*I, -0.5000 - 0.8660*I)],
2),
(-0.5000 - 0.8660*I,
[(1, -0.5000 + 0.8660*I, -0.5000 - 0.8660*I, 0, 0, 0),
(0, 0, 0, 1, -0.5000 - 0.8660*I, -0.5000 + 0.8660*I)],
2)]
We now look for subspaces which are stable under both matrix actions, in other words spaces which, for each generating matrix, are spanned by a set of eigenvectors. These correspond to subrepresentations (aka submodules), possibly irreducible if we do this carefully.
Note that both matrices have the vector (1,1,1,1,1,1) as an eigenvector, in the case of f with eigenvalue 1 and in the case of r also with eigenvalue 1. This corresponds to the irreducible augmentation representation (module), a degree 1 representation spanned by a symmetric sum of all the elements of the group.
Next we observe that both matrices have the vector (1,1,1,-1,-1,-1) as an eigenvector, with eigenvalue -1 for f and eigenvalue 1 for r. This corresponds to the one dimensional parity representation.
Finally, we have two representations, each of degree 2, which correspond to the complex eigenvalues of matrix r. The eigenvalues are the two primitive cube roots of 1 and the representations can be thought of as rotations of the triangle.
Note that there is no representation which is both irreducible and faithful for this group. By conjugating with these chosen eigenvectors we can reduce the matrices for f and r to block diagonal form, illustrating how this representation is a direct product of representations.