ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 22 May 2016 10:27:33 +0200Special Linear Grouphttps://ask.sagemath.org/question/33501/special-linear-group/Hello! I am having some trouble getting the list of matrices of the group SL of order 2.
When I do these calculations:
G=SL(2,GF(3))
print(list(G))
I get the list of elements of the special linear group or order 2 over the finite field of size 3.
However, when I try
G=SL(2,GF(4))
print(list(G))
the matrices appear with "z2" in them. I have noticed that this happens when the size of the field is not prime, but I don't know how to get past it.
Thank you in advance.Sun, 22 May 2016 00:44:14 +0200https://ask.sagemath.org/question/33501/special-linear-group/Answer by tmonteil for <p>Hello! I am having some trouble getting the list of matrices of the group SL of order 2.
When I do these calculations:
G=SL(2,GF(3))
print(list(G))
I get the list of elements of the special linear group or order 2 over the finite field of size 3.
However, when I try
G=SL(2,GF(4))
print(list(G))
the matrices appear with "z2" in them. I have noticed that this happens when the size of the field is not prime, but I don't know how to get past it.</p>
<p>Thank you in advance.</p>
https://ask.sagemath.org/question/33501/special-linear-group/?answer=33508#post-id-33508In a finite field with prime cardinality, every element can be expressed (by sum or products) by using only `1`, the unit of the field. In a finite field with non-prime cardinality, it is not possible anymore since `1` will only generate the smaller subfield of prime cardinality. So, you need another element (called a "generator" of the field) to generate the whole field. This is the `z2` you got:
sage: F = GF(4)
sage: F.gen()
z2
If you want to use `z2` in your computations, you should attribute it the Python name `z2`:
sage: z2
NameError: name 'z2' is not defined
sage: F.inject_variables()
Defining z2
sage: z2
z2
sage: z2^2
z2 + 1
sage: z2^3
1
Sun, 22 May 2016 10:27:33 +0200https://ask.sagemath.org/question/33501/special-linear-group/?answer=33508#post-id-33508