({{, (RefLink[GroupMultiplicationTable, paclet:ref/GroupMultiplicationTable])[group]
gives the multiplication table of group as an array.}})

OpenersNotesSection(Spacer1)Details

For a group of order n, (RefLink[GroupMultiplicationTable, paclet:ref/GroupMultiplicationTable]) returns an n×n matrix mat of integers such that element (Subscript[mat, ij]) gives the result of the multiplication of elements i and j in the group. Positions i, j, and (Subscript[mat, ij]) are computed with the function (RefLink[GroupElementPosition, paclet:ref/GroupElementPosition]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (12)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

This is a group of order 8:

GroupOrder[group=PermutationGroup[{Cycles[{{1,3},{2,4}}],Cycles[{{1,2}}]}]]

These are the multiplications of all pairs of elements, numbered as returned by (RefLink[GroupElementPosition, paclet:ref/GroupElementPosition]):

TableForm[GroupMultiplicationTable[group],TableHeadings->Automatic]

Generate all eight permutations of the group:

list=GroupElements[group]

The product of permutations 5 and 2 is permutation 7 in the list:

PermutationProduct[list[[5]],list[[2]]]===list[[7]]

OpenersExampleSection1(Spacer1)Scope  (1)

Multiplication tables can be constructed for any finite group:

GroupMultiplicationTable[SymmetricGroup[4]]

OpenersExampleSection2(Spacer1)Applications  (1)

In permutation-group algebra the basic elements are linear combinations of the permutations of a group. It is possible to avoid recomputation of products of permutations by using a multiplication table. Denoting elements of the group algebra as lists of coefficients, it is possible to multiply them:

group=PermutationGroup[{Cycles[{{1,2}}],Cycles[{{1,3},{2,4}}]}]

(table=GroupMultiplicationTable[group])//MatrixForm

product[list1_,list2_]:=Coefficient[list1.Map[X,table,{2}].list2,Array[X,8]]

g1={0,0,3,1,-2,1/2,0,6};
g2={1,0,-2,-2,1,4,1,-2};

product[g1,g2]

This is a nilpotent element:

g={0,0,0,0,-1,-1,1,1};
product[g,g]

This is an idempotent:

g={1,1,1,1,1,1,1,1}/8;

product[g,g]===g

OpenersExampleSection3(Spacer1)Properties & Relations  (7)

Every row and every column of the multiplication table of a group contains every permutation once, but in different order. Hence, the table is a Latin square (note that not every Latin square corresponds to a group, because associativity is not guaranteed):

GroupMultiplicationTable[DihedralGroup[4]] // MatrixForm

Multiplication table of the trivial group:

GroupMultiplicationTable[PermutationGroup[{}]]

The Cayley theorem states that every finite group is isomorphic to a subgroup of some symmetric group of permutations. Hence every multiplication table is a subtable of the table of a symmetric group, perhaps after renumbering of permutations.

This is the multiplication table of a subgroup of (Subscript[S, 4]):

table=GroupMultiplicationTable[PermutationGroup[{Cycles[{{1,3},{2,4}}],Cycles[{{1,2}}]}]]

Therefore it can be extracted as a subtable of the table of (Subscript[S, 4]):

S4table=GroupMultiplicationTable[SymmetricGroup[4]];

sublist={1,2,7,8,17,18,23,24};

table===(S4table[[sublist,sublist]]/.Thread[sublist->Range[8]])

A group is Abelian if and only if its multiplication table is symmetric under transposition. Take the symmetric group of degree 3:

MatrixForm[tableS3=GroupMultiplicationTable[SymmetricGroup[3]]]

The group (Subscript[S, 3]) is not Abelian:

tableS3 ==Transpose[tableS3]

When all elements of a group are involutions, the group is Abelian. That is, if the multiplication table has only 1s in the diagonal, then it is symmetric:

group=PermutationGroup[{Cycles[{{1,2},{3,4}}],Cycles[{{1,3},{2,4}}]}];

elems=GroupElements[group]

MatrixForm[GroupMultiplicationTable[group]]

The multiplication table can be obtained by direct use of (RefLink[PermutationProduct, paclet:ref/PermutationProduct]) and (RefLink[GroupElementPosition, paclet:ref/GroupElementPosition]):

group=PermutationGroup[{Cycles[{{1,2}}],Cycles[{{1,3},{2,4}}]}];
elems=GroupElements[group];

Map[GroupElementPosition[group,#]&,Outer[PermutationProduct,elems,elems]]

%===GroupMultiplicationTable[group]

Two groups are isomorphic as abstract groups if they have the same group multiplication table, modulo reordering of their elements:

group1=PermutationGroup[{Cycles[{{1,2}}],Cycles[{{3,4}}]}]

GroupMultiplicationTable[group1]//TableForm

group2=PermutationGroup[{Cycles[{{1,2},{3,4}}],Cycles[{{1,3},{2,4}}]}]

GroupMultiplicationTable[group2]//TableForm

However, those two groups are not isomorphic as permutation groups, because their permutations have different cyclic structures:

GroupElements[group1]

GroupElements[group2]

OpenersExampleSection4(Spacer1)Possible Issues  (1)

The product table follows "array indexing" in which the first element is represented in the vertical axis and the second element in the horizontal axis, and not "Cartesian indexing", in which these are reversed:

group=SymmetricGroup[3];

elems=GroupElements[group]

MatrixForm[table=GroupMultiplicationTable[group]]

Map[elems[[#]]&,table,{2}]===Table[PermutationProduct[elems[[i]],elems[[j]]],{i,6},{j,6}]

OpenersExampleSection5(Spacer1)Neat Examples  (1)

Matrix plot of the multiplication table of the symmetric group (Subscript[S, 5]):

ArrayPlot[GroupMultiplicationTable[SymmetricGroup[5]],ImageSize->400]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[GroupElements, paclet:ref/GroupElements])  ▪  (RefLink[GroupElementPosition, paclet:ref/GroupElementPosition])  ▪  (RefLink[Cycles, paclet:ref/Cycles])  ▪  (RefLink[PermutationGroup, paclet:ref/PermutationGroup])  ▪  (RefLink[PermutationProduct, paclet:ref/PermutationProduct])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Permutations, paclet:tutorial/Permutations])}, {▪(RefLinkPlain[Permutation Groups, paclet:tutorial/PermutationGroups])}, {▪(RefLinkPlain[Named Groups, paclet:tutorial/NamedGroups])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Group Theory, paclet:guide/GroupTheory])}})}})