---
title: "Subalgebras and Quotient Algebras"
canonical: "https://docs.magma-maths.org/v2.30-1/Algebras/BasicAlgebras/sub-quo.html"
source: "https://docs.magma-maths.org/v2.30-1/Algebras/BasicAlgebras/sub-quo.md"
part: "Algebras"
chapter: "Basic Algebras"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/index-algebras.md"}
  - {"title": "Basic Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/BasicAlgebras/index-basic-algebras.md"}
prev: {"title": "Homomorphisms", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/BasicAlgebras/homomorphisms-algebras.md"}
next: {"title": "Minimal Forms and Gradings", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/BasicAlgebras/forms-gradings-permute-idempotents.md"}
intrinsics:
  - {"name": "sub", "signature": "sub<A | S>: AlgBas, SeqEnum -> AlgBas, Map"}
  - {"name": "SubalgebraFromBasis", "signature": "SubalgebraFromBasis(A, V): AlgBas, SeqEnum -> AlgBas, Map"}
  - {"name": "MaximalIdempotent", "signature": "MaximalIdempotent(A, S): AlgBas, SeqEnum -> AlgBasElt"}
  - {"name": "MinimalIdentity", "signature": "MinimalIdentity(A, S): AlgBas, SeqEnum[AlgBasElt] -> AlgBasElt"}
  - {"name": "Centre", "signature": "Centre(A): AlgBas -> AlgBas, Map"}
  - {"name": "Centralizer", "signature": "Centralizer(A, S): AlgBas, SeqEnum -> AlgBas, Map"}
  - {"name": "MaximalCommutativeSubalgebra", "signature": "MaximalCommutativeSubalgebra(A, S): AlgBas, SeqEnum -> AlgBas, Map"}
  - {"name": "ideal", "signature": "ideal< A | S>: AlgBas, SeqEnum[AlgBasElt] -> ModTupFld"}
  - {"name": "ideal", "signature": "ideal< A | S>: AlgBasGrpP, SeqEnum[AlgBasElt] -> ModTupFld"}
  - {"name": "LeftAnnihilator", "signature": "LeftAnnihilator(A, S): AlgBas, SeqEnum[AlgBasElt] -> SeqEnum[AlgBasElt]"}
  - {"name": "RightAnnihilator", "signature": "RightAnnihilator(A, S): AlgBas, SeqEnum[AlgBasElt] -> SeqEnum[AlgBaselt]"}
  - {"name": "Annihilator", "signature": "Annihilator(A, S): AlgBas, SeqEnum[AlgBasElt] -> SeqEnum[AlgBasElt]"}
  - {"name": "IsIdeal", "signature": "IsIdeal(A, S): AlgBas, ModTupFld -> Bool"}
  - {"name": "IsLeftIdeal", "signature": "IsLeftIdeal(A, S): AlgBas, ModTupFld -> Bool"}
  - {"name": "IsRightIdeal", "signature": "IsRightIdeal(A, S): AlgBas, ModTupFld -> Bool"}
  - {"name": "RandomIdealGeneratedBy", "signature": "RandomIdealGeneratedBy(A, n): AlgBas, RngIntElt -> ModTupFld"}
  - {"name": "quo", "signature": "quo<A | S>: AlgBas, ModTupFld -> AlgBas, Map"}
  - {"name": "CoverAlgebra", "signature": "CoverAlgebra(A): AlgBas -> AlgBas, ModMatFldElt"}
  - {"name": "GradedCoverAlgebra", "signature": "GradedCoverAlgebra(A): AlgBas -> AlgBas, ModMatFldElt"}
  - {"name": "TruncatedAlgebra", "signature": "TruncatedAlgebra(A, n): AlgBas, RngIntElt -> AlgBas, ModMatFldElt"}
  - {"name": "GeneratorsOfGroupOfUnits", "signature": "GeneratorsOfGroupOfUnits(A): AlgBas -> SeqEnum, SeqEnum"}
  - {"name": "NoncentralGeneratorsOfGroupOfUnits", "signature": "NoncentralGeneratorsOfGroupOfUnits(A): AlgBas -> SeqEnum, SeqEnum"}
---

# Subalgebras and Quotient Algebras

A subalgebra is also returned with the embedding homomorphism, and a quotient algebra is returned with the natural quotient map. These are needed for creating some standard subalgebras such as the centre of the algebra.

## Subalgebras and their Constructions

<a id="constructor-constructor-sub-algbas-seqenum-algbas-map"></a>
### `sub<A | S>: AlgBas, SeqEnum -> AlgBas, Map`

The subalgebra of $A$ generated by the elements of the sequence $S$, together with the inclusion map of the subalgebra into $A$. The subalgebra contains the idempotent of minimal rank in $A$ that acts as a multiplicative identity on the elements of $S$.

<a id="function-subalgebrafrombasis-algbas-seqenum"></a>
### `SubalgebraFromBasis(A, V): AlgBas, SeqEnum -> AlgBas, Map`

Given a basic algebra A and the basis $V$ of a subspace of $A$, the function returns the basic algebra which is the subalgebra spanned by the subspace and the inclusion matrix of the homomorphism embedding the subalgebra into $A.$ Note that the space $V$ might not contain the identity element of V and in that case the minimal possible identity element is added to the returned subalgebra.

<a id="function-maximalidempotent-algbas-seqenum"></a>
### `MaximalIdempotent(A, S): AlgBas, SeqEnum -> AlgBasElt`

Given a basic algebra $A$, a subspace $S$ of the vector space of $A$ that is closed under multiplication, this function returns an idempotent in $A$ which has maximal rank among all idempotents contained in $S$.

<a id="function-minimalidentity-algbas-seqenum-algbaselt"></a>
### `MinimalIdentity(A, S): AlgBas, SeqEnum[AlgBasElt] -> AlgBasElt`

Returns the idempotent of smallest rank that is a two sided identity for the elements in the set $S.$

<a id="function-centre-algbas"></a>
### `Centre(A): AlgBas -> AlgBas, Map`

The centre of the basic algebra as a basic algebra together with the inclusion homomorphism.

<a id="function-centralizer-algbas-seqenum"></a>
### `Centralizer(A, S): AlgBas, SeqEnum -> AlgBas, Map`

Returns the centralizer in the basic algebra $A$ of the elements in the sequence $S$, along with the homomorphism embedding the centralizer into $A.$

<a id="function-maximalcommutativesubalgebra-algbas-seqenum"></a>
### `MaximalCommutativeSubalgebra(A, S): AlgBas, SeqEnum -> AlgBas, Map`

Returns a maximal commutative subalgebra of the basic algebra $A$ that contains the elements of the sequence $S$. An error occurs if the elements of $S$ do not commute.

## Ideals and their Construction

<a id="constructor-constructor-ideal-algbas-seqenum-algbaselt-modtupfld"></a>
### `ideal< A | S>: AlgBas, SeqEnum[AlgBasElt] -> ModTupFld`

<a id="constructor-constructor-ideal-algbasgrpp-seqenum-algbaselt-modtupfld"></a>
### `ideal< A | S>: AlgBasGrpP, SeqEnum[AlgBasElt] -> ModTupFld`

Returns the subspace of the vector space of the algebra $A$ that is the ideal of the $A$ generated by the given sequence of elements $S$.

<a id="function-leftannihilator-algbas-seqenum-algbaselt"></a>
### `LeftAnnihilator(A, S): AlgBas, SeqEnum[AlgBasElt] -> SeqEnum[AlgBasElt]`

Returns a basis for the left annihilator of the sequence $S$ of elements in the basic algebra $A.$

<a id="function-rightannihilator-algbas-seqenum-algbaselt"></a>
### `RightAnnihilator(A, S): AlgBas, SeqEnum[AlgBasElt] -> SeqEnum[AlgBaselt]`

Returns a basis for the right annihilator of the sequence $S$ of elements in the basic algebra $A.$

<a id="function-annihilator-algbas-seqenum-algbaselt"></a>
### `Annihilator(A, S): AlgBas, SeqEnum[AlgBasElt] -> SeqEnum[AlgBasElt]`

Returns a basis for the two-sided annihilator of the sequence of elements $S$ of the basic algebra $A.$

<a id="function-isideal-algbas-modtupfld"></a>
### `IsIdeal(A, S): AlgBas, ModTupFld -> Bool`

Returns `true` if the subspace spanned by the elements of $S$ is a two-sided ideal of the basic algebra $A.$

<a id="function-isleftideal-algbas-modtupfld"></a>
### `IsLeftIdeal(A, S): AlgBas, ModTupFld -> Bool`

Returns `true` if the subspace spanned by the elements of $S$ is a left ideal of the basic algebra $A.$

<a id="function-isrightideal-algbas-modtupfld"></a>
### `IsRightIdeal(A, S): AlgBas, ModTupFld -> Bool`

Returns `true` if the subspace spanned by the elements of $S$ is a two-sided ideal of the basic algebra $A.$

<a id="function-randomidealgeneratedby-algbas-rngintelt"></a>
### `RandomIdealGeneratedBy(A, n): AlgBas, RngIntElt -> ModTupFld`

Returns the ideal generated by $n$ randomly selected elements in the Jacobson radical of the basic algebra $A.$

## Quotient Algebras

<a id="constructor-constructor-quo-algbas-modtupfld-algbas-map"></a>
### `quo<A | S>: AlgBas, ModTupFld -> AlgBas, Map`

Returns the quotient algebra of $A$ by the ideal $S$, which is a subspace of the vector space of $A$, together with the quotient map.

<a id="function-coveralgebra-algbas"></a>
### `CoverAlgebra(A): AlgBas -> AlgBas, ModMatFldElt`

Constructs the maximal extension B as in [$0 \rightarrow  K \rightarrow  B \rightarrow  A \rightarrow 0$] such that $B$ acts trivially on $K$ and $B$ is an algebra with exactly the same minimal number of generators as $A$. Returns $B$ and the algebra homomorphism of $B$ onto $A$.

<a id="function-gradedcoveralgebra-algbas"></a>
### `GradedCoverAlgebra(A): AlgBas -> AlgBas, ModMatFldElt`

This assumes that we are given the truncated algebra of a graded algebra. It creates the basic algebra of the natural cover of $A$ and also returns the matrix of the cover onto $A.$

<a id="function-truncatedalgebra-algbas-rngintelt"></a>
### `TruncatedAlgebra(A, n): AlgBas, RngIntElt -> AlgBas, ModMatFldElt`

The quotient of the algebra by the $n^{th}$ power of the radical of $A$. Returns also the quotient map.

## Units

<a id="function-generatorsofgroupofunits-algbas"></a>
### `GeneratorsOfGroupOfUnits(A): AlgBas -> SeqEnum, SeqEnum`

Returns a sequence of elements of the basic algebra $A$ that generate the group of invertible elements in $A$ and a sequence containing the inverses of those elements.

<a id="function-noncentralgeneratorsofgroupofunits-algbas"></a>
### `NoncentralGeneratorsOfGroupOfUnits(A): AlgBas -> SeqEnum, SeqEnum`

Returns a sequence of elements of the basic algebra $A$ that generate the quotient of the group of invertible elements in $A$ by the subgroup of invertible central elements. The inverses of those elements is also returned as a sequence.
