---
title: "Accessing Module Information"
canonical: "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/access.html"
source: "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/access.md"
part: "Representation Theory"
chapter: "Modules over an Algebra and Group Representations"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Representation Theory", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/index-representation-theory.md"}
  - {"title": "Modules over an Algebra and Group Representations", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/index-modules-over-an-algebra-and-group-representations.md"}
prev: {"title": "New Modules from Old", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/operation.md"}
next: {"title": "Group Representations", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/representation.md"}
intrinsics:
  - {"name": ".", "signature": "M . i: ModRng, RngIntElt -> ModElt"}
  - {"name": "CoefficientRing", "signature": "CoefficientRing(M): ModRng -> Rng"}
  - {"name": "BaseRing", "signature": "BaseRing(M): ModRng -> Rng"}
  - {"name": "Generators", "signature": "Generators(M): ModRng -> { ModRngElt }"}
  - {"name": "Parent", "signature": "Parent(u): ModRngElt -> ModRng"}
  - {"name": "Action", "signature": "Action(M): ModRng -> AlgMat"}
  - {"name": "RightAction", "signature": "RightAction(M): ModRng -> AlgMat"}
  - {"name": "MatrixGroup", "signature": "MatrixGroup(M): ModGrp -> GrpMat"}
  - {"name": "ActionGenerator", "signature": "ActionGenerator(M, i): ModRng, RngIntElt -> AlgMatElt"}
  - {"name": "NumberOfActionGenerators", "signature": "NumberOfActionGenerators(M): ModRng -> RngIntElt"}
  - {"name": "Ngens", "signature": "Ngens(M): ModTupRng -> RngIntElt"}
  - {"name": "Group", "signature": "Group(M): ModGrp -> Grp"}
examples:
  - "ex-891476"
---

# Accessing Module Information

This section deals with the underlying vector space of a module $M$, which is a module over the algebra $A$.

## The Underlying Vector Space

<a id="operation-operation-modrng-rngintelt-modelt"></a>
### `M . i: ModRng, RngIntElt -> ModElt`

Given an $A$-module $M$ and a positive integer $i$, return the $i$-th generator of $M$.

<a id="function-coefficientring-modrng"></a>
### `CoefficientRing(M): ModRng -> Rng`

<a id="function-basering-modrng"></a>
### `BaseRing(M): ModRng -> Rng`

Given an $A$-module $M$, where $A$ is an algebra over the field $K$, return $K$.

<a id="function-generators-modrng"></a>
### `Generators(M): ModRng -> { ModRngElt }`

The generators for the $A$-module $M$, returned as a set.

<a id="function-parent-modrngelt"></a>
### `Parent(u): ModRngElt -> ModRng`

Given an element $u$ belonging to the $A$-module $M$, return $M$.

## The Action Algebra

<a id="function-action-modrng"></a>
### `Action(M): ModRng -> AlgMat`

<a id="function-rightaction-modrng"></a>
### `RightAction(M): ModRng -> AlgMat`

Given an $A$-module $M$, return the matrix algebra $A$ giving the action of $A$ on $M$.

<a id="function-matrixgroup-modgrp"></a>
### `MatrixGroup(M): ModGrp -> GrpMat`

```magma
Check: BoolElt                    Default: true
```

Given an $R[G]$-module $M$, return the matrix group whose generators are the (invertible) generators of the acting algebra of $M$.

<a id="function-actiongenerator-modrng-rngintelt"></a>
### `ActionGenerator(M, i): ModRng, RngIntElt -> AlgMatElt`

The $i$-th generator of the (right) acting matrix algebra for the module $M$.

<a id="function-numberofactiongenerators-modrng"></a>
### `NumberOfActionGenerators(M): ModRng -> RngIntElt`

<a id="function-ngens-modtuprng"></a>
### `Ngens(M): ModTupRng -> RngIntElt`

The number of action generators (the number of generators of the algebra) for the $A$-module $M$.

<a id="function-group-modgrp"></a>
### `Group(M): ModGrp -> Grp`

Given an $R[G]$-module $M$, return the group $G$.

<a id="example-ex-891476"></a>
### `Example: Access Functions for a Matrix Algebra Module (ex-891476)`

We illustrate the use of several of these access functions by applying them to the $6$-dimensional representation of a matrix algebra defined over ${\bf F}_{2}$.

```magma
> F2 := GF(2);
> F := MatrixAlgebra(F2, 6);
> A := sub< F |
>   [ 1,0,0,1,0,1,
>     0,1,0,0,1,1,
>     0,1,1,1,1,0,
>     0,0,0,1,1,0,
>     0,0,0,1,0,1,
>     0,1,0,1,0,0 ],
>   [ 0,1,1,0,1,0,
>     0,0,1,1,1,1,
>     1,0,0,1,0,1,
>     0,0,0,1,0,0,
>     0,0,0,0,1,0,
>     0,0,0,0,0,1 ] >;
> T := RModule(F2, 6);
> M := RModule(T, A);
> Dimension(M);
6
> BaseRing(M);
Finite field of size 2
```

We set $R$ to be the name of the matrix ring associated with $M$. Using the generator subscript notation, we can access the matrices giving the (right) action of $A$.

```magma
> R := RightAction(M);
> R.1;
[1 0 0 1 0 1]
[0 1 0 0 1 1]
[0 1 1 1 1 0]
[0 0 0 1 1 0]
[0 0 0 1 0 1]
[0 1 0 1 0 0]
> R.2;
[0 1 1 0 1 0]
[0 0 1 1 1 1]
[1 0 0 1 0 1]
[0 0 0 1 0 0]
[0 0 0 0 1 0]
[0 0 0 0 0 1]
```

We display full details of the module.

```magma
> M: Maximal;
Module M of dimension 6 with base ring GF(2)
Generators of acting algebra:

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

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