# Group Representations

A $K[G]$-module corresponds to a representation of $G$, that is, a homomorphism $phi : G \rightarrow GL(n, K)$. While the theory of representations is largely done using the language of $K[G]$-modules it is sometime useful to switch to the language of representations. This section describes intrinsics that enable the user to move from one language to the other.

## `GModuleAction(M): ModGrp -> Map(Hom)`

Given a $K[G]$-module $M$, return the action of $G$ on $M$ as homomorphism $f$ of $G$ into the matrix group $GL_n(K)$.

## `Representation(M): ModGrp -> Map(Hom)`

Given a $K[G]$-module $M$, return the action of $G$ on $M$ as homomorphism $f$ of $G$ into the matrix algebra $M_n(K)$.

## `Example: Representation (ex-313ec4)`

The function `Representation` allows the easy calculation of group characters. We illustrate this with the $6$-dimension module for the group $A_7$ constructed above.

```magma
> A7 := AlternatingGroup(7);
> M  := PermutationModule(A7, Vector(GF(11), [1,0,1,0,1,0,1]));
> phi := Representation(M);
> [ Trace(phi(c[3])) : c in Classes(A7) ];
[ 7, 3, 4, 1, 1, 2, 0, 0, 0 ]

```

## `Example: Dual (ex-8b546c)`

We present a procedure which, given a $K[G]$-module $M$, constructs its dual $D$.

```magma
> DualModule := function(M)
>       G := Group(M);
>       f := Representation(M);
>       return GModule(G, [ Transpose(f(G.i))^-1 : i in [1 .. Ngens(G)] ]);
> end function;

```

## `Kernel(M): ModGrp -> Grp`

Given a $K[G]$-module $M$, where $K$ is a finite field, return the kernel of the group homomorphism defined by `Representation(M)`.

## `GModuleOfQuotient(M, H): ModGrp, Grp -> ModGrp`

Given a $K[G]$-module $M$, where $K$ is a finite field, and a subgroup $H$ of the kernel of the representation afforded by $M$, return $M$ as a $(G/H)$-module.

## `ActionGenerator(M, i): ModGrp, RngIntElt -> AlgMatElt`

## `RightActionGenerator(M, i): ModGrp, RngIntElt -> AlgMatElt`

The $i$-th generator of the (right) acting matrix algebra for the module $M$. That is, the image of the $i$-th group generator in the corresponding representation.

## `ActionGenerators(M): ModGrp -> [ AlgMatElt ]`

Return the matrices giving the action on the module $M$ as a sequence. These are the images of the generators of the group in the corresponding representation.

## `NumberOfActionGenerators(M): ModGrp -> RngIntElt`

## `Nagens(M): ModGrp -> RngIntElt`

The number of action generators (the number of generators of the algebra) for the $R[G]$-module $M$.

## `ActionGroup(M): ModGrp -> GrpMat`

The matrix group generated by the action generators of $M$.

## `Sections(G): GrpMat -> List`

Given a matrix group $G$ defined over a finite field $K$, return the action of $G$ on each composition factor of the natural K[G]-module for $G$.

## `Example: Sections (ex-984a17)`

We construct the tensor square $T$ of the natural module $M$ of the matrix group $G = SL(3, 5)$ and then determine the action of $G$ on each composition factor of $T$.

```magma
> G := SL(3, 5);
> M := GModule(G);
> T := TensorProduct(M, M);
> A := ActionGroup(T);
> S := Sections(A);
> #S;
2

```

There are just two composition factors of $T$, the symmetric square and the exterior square of $M$.

```magma
> S[1];
MatrixGroup(3, GF(5))
Generators:

    [1 0 0]
    [0 2 0]
    [0 0 3]

    [0 1 0]
    [1 0 1]
    [1 0 0]

```
