# Finding a Base

If the radical quotient $Q$ of the matrix group $G$ over a finite field has been successfully computed using `RadicalQuotient` or `LMGRadicalQuotient`, then $Q$ and the associated homomorphism $Q \to Q$ can be used to look for a base for $G$ (see Section|[Base and Strong Generating Set](../MatrixGroupsOverGeneralRings/BSGS-base-strong-generator.md#sec-bsgs)). This will typically make further structural computations with $G$ either possible (if they were not possible without a base) or more efficient. Even if a base is already known, the new base computed may be better: it will often have shorter associated basic orbit lengths, for example.

## `LMGBase(G : parameters): GrpMat -> Tup, SeqEnum, SeqEnum`

```magma
SetBase: BoolElt                      Default: true
DimLim : RngIntElt                    Default: 0
Print  : RngIntElt                    Default: 0
```

Use the radical quotient $Q$ of $G$ and associated homomorphism $G \to Q$ to find a base for $G$. return the base `B`, the sequence `BDim` of dimensions of the subspaces (or vectors, assigned dimension $1$) in $B$, and the sequence `BOL` of associated basic orbit lengths. If no base is found then ane empty tuple and sequences are returned.

If the parameter `SetBase` is `true` and a base `B` is found, then the `Base` attribute for $G$ is set to `B`, and so this base will be used for all subsequent calculations.

The parameter `DimLim` is a limit on the dimensions of subspaces that will be considered as possible base points. The default is half od the dimension of $G$. Subspaces of large dimension in a base can result in slower subsequent calculations but, on the other hand, restricting the dimension can result in a base with longer basic orbit lengths, so it can be difficult to find the right balance. If is important to find an optimal base (because it will be used for lengthy subsequent calculations) then it is worthwhile running `LMGBase` several times with different values of `DimLim` to try and get the best possible result.

As an example, we compute a base of a group from the ATLAS database.

## `Example: base (ex-c9a7be)`

```magma
> G := MatrixGroup("6M22",1);
> G:Minimal;
MatrixGroup(66, GF(5^2)) of order 2^8 * 3^3 * 5 * 7 * 11
> B, BDim, BOL := LMGBase(G);
> BDim, BOL;
[ 6, 6, 6, 6, 6, 1 ]
[ 22, 21, 20, 16, 3, 6 ]
> B, BDim, BOL := LMGBase(G : DimLim := 1);
> BDim, BOL;
[ 1, 1, 1, 1 ]
[ 672, 66, 10, 6 ]

```

Note that the default methods for computing a base of this group usually result in much longer basic orbit lengths (but this varies from run to run).

```magma
> G := MatrixGroup("6M22",1);
> BSGS(G);
> BasicOrbitLengths(G);
[ 3696, 6, 60, 2 ]

```
