Abstract Algebra
Abstract Algebra
by Alec Mihailovs
Preface
This manual is intended to be used with Contemporary Abstract Algebra, by J. A.
Gallian, 5th ed., Houghton Mifflin (2002). It was inspired by Abstract Algebra with GAP
by J. G. Rainbolt and J. A. Gallian, Houghton Mifflin (2002). The latter manual is
available for free downloading from the book's web site and from the authors` websites. I
highly recommend, in addition to this Maple manual, solve exercises from both the
textbook and the GAP manual.
I thank Joseph A. Gallian for his comments and suggestions and my Beautiful and
Wonderful Wife, Bette, for proofreading.
An Introduction to Maple
Comparing to other Computer Algebra Systems, such as GAP, Mathematica, Matlab, or
MathCAD - Maple is the most user friendly and easy to use. It is available on many
platforms, including Windows, Mac, and some UNIXes. The latest information about it
can be found on http://www.maplesoft.com and http://www.mapleapps.com.
Keyboard Shortcuts
Writing this manual, I am using Maple 7 on Windows, so some things, such as keyboard
shortcuts, might be different if you are using other operating systems. The best way to get
familiar with Maple is to click Help and select New User's Tour (or click Alt+h and n).
Supposing that you have walked through that Tour, I will underline just some things we
will use often. One thing that might be annoying for some people is the absence of Copy
and Paste in the context menus appearing on the screen after right-clicking of the mouse.
Instead of it, one has to use either toolbar buttons for copying and pasting, or Ctrl+c for
copying and Ctrl+v for pasting. I recommend using Ctrl+c, Ctrl+v as well as Ctrl+x for
cutting, Ctrl+z for undoing, Ctrl+a for selecting all, Ctrl+p for printing, Ctrl+s for saving
etc. Falling into this habit saves a lot of time.
Useful keyboard shortcuts for typing are Ctrl+t - starts the text mode, Ctrl+r - insert
nonexecutable formula at the cursor while you are in the text mode - you have to click
Ctrl+t after finishing it to return to the text mode. Ctrl+b, Ctrl+i, and Ctrl+u switch to
bold, italics, or underlined scripts. If one is in the Maple Input mode, Shift+Enter allows
one to go to the next line without the executing of the command. Ctrl+k inserts a new
execution group before the cursor, and Ctrl+j - after. Maple uses functional keys
effectively, too. F3 splits execution groups, F4 joins them, Shift+F3 splits sections, and
Shift+F4 joins them. To get help on any command, plot, for example, one can either
select the word, or just put a cursor somewhere inside it, or in front of it and hit the F1
key. Also, for getting a topic search window, one can type Alt+h, then t. For the full text
search, Alt+h, then f.
See other keyboard shortcuts for Windows here. In particular, the Windows key allows
easy access to many Windows features. Some of my favorites are Win+e - starts
Windows Explorer, Win +d - shows the desktop. Surfing the Internet, one of the most
useful keys is the Escape key - it stops animated gifs blinking :-) Backspace as well as
Alt+(left arrow) returns you to the previous page in the Internet Explorer; Alt+(right
arrow) forwards you to the next page (if you returned back before that). Up and down
arrows allow one to scroll through the text, both in Maple and in IE.
prints 2 1 . If you hit Enter without a colon, or a semicolon, you will get an error.
Typing
> plot(x^2,x=-1..1):
won't produce any visible result, because the command was ended with a colon. To see
the picture, we can either change the colon to a semicolon, or type
> %;
which gives us the plot of the parabola. % in this example means the latest Maple output.
200
If we want to get 2 1 again, we should use %%%, because it is the 3rd output from
the end:
> %%%+1;
As we just saw, outputs after a colon were not visible, but had been done by Maple and
should be counted to obtain a correct number of the percent signs.
Comments
Generally, the text mode can be used for comments. In the Maple Input mode, # plays the
role similar to // in C++, or % in LaTeX - it skips everything after that sign in the line
where it is located.
Exercises
1. What is the shortcut Ctrl+f for?
2. Is the find/replace in Maple case sensitive, i.e. gives different results for maple and
Maple?
3. How, writing a Maple procedure, one goes to the next line without executing the
commands?
4-7. Click Ctrl+n, Ctrl+t. In the list of styles
on the far left
of the context bar, click Title. Type "Homework 1" (without quotes). Hit Enter.
Change the font in the list of fonts
to anything you like. Type your name and Ctrl+j, Ctrl+. , and click the
up-arrow key after that. Type "Exercise 4." (without quotes) and click the downarrow key. Type 100!; (including a semicolon) and hit Enter. Type ifactor(%); and hit
Enter. Click Shift+F3, starting a new exercise, Exercise 5, and add, multiply, subtract
and divide a few numbers. Click Shift+F3 again starting Exercise 6 and plot the graph
1
of x sin from x = -1 to x = 1. Click Shift+F3 again starting Exercise 7. Type
x
with(plots): after the Maple prompt and hit Enter. After the Maple prompt, type
animate3d and click F1. Select the last example on the help page and click Ctrl+c.
Click Ctrl+F4. Select animate3d and click Ctrl+v. Hit Enter. Click on the picture,
then on the play button in the toolbar. Use the mouse to rotate the surface. Find the
best-looking position and click the play button again. Click Ctrl+s, choose an
appropriate place, give the worksheet a name you like and save it. Click Ctrl+p and
print it. Click Alt+f, then e, then h, and save the worksheet as an html file. Click
Win+e to start Windows Explorer, find the html file you just saved and click on it to
see it in the browser. Enjoy.
0. Preliminaries
Properties of Integers
It is easy to factor integers in Maple:
> ifactor(2^57-1);
( 7 ) ( 1212847 ) ( 524287 ) ( 32377 )
The greatest common divisor and the least common multiple can be evaluated in Maple
as follows:
> igcd(715,1001);
> ilcm(843,216,51);
143
1031832
Modular Arithmetic
Maple can do modular arithmetic, too:
> 345 mod 7;
It can be used for checking the validity of money order numbers, UPS pickup record
numbers, ISBN numbers etc.
> isMoneyOrder:= n -> n<10^11 and trunc(n/10) mod 9 = n mod
10:
This function first checks if the number contains not more than 11 digits and then if the
number formed by the first 10 digits is congruent to the last digit, i.e. check digit, modulo
9.
> isMoneyOrder(39539881642);
true
> isMoneyOrder(39559881642);
false
The similar construction works for air ticket numbers and UPS pickup records numbers,
just by replacing modulo 9 to modulo 7:
> isUPS:= n -> n<10^10 and trunc(n/10) mod 7 = n mod 10:
> isUPS(7681139992);
true
> isUPS(1213731473673);
false
> with(LinearAlgebra):
> isUPC:= n -> evalb(Vector(12,convert(n,base,10)) .
Vector([1,3,1,3,1,3,1,3,1,3,1,3]) mod 10 = 0):
> isUPC(021000658978);
true
> isUPC(012000658978);
false
true
> isISBN("6x");
true
As you can see, ISBN numbers without an X can be entered either as integers, or as
strings, inside quotes. ISBN numbers with an X at the end must be entered inside quotes,
because it is not one of the data formats that Maple recognizes.
Mathematical Induction
Maple can evaluate many sums:
> sum(i,i=1..n);
> simplify(%);
1
1
1
( n + 1 )2 n
2
2
2
1 2 1
n + n
2
2
> simplify(sum(i^10,i=1..n));
1 11 1 10 5 9
1
5
n + n + n n7 n3 + n5 + n
11
2
6
2
66
> sort(%);
1 11 1 10 5 9
1
5
n + n + n n7 + n5 n3 + n
11
2
6
2
66
Exercises
100
1. Factor 3 + 1 .
2. Find the greatest common divisor and the least common multiple of 670592745 ,
83810205 , 113351790 , and 695529645 .
3. Find integer solutions of the equation 42 x 47 y = 1 .
4. Find the last digit of the ISBN number starting from 1-894511-01.
5. Find the formula for the sum of 9th powers of integers from 1 to n.
6. Find the formula for the elements of the sequence 3, 17, 81, 255, 623, 1293, ... and
find the next 4 elements of the sequence.
1. Introduction to Groups
Cyclic and Dihedral Groups
In this section we will study two series of groups, cyclic and dihedral, represented as
rotations and symmetries of regular polygons. It is convenient to enumerate all the
and so on, ..., vertex n to 1, so it can be denoted as [2, 3, ..., n, 1], which can be
represented in Maple as [$2..n,1]. The identity (i.e. no change) will be represented as [1,
2, ..., n], or [$1..n] in Maple notation. See Maple help item on "dollar", explaining that
notation. Now we can define cyclic and dihedral groups as follows:
> cyclic:=n->[seq([$i..n,$1..i-1],i=1..n)]:
> dihedral:=n->[op(cyclic(n)),seq([n+1-j$j=i..n,n+1j$j=1..i-1],i=1..n)]:
Cyclic groups are defined for all positive integers n, but dihedral groups are defined here
only for n not less than 3:
> dihedral(2);
[ [ 1, 2 ], [ 2, 1 ], [ 2, 1 ], [ 1, 2 ] ]
Here are correctly defined groups:
> cyclic(3);
[ [ 1, 2, 3 ], [ 2, 3, 1 ], [ 3, 1, 2 ] ]
> dihedral(4);
[ [ 1, 2, 3, 4 ], [ 2, 3, 4, 1 ], [ 3, 4, 1, 2 ], [ 4, 1, 2, 3 ], [ 4, 3, 2, 1 ], [ 3, 2, 1, 4 ], [ 2, 1, 4, 3 ],
[ 1, 4, 3, 2 ] ]
In this notation, the last element of D4 transfers vertex 1 to itself, vertex 2 to the position
of vertex 4, vertex 3 to itself, and vertex 4 to the position of vertex 2, so it is the
reflection across the diagonal connecting 1 and 3, see the picture below. Permutation
notation introduced above, is rather long. To make notation easier, we will denote
elements just by their ordinal numbers in the lists of the group elements, so the identity
will always be the number 1, and the last element of D4 will be 8.
In this new notation, to find the inverse elements, we can use the following procedure:
> inv:=proc(a,g) local i,v,b,k; k:=nops(g[a]); b:=[0$k]; for
i to k do b[g[a][i]]:=i od; member(b,g,'v'); v end:
For example,
> inv(5,cyclic(12));
9
> inv(5,dihedral(4));
ngons1:=seq(seq(ngon(10*j1,-4*j2),j1=1..k),j2=1..r);
ngons2:=seq(seq(ngon(10*j1+4.5,-4*j2),j1=1..k),j2=1..r);
p:=polygonplot({ngons1,ngons2},axes=NONE,scaling=CONSTRAINE
D,color=aquamarine):
ar:=arrow([seq(seq([[10*j1+1.6,4*j2],[1.2,0]],j1=1..k),j2=1..r)],shape=arrow,color=blue):
ngonlabels:=(a,b,l)->seq([ a+1.4*cos(2*Pi*i/n),
b+1.4*sin(2*Pi*i/n),l[i+1] ], i = 0..n-1):
text1:=textplot([seq(seq(ngonlabels(10*j1,4*j2,[$1..n]),j1=1..k),j2=1..r)],color=red):
text2:=textplot([seq(seq(ngonlabels(10*j1+4.5,4*j2,g[inv(m-1+j1+k*(j21),g)]),j1=1..k),j2=1..r)],color=red):
textar:=textplot([seq(seq([10*j1+2.2,-4*j2+.5,m-1+j1+k*(j21)],j1=1..k),j2=1..r)],color=blue):
display(p,ar,text1,text2,textar) end:
Here is the list of elements of D4 :
> Grid(dihedral(4),1,2,4);
Warning, the name changecoords has been redefined
Also, we can use this procedure to display only one element. For example, 11th element
in D20 :
> Grid(dihedral(20),11,1,1);
12
200
Notice, that all elements of cyclic groups are rotations. The first n elements of
dihedral(n) are rotations, the other n are reflections.
To multiply elements, we can use the following procedure:
> mult:=proc(a,b,g) local i,v;
member([seq(g[a][g[b][i]],i=1..nops(g[a]))],g,'v');v end:
For example,
> mult(3,7,cyclic(12));
9
> mult(3,7,dihedral(4));
> mult(7,3,dihedral(4));
5
5
Cayley Tables
The following procedure displays the Cayley table of a group:
> cayley:=g->Matrix(nops(g),(i,j)->mult(i,j,g)):
For example,
> cayley(dihedral(4));
1 2 3 4 5 6 7 8
2 3 4 1 8 5 6 7
3 4 1 2 7 8 5 6
4 1 2 3 6 7 8 5
5 6 7 8 1 2 3 4
6 7 8 5 4 1 2 3
7
8
5
6
3
4
1
2
8 5 6 7 2 3 4 1
It is easy to see that the product of two reflections (i.e. numbers from 5 to 8) is a rotation,
and the product of a reflection and a rotation is a rotation. Another evident thing is that
reflections are inverse to themselves. Notice that the matrix is not symmetric because
group D4 is not Abelian. The following procedure is checking whether a group is
Abelian:
> isAbelian:=g->type(cayley(g),'Matrix'(symmetric)):
> isAbelian(dihedral(4));
false
For cyclic groups Cayley tables are very symmetric:
> cayley(cyclic(12));
12 x 12 Matrix
2
3 4
1
2
3
4 5
4
5 6
3
4
5
6 7
5
6
7 8
6
7
8 9
7
8
9 10
9 10 11
8
9 10 11 12
10 11 12
1
11 12
1 2
12
1
2 3
5
6
7
8
9
10
11
12
1
2
3
4
6
7
8
9
10
11
12
1
2
3
4
5
7
8
9
10
11
12
1
2
3
4
5
6
8
9 10 11
9 10 11 12
10 11 12
1
11 12
1 2
12
1
2 3
1
2
3 4
2
3
4 5
3
4
5 6
4
5
6 7
5
6
7 8
6
7
8 9
7
8
9 10
12
2
3
6
7
10
11
Operations
If we need to do a lot of calculations in some specific group, D4 , for instance, we can
define special multiplication and inverse element operations for it:
> `&*`:=(a,b)->mult(a,b,Group):
Before using it, we should specify the group:
> Group:=dihedral(4):
> 3&*4;
2
Similarly for the inverse element,
> `&-`:=a->inv(a,Group):
> &-2;
> 2&*5&*&-2;
4
7
One has to be very careful with that though, since the answers depend on the group, and
for calculations in other groups we should redefine the Group.
> Group:=cyclic(12):
> 3&*4;
6
> 2&*5&*&-2;
5
Exercises
2. Groups
Groups U(n)
Here is the definition of groups U( n ) formed by relatively prime with n integers mod n.
I used the name un for them since U is reserved in Maple for Chebyshev polynomials.
> un:=n->select(m->evalb(igcd(m,n)=1),[$1..n]):
> un(12);
[ 1, 5, 7, 11 ]
> for N to 100 do T[N]:=nops(un(N)) od:
Here are the numbers of elements of groups U( n ) for n from 1 to 100, written so that
78=24 means that the group U( 78 ) has 24 elements.
> op(op(T));
[ 1 = 1, 2 = 1, 3 = 2, 4 = 2, 5 = 4, 6 = 2, 7 = 6, 8 = 4, 9 = 6, 10 = 4, 11 = 10, 12 = 4, 13 = 12,
14 = 6, 15 = 8, 16 = 8, 17 = 16, 18 = 6, 19 = 18, 20 = 8, 21 = 12, 22 = 10, 23 = 22,
24 = 8, 25 = 20, 26 = 12, 27 = 18, 28 = 12, 29 = 28, 30 = 8, 31 = 30, 32 = 16, 33 = 20,
34 = 16, 35 = 24, 36 = 12, 37 = 36, 38 = 18, 39 = 24, 40 = 16, 41 = 40, 42 = 12,
43 = 42, 44 = 20, 45 = 24, 46 = 22, 47 = 46, 48 = 16, 49 = 42, 50 = 20, 51 = 32,
52 = 24, 53 = 52, 54 = 18, 55 = 40, 56 = 24, 57 = 36, 58 = 28, 59 = 58, 60 = 16,
61 = 60, 62 = 30, 63 = 36, 64 = 32, 65 = 48, 66 = 20, 67 = 66, 68 = 32, 69 = 44,
70 = 24, 71 = 70, 72 = 24, 73 = 72, 74 = 36, 75 = 40, 76 = 36, 77 = 60, 78 = 24,
79 = 78, 80 = 32, 81 = 54, 82 = 40, 83 = 82, 84 = 24, 85 = 64, 86 = 42, 87 = 56,
88 = 40, 89 = 88, 90 = 24, 91 = 72, 92 = 44, 93 = 60, 94 = 46, 95 = 72, 96 = 32,
97 = 96, 98 = 42, 99 = 60, 100 = 40 ]
The number theory package has a built in function phi for these numbers:
> with(numtheory):
Warning, the protected name order has been redefined and unprotected
> phi(78);
24
Cayley tables for groups U( n ) can be found using the following command:
> CayleyU:=n->Matrix(nops(un(n)),(i,j)->un(n)[i]*un(n)[j]
mod n):
> CayleyU(42);
5 11 13 17 19 23 25 29 31 37 41
1
5 25 13 23
1 11 31 41 19 29 17 37
11 13 37 17 19 41
1 23 25
5 29 31
13 23 17
1 11 37
5 31 41 25 19 29
1 19 11 37 29 13
5 31 23 41 25
17
5
1 31 23
19 11 41 37 29 25 17 13
1 5 13 17 25 29 37 41 11 19
23 31
25 41 23 31
5 13 29 37 11 19
1 17
29 19 25 41 31
5 37 11
1 17 23 13
5 25 23
1 41 19 17 37 13 11
31 29
37 17 29 19 41 31 11
1 23 13 25
5
41 37 31 29 25 23 19 17 13 11
5
1
To find inverse elements of groups U( n ) one can use the following procedure:
> invU:=proc(a,n) local v; igcdex(a,n,'v'); v mod n end:
> invU(23,42);
11
3 4
> B:=Inverse(A) mod 5;
> A.B;
> A^(-1);
3
B :=
4
11 5
25 11
1
0
-2
3
-1
2
Maple operates faster with lists than with matrices or Matrices. That's why it is better to
define matrix groups using lists instead of Matrices. Groups GL( 2, Zn ) and SL( 2, Zn )
can be defined as follows:
> gl2:=n->select(A->evalb(igcd(A[1,1]*A[2,2]A[1,2]*A[2,1],n)=1),
[seq(seq(seq(seq([[j,i],[l,k]],l=0..n-1),k=0..n-1),j=0..n1),i=0..n-1)]):
> sl2:=n->select(A->evalb(A[1,1]*A[2,2]-A[1,2]*A[2,1] mod
n=1),
[seq(seq(seq(seq([[j,i],[l,k]],l=0..n-1),k=0..n-1),j=0..n1),i=0..n-1)]):
Here are the numbers of elements of some of them:
> for N from 2 to 6 do nops(sl2(N)) od;
6
24
48
120
144
1 1
,
1 1
1 1
,
0 0
3
4
For example,
> matrix(mm([[1,2],[3,4]],[[5,6],[7,8]],11));
8 0
10 6
Inverse elements also can be determined by a direct calculation. In SL(n) it is especially
simple:
> invSL:=(A,n)->[[A[2,2],-A[1,2] mod n],[-A[2,1] mod n,
A[1,1]]]:
> invGL:=proc(A,n) local d; d:=invU(A[1,1]*A[2,2]A[1,2]*A[2,1],n);
[[A[2,2]*d mod n,-A[1,2]*d mod n],[-A[2,1]*d mod n,
A[1,1]*d mod n]] end:
For example,
> matrix(invSL([[3,4],[5,7]],20));
7 16
15 3
> matrix(invGL([[1,2],[3,4]],25));
23 1
14 12
Note.
We need to include mm, invSL, and invGL inside the matrix(), if we want to see the
output as a matrix. Otherwise the output would look as a list of matrix rows. To apply the
matrix() to every element of a set S, we need to use the command map(matrix, S);.
Group Definition
We'll define a group G in a standard way, as a 2-element list containing a set or a list
G[1] with an associative binary operation G[2] having an identity and inverses for all
elements. To do that, we need to define a few procedures.
The following procedure is checking if the rows of the Cayley table are permutations of
the group elements:
> isCP:=proc(g,m) local i,j;
i:=1; while (i<=nops(g) and
{seq(m(g[i],g[j]),j=1..nops(g))}={op(g)}) do i:=i+1 od;
evalb(i=nops(g)+1) end:
The following procedure is checking associativity:
> isAssociative:=proc(g,m) local i,j,k;
i:=1; j:=1; k:=1; while(i<=nops(g) and
m(m(g[i],g[j]),g[k])=m(g[i],m(g[j],g[k]))) do if k=nops(g)
then if j=nops(g) then i:=i+1; j:=1; k:= 1 else j:=j+1 fi
else k:=k+1 fi od; evalb(i=nops(g)+1) end:
The following example shows that these two procedures are not enough to define a
group.
Example 1.
Let g be an arbitrary set containing more than 1 element, and m(a,b) = b for all pairs
2 3 4 5 6 7
3 4 5 6 7 8
4 5 6 7 8 9
5 6 7 8 9 0
6 7 8 9 0 1
7 8 9 0 1 2
8 9 0 1 2 3
9 0 1 2 3 4
mod 10);
6 7 8 9
7 8 9 0
8 9 0 1
9 0 1 2
0 1 2 3
1 2 3 4
2 3 4 5
3 4 5 6
4 5 6 7
5 6 7 8
We can check if the group is Abelian by checking if the Cayley table is symmetric:
> isAbelianGroup:=(g,m)>type(cayleyTable(g,m),'Matrix'(symmetric)):
For example,
> isAbelianGroup([$0..9],(a,b)->a+b mod 10);
true
> isAbelianGroup(sl2(2),(a,b)->mm(a,b,2));
false
Redefining of Groups
If we knew the group identity and the inverses, we can save time in many calculations.
That's why it is convenient to add the identity and the procedure finding the inverse
elements to the group definition. We define an extended group as a list G containing four
elements, a set G[1], a binary operation (multiplication) G[2], the identity G[3], and the
unary operation (inverse) G[4]:
> `type/extendedGroup`:=proc(g) local i;
if type(g,list) and nops(g)=4 and type([g[1],g[2]],group)
and g[2](g[1][1],g[3])=g[1][1]
then i:=1; while not i=nops(g[1])+1 and
g[2](g[1][i],g[4](g[1][i]))=g[3] do i:=i+1 od;
evalb(i=nops(g[1])+1) else false fi end:
It might be annoying to enter the same operations repeatedly many times for the groups
we know. So we can redefine the groups, including the operations, the identities, and the
inverses in their definitions. I'll do that in the order they have appeared in this manual,
starting their names with capital letters:
> Cyclic:=n->[[$1..n], (a,b)->`if`(a+b-1<=n,a+b-1,(a+b-1)n), 1, a->`if`(a=1,1,n-a+2)]:
> Dihedral:=n->[[$1..2*n], (a,b)->mult(a,b,dihedral(n)), 1,
a->`if`(a=1 or a>n,a,n-a+2)]:
> Un:=n->[un(n),(a,b)->a*b mod n, 1, a->invU(a,n)]:
> GL2:=n->[gl2(n),(a,b)->mm(a,b,n),[[1,0],[0,1]],a>invGL(a,n)]:
> SL2:=n->[sl2(n),(a,b)->mm(a,b,n),[[1,0],[0,1]],a>invSL(a,n)]:
> Z:=n->[[$0..n-1],(a,b)->a+b mod n, 0, a->-a mod n]:
Now we can test the correctness of the new definitions:
> type(Cyclic(10),extendedGroup);
true
> type(Dihedral(5),extendedGroup);
true
> type(Un(12),extendedGroup);
> type(GL2(2),extendedGroup);
> type(SL2(3),extendedGroup);
> type(Z(20),extendedGroup);
true
true
true
true
1
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
0
1
0
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
1
0
1
0
1
1
1
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
0
1
0
1
1
0
1
1
0
0
1
0
0
1
1
0
1
0
1
1
1
1
0
1
1
0
1
0
1
1
1
1
The same as we did before, we can check if the group is Abelian by checking if the
Cayley table is symmetric:
> IsAbelian:=g->isAbelianGroup(g[1],g[2]):
For example,
> IsAbelian(Z(100));
true
> IsAbelian(Un(15));
> IsAbelian(GL2(3));
true
false
Every group G, defined as a 2-element list, containing a set G[1] and a binary operation
G[2], can be easily converted to the extended group by adding the identity and inverse
element:
> `convert/extendedGroup`:=proc(g) local a, i;
i:=a->Inv(a,(op(g))); [op(g),Id(op(g)),i] end:
For example,
> convert([[$0..10],(a,b)->a+b mod 11],extendedGroup):
> type(%,extendedGroup);
true
Exercises
1. Find the numbers of elements of groups U(5), U(25), U(125), and U(625).
2. Display the Cayley table of U(40).
3. Find the inverse of 151 in U(212).
137 253
4. Find the inverse matrix of
mod 321.
217 19
23 45
75 11
5. Find the product of
and
mod 125.
56 78
23 51
[ 0, 10, 20, 5, 15 ]
Another example,
> map(matrix,Cycle([[1,2],[3,4]],GL2(5)));
1 0, 1 2, 2 0, 2 4, 4 0, 4 3, 3 0, 3
0 1 3 4 0 2 1 3 0 4 2 1 0 3 4
The orders of elements can be found as the orders of the cyclic subgroups generated by
them:
> Ord:=proc(c,g) local a,n;
a:=c; n:=1;
while not a=g[3] do n:=n+1; a:=g[2](a,c) od; n end:
> Ord([[1,2],[3,4]],SL2(5));
> Ord([[2,3],[4,5]],GL2(11));
> Ord(715,Z(1001));
60
7
[ 1, 6 ]
> map(matrix,Center(GL2(3)));
1 0, 2
0 1 0
Note.
Why do we need two commands for a centralizer - CentralizerE and CentralizerS?
Why can't we use one command, Centralizer, for both cases? The problem is that some
elements of a group can be equal to some sets of other elements. For example, a group
can contain elements 1, 2, and {1,2}.
What would the Centralizer({1,2}) be in that case? The centralizer of the element {1,2},
CentralizerE({1,2}), or the centralizer of the subset {1,2}, CentralizerS({1,2})? Since
we can't distinguish between these two cases by checking the type of an argument, we
need two different commands for that.
A Subgroup Test
According to Theorem 3.3 on p. 62 of Dr. Gallian's text, to test whether a finite subset H
is a subgroup of G, it is enough to check if H is a subset of G and it is closed under the
group operation of G. So we can use isCP for that:
> isSubgroup:=(h,G)->{op(h)} subset {op(G[1])} and
isCP(h,G[2]):
For example,
> isSubgroup(Cycle(8,Z(33)),Z(33));
true
> isSubgroup(Cycle([[1,2],[2,0]],GL2(5)),SL2(5));
true
Certainly, cyclic subgroups are subgroups :-) as well as the center and centralizers:
> isSubgroup(CentralizerE(11,Dihedral(6)),Dihedral(6));
true
>
isSubgroup(CentralizerS({[[1,2],[3,4]],[[1,3],[2,4]]},GL2(5
)),GL2(5));
true
> isSubgroup(Center(SL2(4)),SL2(4));
true
Finally, an opposite example:
> isSubgroup(Z(5)[1],Z(10));
false
Exercises
1. Find the order of 7 in U(100) and U(11).
2. Find the order of 6 in Z7 , Z8 , Z9 , Z10 , Z11 , and Z12 .
3. Find the cyclic subgroup of U(145) generated by 19.
2
4. Find the cyclic subgroup of GL(2, Z6 ) generated by
1
5
.
2
5. Find the order of cyclic subgroups of SL(2, Z11 ) and SL(2, Z12 ) generated by
1 2 .
3 7
6. Find the centralizer of 3 in the dihedral group D6 .
1
7. Find the centralizer of {
1
3 1
,
2 3
2
} in GL(2, Z5 ).
4
4. Cyclic Groups
Primitive Roots
Group Zn has ( n ) generators. To find them, we can use procedure un. For example,
> un(20);
The generators of U(n) if they exist, are called primitive roots mod n. One of them can be
found using the function primroot from the numtheory package that we already loaded
in section 2. For example,
> primroot(43);
3
It fails when the group U(n) is not cyclic, so it doesn't have a generator. For example,
> primroot(45);
FAIL
To find all generators, we can use the following procedure:
> primroots:=n->{seq(primroot(n)^un(phi(n))[i] mod n,
i=1..phi(phi(n)))}:
For example,
> primroots(43);
{ 3, 5, 12, 18, 19, 20, 26, 28, 29, 30, 33, 34 }
> primroots(45);
{ FAIL }
Elements of Order d
Theorem 4.4 on p. 80 of Dr. Gallian's text tells us that if d is a positive divisor of n, then
there are ( d ) elements of order d in Zn . The following procedure lists all of them:
> nordlist:=(d,n)->`if`(type(n/d,integer),map(x->x*n/d mod
n,un(d)),[]):
For example, the list of elements of order 20 in Z100 :
> nordlist(20,100);
24
Try to find this sequence in Neil Sloane's On-Line Encyclopedia of Integer Sequences.
Certainly, for every specific group, one can write a program calculating the number of
elements of given order faster. For instance, for the elements of order 2 in GL(2, Zn ),
> ord2inGL2:=proc(n) local a,b,c,d,N; N:=0;
for a from 0 to n-1 do for b from 0 to n-1 do for c from 0
to n-1 do for d from 0 to n-1 do
if a^2+b*c mod n = 1 and b*(a+d) mod n = 0 and c*(a+d) mod
n = 0 and d^2+b*c mod n =1
then N:=N+1 fi od od od od; N-1 end:
The following procedure lists the elements of order d in an extended group G:
> Nordlist:=proc(d,g) local i, v; v:=[];
for i from 1 to nops(g[1]) do if Ord(g[1][i],g)=d then
4 0, 4 0, 0 1, 1 1, 2 1, 3 1, 4 1, 0 2, 1 2,
4 1 0 4 1 0 0 4 2 3 2 2 0 1 3 0 0 4
2 2, 3 2, 4 2, 0 3, 1 3, 2 3, 3 3, 4 3, 0 4,
1 3 1 2 0 1 2 0 0 4 4 3 4 2 0 1 4 0
1 4, 2 4, 3 4, 4 4
0 4 3 3 3 2 0 1
Subgroup Lattice of Zn
We have to load two packages for this section:
> with(plottools): with(networks):
Warning, the name arrow has been redefined
Warning, these names have been redefined: dodecahedron, icosahedron,
octahedron, tetrahedron
It looks like a cube, doesn't it? Even more after rotating the picture by 90 degrees:
> rotate(%,Pi/2);
> subZ(210);
8
16
32
Exercises.
1. Find which of the groups U(n) with n from 46 to 54 are cyclic, and find the
generators for them.
2. Find the number of elements of the order 10 in Z20 and list all of them.
3. Find the number of elements of the order 2 in U(24).
4. Find the number of elements of the order 12 in SL(2, Z6 ).
5. Find the number of elements of the order 2 in GL(2, Zn ) for n from 7 to 20.
6. List the elements of the order 3 in SL(2, Z3 ).
7. Draw subgroup lattices of Z8 , Z12 , Z60 and Z100 .
> cycleU(7,48);
[ 1, 7 ]
It must be the cyclic subgroup of Z120 generated by the least common multiple of 4, 6,
and 25 mod 120:
> Cycle(ilcm(4,6,25) mod 120, Z(120));
[ 0, 60 ]
Now, define the product of the extended groups using the following procedure:
> `&x`:=proc(g,h) local m,i;
m:=(a,b)->[g[2](a[1],b[1]),h[2](a[2],b[2])];
i:=a->[g[4](a[1]),h[4](a[2])];
[[seq(seq([g[1][i],h[1][j]],j=1..nops(h[1])),i=1..nops(g[1]
))],
m, [g[3],h[3]], i] end:
For example, the product of Z5 and Z7 :
> A:=Z(5) &x Z(7):
Check if it is an extended group:
> type(A, extendedGroup);
Find the order of it:
> nops(A[1]);
true
35
24
[ [ 0, 0 ], [ [ 1, 0 ], [ 0, 1 ] ] ]
It looks as if B equals the product of the first two groups multiplied by the third group.
Check if it is true:
> evalb( B[1] = ((Z(2) &x Z(2)) &x GL2(2))[1] );
true
Is a Group Cyclic?
The following procedure is checking whether an extended group G is cyclic:
> IsCyclic:=proc(g) local v;
v:={op(g[1])}; while not nops(v)=0 and not
Ord(v[1],g)=nops(g[1]) do v:=v minus {op(Cycle(v[1],g))}
od; not evalb(v={}) end:
Here are a few examples:
> IsCyclic(Z(1));
true
> IsCyclic(Cyclic(25));
> IsCyclic(Dihedral(12));
> IsCyclic(Un(48));
> IsCyclic(Un(49));
> IsCyclic(Z(4) &x Z(6));
> IsCyclic(Z(4) &x Z(5));
true
false
false
true
false
true
FAIL
1 1
For example, the normalizer of the cyclic subgroup of GL(2, Z3 ) generated by
0 1
:
>
map(matrix,normalizer(Cycle([[1,1],[0,1]],GL2(3)),GL2(3)));
1 0, 1 0, 2 0, 2 0, 1 1, 1 1, 2 1, 2 1, 1 2,
0 1 0 2 0 1 0 2 0 1 0 2 0 1 0 2 0 1
1 2, 2 2, 2 2
0 2 0 1 0 2
{ 4 , 5, 6 }
1 1
Another example, the conjugacy class of
in GL(2, Z3 ):
0 1
> map(matrix,cl([[1,1],[0,1]],GL2(3)));
2 2 1 0 1 1 0 1 1 0 2 1 0 2 1
{
,
,
,
,
,
,
,
1 0 1 1 0 1 2 2 2 1 2 0 1 2 0
2
}
1
Group of Quaternions
All the groups of order less than 12 are either groups in our list of extended groups, or
their products, except the group of quaternions, see Finite Groups article at MathWorld,
for example. We will add the group of quaternions Q8 to our list. It is a non-Abelian
group of order 8 having 1 element of order 1 (the identity), 1 element of order 2 (negative
1), and 6 elements of order 4 (plus or minus i, j, k). There are only 2 non-Abelian groups
of order 8, Q8 and D4 . The dihedral group D4 has only 2 elements of order 4, the
rotations by 90 degrees and 270 degrees. Its other elements have degrees either 1
(identity), or 2 (the reflections and the rotation by 180 degrees). Thus, if we find a nonAbelian group of order 8 having more than 2 elements of order 4, it will be the group of
quaternions. Try to find it among the subgroups of the groups we already know. GL2(2,
Z2 ) is too small to contain Q8 as a subgroup, it has only 6 elements. Try the next
smallest groups in the GL and SL series, SL(2, Z3 ). First, find its elements of order 4:
> Q:=Nordlist(4,SL2(3)):
> map(matrix,Q);
0 1, 1 1, 2 1, 0 2, 1
2 0 1 2 1 1 1 0 2
2 2
,
2 2
Exactly 6 elements. If the group generated by them has 8 elements, then it is the group of
quaternions.
> map(matrix,Gen(Q,SL2(3)));
2 1 1 1 0 1 1 2 0
{
,
,
,
,
1 1 1 2 2 0 2 2 1
2 2
,
0 2
2 1
,
1 0
0 2
,
1 0
0
}
2
8 elements, so it is the group of quaternions. Let's make an extended group from it:
> Q8inSL:=[[[[1,0],[0,1]],[[2,0],[0,2]],op(Q)],(a,b)>mm(a,b,3),[[1,0],[0,1]],a->invSL(a,3)]:
We also need a function converting the matrices, or lists, to the standard i, j, k
expressions. Let's do it:
> quat([[1,0],[0,1]]):=1: quat([[2,0],[0,2]]):=-1:
quat(Q[1]):=i: quat(Q[2]):=j:
quat(Q[3]):=-k: quat(Q[4]):=-i: quat(Q[5]):=k:
quat(Q[6]):=-j:
We will also need the backward conversion, from i, j, k to the lists:
> qback(1):=[[1,0],[0,1]]: qback(-1):=[[2,0],[0,2]]:
qback(i):=Q[1]: qback(j):=Q[2]:
qback(-k):=Q[3]: qback(-i):=Q[4]: qback(k):=Q[5]: qback(j):=Q[6]:
Now we can redefine the quaternion group in terms of i, j, and k:
> Q8:=[map(quat,Q8inSL[1]),(a,b)>quat(Q8inSL[2](qback(a),qback(b))),1,a>quat(Q8inSL[4](qback(a)))]:
For example,
> Center(Q8);
[ 1, -1 ]
> cl(i,Q8);
> Cycle(i,Q8);
{ i, i }
[ 1, i, -1, i ]
>
Certainly, we could define the group of quaternions directly from its Cayley table on p.
89 of Dr. Gallians text.
Exercises
1. Find the subgroup of U(96) generated by 5 and 7.
0
2. Find the subgroup of GL(2, Z4 ) generated by
1
Selected Answers
An Introduction to Maple
1. Find/Replace.
2. Yes.
1
1
and
2
0
0
.
3
3. Shift+Enter.
0. Preliminaries
1.
( 2 ) ( 41 ) ( 61459926512826500975801 ) ( 18055139801 ) ( 42521761 ) ( 133201 )
1 n 10 1 n 9 3 n 8 7 n 6 1 n 4 3 n 2
+
+
.
10
2
4
10
2
20
4
6. n n + 3 and 2397 , 4091 , 6555 , 9993 .
1. Introduction to Groups
1. The elements of D3 :
The elements of C6 :
3.
[ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ]
2
3
1
5
6
4
3
1
2
6
4
5
4
6
5
1
3
2
5
4
6
2
1
3
4
3
5
6
2
3
4
5
6
1
3
4
5
6
1
2
4
5
6
1
2
3
5
6
1
2
3
4
2
3
C3 is Abelian, D3 is not.
-1
5. The a b a -table for D3 :
1
1
1
1
2
2
2
3
3
3
3
3
3
2
2
2
4
5
6
4
6
5
5
6
4
6
5
4
5
5
-1
The a b a -table for D4 :
1
1
1
1
1
1
1
1
2
2
2
2
4
4
4
4
3
3
3
3
3
3
3
3
4
4
4
4
2
2
2
2
6. Rotation, 4.
2. Groups
5
7
5
7
5
7
5
7
6
8
6
8
8
6
8
6
7
5
7
5
7
5
7
5
8
6
6
8
3
7
9
11
13
17
19
21
23
27
29
31
33
37
39
3
9
21
27
33
39
11
17
23
29
1
7
13
19
31
37
7
21
9
23
37
11
39
13
27
1
29
3
17
31
19
33
9
27
23
1
19
37
33
11
29
7
3
21
39
17
13
31
11
33
37
19
1
23
27
9
31
13
17
39
21
3
7
29
13
39
11
37
23
9
21
7
33
19
31
17
3
29
1
27
17 19
11 17
39 13
33 11
27
9
21
7
9
3
3
1
37 39
31 37
19 33
13 31
7 29
1 27
29 23
23 21
21
23
27
29
31
33
37
39
1
3
7
9
11
13
17
19
23
29
1
7
13
19
31
37
3
9
21
27
33
39
11
17
27
1
29
3
17
31
19
33
7
21
9
23
37
11
39
13
29
7
3
21
39
17
13
31
9
27
23
1
19
37
33
11
31
13
17
39
21
3
7
29
11
33
37
19
1
23
27
9
33 37
19 31
31 19
17 13
3
7
29
1
1 29
27 23
13 17
39 11
11 39
37 33
23 27
9 21
21
9
7
3
39
37
33
31
29
27
23
21
19
17
13
11
3
1
3. 139.
142 221
4.
.
17 44
10 48
5.
.
119 94
6. 2016 and 336.
7. It is a group. The identity is 15, the inverses to 5, 15, 25, 45, 55, 65 are 45, 15, 65,
5, 55, 25, in the same order. The Cayley table of it is
5 55 15 65 45
25
5 15 25 45 55 65
55 25 65
5 45 15
15 45
5 65 25 55
5
65 55 45 25 15
45 65 15 55
5 25
[ 1, 19, 71, 44, 111, 79, 51, 99, 141, 69, 6, 114, 136, 119, 86, 39, 16, 14, 121, 124, 36, 104,
91, 134, 81, 89, 96, 84 ]
.
4.
1
0
0 2
,
1 1
5 3
,
2 4
2 2
,
3 5
1 5
,
2 0
0 4
,
3 0
0
.
4
0 4
,
5 5
1 3
,
4 2
4 4
,
3 1
5. 10 and 12.
6. [ 1, 2, 3, 4, 5, 6 ] .
1
7.
0
1
8.
0
0 2
,
1 0
0 3
,
2 0
0 5
,
1 0
0
.
5
9. Yes.
4. Cyclic Groups
1. U(46), U(47), U(49), U(50), U(53), and U(54) are cyclic. Their generators are
{ 5, 7, 11, 15, 17, 19, 21, 33, 37, 43 } for U(46),
{ 5, 10, 11, 13, 15, 19, 20, 22, 23, 26, 29, 30, 31, 33, 35, 38, 39, 40, 41, 43, 44, 45 }
for U(47),
{ 3, 5, 10, 12, 17, 24, 26, 33, 38, 40, 45, 47 } for U(49),
{ 3, 13, 17, 23, 27, 33, 37, 47 } for U(50),
{ 2, 3, 5, 8, 12, 14, 18, 19, 20, 21, 22, 26, 27, 31, 32, 33, 34, 35, 39, 41, 45, 48, 50, 51 }
for U(53),
{ 5, 11, 23, 29, 41, 47 } for U(54).
1
1
7. Z8 :
0 1
,
1 2
0 0
,
1 2
1 1
,
2 0
1 2
,
1 2
1 0
,
0 1
2 1
,
2 0
2 2
,
1 1
Z12 :
Z60 :
Z100 :
{ 1, 5, 7, 11, 25, 29, 31, 35, 49, 53, 55, 59, 73, 77, 79, 83 }
2.
0
{
3
3 3 2 1 2 2 1 3 0 3 0 3 2 2
,
,
,
,
,
,
,
2 2 1 2 3 3 0 0 3 0 1 2 3 1
1 0, 1 2, 1 0, 2 1, 0 3, 2 3, 0 1 }
0 3 2 1 0 1 1 0 1 2 3 0 3 2
3 0
,
0 1
1
,
2