[GAP Forum] Creating block matrices
Alexander Hulpke
ahulpke at gmail.com
Mon Jan 17 15:57:06 GMT 2011
Dear Forum,
In addition to the code given by Dima Pasechnik, the following might come useful for similar constructs:
> Hi all, I was wondering if there's an efficient way to create the subgroup
> of GL(2n, q) consisting of block matrices of the form:
> [A 0
> B C]
> where A and C are in GL(n,q) and B is in M(n,q) (i.e. B is an arbitrary nxn
> matrix). Thanks for the help.
Clearly, if we can generate [A,0;0,1], [1,0;B,1] and [1,0;0,C] we get all. Furthermore it is an easy exercise to see that for B only the matrix with a single entry in position 1,1 will suffice, as A and C will generate the rest.
So lets first generate the two diagonal blocks from taking generators for A and C from generators of GL(n,q). For example for n=3 and q=5:
gap> n:=3;q:=5;
3
5
gap> G:=GL(n,q);
GL(3,5)
gap> gens:=[];
[ ]
gap> Ggens:=GeneratorsOfGroup(G);
[ [ [ Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, 0*Z(5) ], [ 0*Z(5), 0*Z(5), Z(5)^0 ] ],
[ [ Z(5)^2, 0*Z(5), Z(5)^0 ], [ Z(5)^2, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^2, 0*Z(5) ] ] ]
Now make generators of shape [A,0;0,1] by overwriting an identity matrix, using the peculiar syntax for iterated sublists:
gap> mat:=MutableIdentityMat(2*n,GF(q));
< mutable compressed matrix 6x6 over GF(5) >
gap> mat{[1..n]}{[1..n]}:=Ggens[1];
[ [ Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, 0*Z(5) ], [ 0*Z(5), 0*Z(5), Z(5)^0 ] ]
gap> Add(gens,mat);
gap> mat:=MutableIdentityMat(2*n,GF(q));
< mutable compressed matrix 6x6 over GF(5) >
gap> mat{[1..n]}{[1..n]}:=Ggens[2];
[ [ Z(5)^2, 0*Z(5), Z(5)^0 ], [ Z(5)^2, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^2, 0*Z(5) ] ]
gap> Display(mat); # just to see the shape
4 . 1 . . .
4 . . . . .
. 4 . . . .
. . . 1 . .
. . . . 1 .
. . . . . 1
gap> Add(gens,mat);
The same for C:
gap> mat:=MutableIdentityMat(2*n,GF(q));
< mutable compressed matrix 6x6 over GF(5) >
gap> mat{[n+1..2*n]}{[n+1..2*n]}:=Ggens[1];
[ [ Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, 0*Z(5) ], [ 0*Z(5), 0*Z(5), Z(5)^0 ] ]
gap> Add(gens,mat);
gap> mat:=MutableIdentityMat(2*n,GF(q));
< mutable compressed matrix 6x6 over GF(5) >
gap> mat{[n+1..2*n]}{[n+1..2*n]}:=Ggens[2];
[ [ Z(5)^2, 0*Z(5), Z(5)^0 ], [ Z(5)^2, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^2, 0*Z(5) ] ]
gap> Add(gens,mat);
Finally the one matrix for B:
gap> mat:=MutableIdentityMat(2*n,GF(q));
< mutable compressed matrix 6x6 over GF(5) >
gap> mat[n+1][1]:=One(GF(q));
Z(5)^0
gap> Add(gens,mat);
Now lets verify that we really got all:
gap> H:=Group(gens);
<matrix group with 5 generators>
gap> Size(H);
4324500000000000000
gap> Size(G)^2*q^(n*n);
4324500000000000000
Best wishes,
Alexander Hulpke
>
-- Colorado State University, Department of Mathematics,
Weber Building, 1874 Campus Delivery, Fort Collins, CO 80523-1874, USA
email: hulpke at math.colostate.edu, Phone: ++1-970-4914288
http://www.math.colostate.edu/~hulpke
More information about the Forum
mailing list