Values of characters in GAP

347 Views Asked by At

Suppose $\chi$ is a character of group $G$, how to compute $\chi(g)$ in GAP? For instance, for G := DihedralGroup(30), I want to compute the values of Irr(G)[2] for any elements of G.

1

There are 1 best solutions below

2
On

To compute the value of a character, one can use the ^ operator. For example

gap> G:=DihedralGroup(30);
<pc group of size 30 with 3 generators>
gap> phi:=Irr(G)[2];
Character( CharacterTable( <pc group of size 30 with 3 generators> ), 
[ 1, -1, 1, 1, 1, 1, 1, 1, 1 ] )
gap> g:=Random(G);
f2*f3^2
gap> g^phi;
1
gap> g:=Random(G);
f1*f2*f3
gap> g^phi;
-1

The corresponding section of the GAP manual could be found by entering ??Character value in GAP:

gap> ??Character value                                                
Help: several entries match this topic - type ?2 to get match [2]

[1] Reference: character value of group element using powering operator
[2] Wedderga (not loaded): field of character values