10.8 Matrix Groups

Module: sage.groups.matrix_gps.matrix_group

Author Log:

Generally, the instances of the class defined in this file is designed to represent matrix groups given by a (small) finite set of generating matrices.

Class: MatrixGroup

class MatrixGroup

A ValueError is raised if one of the generators is not invertible.

sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: G = MatrixGroup([MS.0])
Traceback (most recent call last):
...
ValueError: each generator must be an invertible matrix but one is not:
[1 0]
[0 0]
MatrixGroup( self, gensG)

Functions: base_ring,$  $ conjugacy_class_representatives,$  $ conjugacy_class_representatives_gap,$  $ degree,$  $ gen,$  $ gens,$  $ hom,$  $ is_finite,$  $ list,$  $ matrix_space,$  $ ngens,$  $ order,$  $ random

conjugacy_class_representatives( self)

Wraps GAP Representative+ConjugactClasses.

sage: F = GF(3); MS = MatrixSpace(F,2,2)
sage: gens = [MS([[1,0],[-1,1]]),MS([[1,1],[0,1]])]
sage: G = MatrixGroup(gens)
sage: G.conjugacy_class_representatives()
[[1 0]
[0 1], [0 1]
[2 1], [0 1]
[2 2], [0 2]
[1 1], [0 2]
[1 2], [0 1]
[2 0], [2 0]
[0 2]]

Author: David Joyner (1-2006)

conjugacy_class_representatives_gap( self)

Wraps GAP Representative+ConjugactClasses but returns a list of strings representing the GAP matrices which form a complete set of representatives of the conjugacy classes of the group.

       sage: F = GF(3); MS = MatrixSpace(F,2,2)
       sage: gens = [MS([[1,0],[-1,1]]),MS([[1,1],[0,1]])]
       sage: G = MatrixGroup(gens)
       sage: G.conjugacy_class_representatives_gap()
['[ [ Z(3)^0, 0*Z(3) ], [ 0*Z(3), Z(3)^0 ] ]',
 '[ [ 0*Z(3), Z(3)^0 ], [ Z(3), Z(3)^0 ] ]',
       '[ [ 0*Z(3), Z(3)^0 ], [ Z(3), Z(3) ] ]',
       '[ [ 0*Z(3), Z(3) ], [ Z(3)^0, Z(3)^0 ] ]',
	    '[ [ 0*Z(3), Z(3) ], [ Z(3)^0, Z(3) ] ]',
	    '[ [ 0*Z(3), Z(3)^0 ], [ Z(3), 0*Z(3) ] ]',
 '[ [ Z(3), 0*Z(3) ], [ 0*Z(3), Z(3) ] ]']

Author: David Joyner (1-2006)

gens( self)

       sage: F = GF(3); MS = MatrixSpace(F,2,2)
       sage: gens = [MS([[1,0],[0,1]]),MS([[1,1],[0,1]])]
sage: G = MatrixGroup(gens)
       sage: gens[0] in G
       False
       sage: gens = G.gens()
       sage: gens[0] in G
       True
       sage: gens = [MS([[1,0],[0,1]]),MS([[1,1],[0,1]])]

sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: G = MatrixGroup([MS(1), MS([1,2,3,4])])
sage: G
Matrix group over Finite Field of size 5 with 2 generators:
 [[[1, 0], [0, 1]], [[1, 2], [3, 4]]]
sage: G.gens()
[[1 0]
[0 1], [1 2]
[3 4]]

is_finite( self)

sage: G = GL(2,GF(3))
sage: G.is_finite()
True

list( self)

Return list of all elements of this group.

       sage: F = GF(3); MS = MatrixSpace(F,2,2)
       sage: gens = [MS([[1,0],[0,1]]),MS([[1,1],[0,1]])]
sage: G = MatrixGroup(gens)
sage: G.order()
3
sage: G.list()
       [[1 0]
       [0 1], [1 1]
       [0 1], [1 2]
       [0 1]]
       sage: G.list()[0] in G
True

matrix_space( self)

sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: G = MatrixGroup([MS(1), MS([1,2,3,4])])
sage: G.matrix_space()
Full MatrixSpace of 2 by 2 dense matrices over Finite Field of size 5

order( self)

sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[0,1]])]
sage: G = MatrixGroup(gens)
sage: G.order()
480

random( self)

Returns a random matrix from the matrix group. Wraps GAP's Random function. Is very slow for large groups.

       sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[0,1]])]
sage: G = MatrixGroup(gens)
sage: G.random()
       [2 4]
       [0 1]
       sage: G.random()
       [3 1]
       [2 2]
       sage: G.random()
       [3 2]
       [4 2]

Special Functions: __call__,$  $ __contains__,$  $ __repr__,$  $ __str__,$  $ _gap_init_,$  $ _Hom_,$  $ _latex_

__call__( self, x)

sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: G = MatrixGroup([MS(1), MS([1,2,3,4])])
sage: G.matrix_space()
Full MatrixSpace of 2 by 2 dense matrices over Finite Field of size 5
sage: G(1)
[1 0]
[0 1]

__contains__( self, x)

Return True if $ x$ is an element of this abelian group.

sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[0,1]])]
sage: G = MatrixGroup(gens)
sage: g = G.random()
sage: g.parent()
Matrix group over Finite Field of size 5 with 2 generators:
 [[[1, 2], [4, 1]], [[1, 1], [0, 1]]]
sage: g in G
True

__repr__( self)

sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[0,1]])]
sage: G = MatrixGroup(gens)
sage: G
Matrix group over Finite Field of size 5 with 2 generators:
 [[[1, 2], [4, 1]], [[1, 1], [0, 1]]]

__str__( self)

print method

sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[0,1]])]
sage: G = MatrixGroup(gens)
sage: print G
MatrixGroup( [[[1, 2], [4, 1]], [[1, 1], [0, 1]]] )

_gap_init_( self)

Returns the string representation of the corresponding GAP command.

sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[0,1]])]
sage: G = MatrixGroup(gens)
sage: G._gap_init_()
'Group([ [ [ Z(5)^0, Z(5) ], [ Z(5)^2, Z(5)^0 ] ],   
         [ [ Z(5)^0, Z(5)^0 ], [ 0*Z(5), Z(5)^0 ] ] ])'

_latex_( self)

            sage: F = GF(5); MS = MatrixSpace(F,2,2)
            sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[0,1]])]
            sage: G = MatrixGroup(gens)
            sage: G._latex_()
            '\left\langle \left(\begin{array}{rr}
1\&2\\
4\&1
\end{array}\right), \left(\begin{array}{rr}
1\&1\\
0\&1
\end{array}\right) \right\rangle'

Type view(G._latex_()) to view this in xdvi (assuming xdvi and latex are installed).

See About this document... for information on suggesting changes.