---
title: "Presentations"
canonical: "https://docs.magma-maths.org/v2.30-1/FiniteGroups/MatrixGroupsOverGeneralRings/finitely_presented_group.html"
source: "https://docs.magma-maths.org/v2.30-1/FiniteGroups/MatrixGroupsOverGeneralRings/finitely_presented_group.md"
part: "Finite Groups"
chapter: "Matrix Groups over General Rings"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Finite Groups", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/index-finite-groups.md"}
  - {"title": "Matrix Groups over General Rings", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/MatrixGroupsOverGeneralRings/index-matrix-groups-over-general-rings.md"}
prev: {"title": "Coset Tables and Transversals", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/MatrixGroupsOverGeneralRings/coset-table-transversal.md"}
next: {"title": "Automorphism Groups", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/MatrixGroupsOverGeneralRings/automorphisms.md"}
intrinsics:
  - {"name": "FPGroup", "signature": "FPGroup(G): GrpMat -> GrpFP, Hom(Grp)"}
  - {"name": "FPGroupStrong", "signature": "FPGroupStrong(G): GrpMat -> GrpFP, Hom(Grp)"}
  - {"name": "WordGroup", "signature": "WordGroup(G): GrpMat -> GrpSLP, Map"}
  - {"name": "InverseWordMap", "signature": "InverseWordMap(G): GrpMat -> Map"}
  - {"name": "WordInGenerators", "signature": "WordInGenerators(G, g : parameters): GrpMat, GrpMatElt -> GrpFPElt"}
---

# Presentations

The functions described in this section apply only to finite groups for which a base and strong generating set may be constructed.

<a id="id1"></a>
## Presentations

<a id="function-fpgroup-grpmat"></a>
### `FPGroup(G): GrpMat -> GrpFP, Hom(Grp)`

Construct a presentation for the matrix group $G$ on the set of defining generators and return the presentation in the form of a finitely presented group $F$ that is isomorphic to $G$. The presentation is obtained by first computing the regular representation of $G$ and then using the Todd-Coxeter Schreier algorithm to construct a presentation on the strong generators. In this situation the strong generators are identical to the defining generators.

A group homomorphism $\phi: F \rightarrow G$, defining $G$ as a matrix representation of $F$, is also returned.

<a id="function-fpgroupstrong-grpmat"></a>
### `FPGroupStrong(G): GrpMat -> GrpFP, Hom(Grp)`

Construct a presentation for the matrix group $G$ on a set of strong generators and return the presentation in the form of a finitely presented group $F$ that is isomorphic to $G$. In Magma, the Todd-Coxeter Schreier algorithm is used to construct the presentation. If strong generators are not already known for $G$, they will be constructed. In the case in which strong generators are already known for $G$, the presentation will be on these strong generators.

The presentation will have the property that it contains presentations for all stabilizer subgroups defined by the BSGS.

The group homomorphism $f: F \rightarrow G$, defining $G$ as a matrix representation of $F$, is also returned.

## Matrices as Words

Consider a matrix group $G$ defined on $d$ generators. The *word group* of $G$ is a free group $W$ of rank $d$. Then we regard $G$ as a homomorphic image of $F$ with associated homomorphism $\phi: W \rightarrow G$. All operations involving words in the generators of $G$ will be performed in $W$.

<a id="function-wordgroup-grpmat"></a>
### `WordGroup(G): GrpMat -> GrpSLP, Map`

Given a matrix group $G$ defined on $d$ generators, return (a) a free group $W$ on $d$ generators as an SLP-group, and (b) the homomorphism $\phi$ from $W$ to $G$ such that $W.i \rightarrow G.i$, for $i = 1, \ldots, d$. The group $W$ associated with $G$ by this function will be referred to as the *word group* for $G$.

<a id="function-inversewordmap-grpmat"></a>
### `InverseWordMap(G): GrpMat -> Map`

Given a matrix group $G$ and its associated word group $W$ with canonical homomorphism $\phi:W \rightarrow G$, construct the inverse mapping $\rho$. Thus, given a matrix $g$ of $G$, $g@\rho$ returns an element in the preimage of $g$ under $\phi$. If the word group $W$ does not already exist, it will be created.

<a id="function-wordingenerators-grpmat-grpmatelt"></a>
### `WordInGenerators(G, g : parameters): GrpMat, GrpMatElt -> GrpFPElt`

```magma
RegLimit: RngIntElt                    Default: 1000000
Print   : RngIntElt                    Default: 0
```

Compute a word in a free group with generators corresponding to those of the group $G$ that evaluates to the element $g \in G$.

If $G$ has order at most `RegLimit` then the word will be computed using the regular permutation representation of $G$, and will be guaranteed to be a shortest word representing $g$. Otherwise an algorithm of Minkwitz [[Min98](https://docs.magma-maths.org/v2.30-1/references.md#cite-minkwitz)] is used, which will find a reasonably short word for $g$ but not necessarily a shortest word. The optional parameter `Print` controls the printing of diagnostics.

The first call of this function for an element $g$ of the group $G$ will take longer than subsequent calls for elements of the same group, because some necessary data is calculated with the first call.
