---
title: "Construction of Subalgebras, Ideals, and Quotient Algebras"
canonical: "https://docs.magma-maths.org/v2.30-1/Algebras/IntroductionToAlgebras/subs-quos.html"
source: "https://docs.magma-maths.org/v2.30-1/Algebras/IntroductionToAlgebras/subs-quos.md"
part: "Algebras"
chapter: "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": "Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/IntroductionToAlgebras/index-introduction-to-algebras.md"}
prev: {"title": "Construction of General Algebras and their Elements", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/IntroductionToAlgebras/creation.md"}
next: {"title": "Operations on Algebras and Subalgebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/IntroductionToAlgebras/ops.md"}
intrinsics:
  - {"name": "sub", "signature": "sub< A | L >: AlgGen, List -> AlgGen, Map"}
  - {"name": "lideal", "signature": "lideal< A | L >: AlgGen, List -> AlgGen, Map"}
  - {"name": "rideal", "signature": "rideal< A | L >: AlgGen, List -> AlgGen, Map"}
  - {"name": "ideal", "signature": "ideal< A | L >: AlgGen, List -> AlgGen, Map"}
  - {"name": "quo", "signature": "quo< A | L >: AlgGen, List -> AlgGen, Map"}
  - {"name": "/", "signature": "A / S: AlgGen, AlgGen -> AlgGen"}
---

# Construction of Subalgebras, Ideals, and Quotient Algebras

## Subalgebras and Ideals

If the coefficient ring $R$ of an algebra $A$ is a Euclidean domain then one may construct submodules and ideals of $A$ in Magma.

<a id="constructor-constructor-sub-alggen-list-alggen-map"></a>
### `sub< A | L >: AlgGen, List -> AlgGen, Map`

Create the subalgebra $S$ of the algebra $A$ that is generated by the elements defined by $L$, where $L$ is a list of one or more items of the following types:

**(a)**
An element of $A$;

**(b)**
A set or sequence of elements of $A$;

**(c)**
A subalgebra or ideal of $A$;

**(d)**
A set or sequence of subalgebras or ideals of $A$.

The constructor returns the subalgebra as an algebra of the same type as $A$. An exception are group algebras, where the subalgebra is either of type `AlgAss` or of the special type `AlgGrpSub`. As well as the subalgebra $S$ itself, the constructor returns the inclusion homomorphism $f : S \rightarrow A$.

<a id="constructor-constructor-lideal-alggen-list-alggen-map"></a>
### `lideal< A | L >: AlgGen, List -> AlgGen, Map`

Create the left ideal $I$ of the algebra $A$ generated by the elements defined by $L$, where $L$ is a list as for the `sub` constructor above. The constructor returns the left ideal as an algebra of the same type as $A$ with the same exception for group algebras as for the `sub` constructor. As well as the left ideal $I$ itself, the constructor returns the inclusion homomorphism $f : I \rightarrow A$.

<a id="constructor-constructor-rideal-alggen-list-alggen-map"></a>
### `rideal< A | L >: AlgGen, List -> AlgGen, Map`

Create the right ideal $I$ of the algebra $A$ generated by the elements defined by $L$, where $L$ is a list as for the `sub` constructor above. The constructor returns the right ideal as an algebra of the same type as $A$ with the same exception for group algebras as for the `sub` constructor. As well as the right ideal $I$ itself, the constructor returns the inclusion homomorphism $f : I \rightarrow A$.

<a id="constructor-constructor-ideal-alggen-list-alggen-map"></a>
### `ideal< A | L >: AlgGen, List -> AlgGen, Map`

Create the (two-sided) ideal $I$ of the algebra $A$ generated by the elements defined by $L$, where $L$ is a list as for the `sub` constructor above. The constructor returns the right ideal as an algebra of the same type as $A$ with the same exception for group algebras as for the `sub` constructor. As well as the ideal $I$ itself, the constructor returns the inclusion homomorphism $f : I \rightarrow A$.

## Quotient Algebras

If the coefficient ring $R$ of an algebra $A$ is a field, then quotient algebras of $A$ may also be constructed.

<a id="constructor-constructor-quo-alggen-list-alggen-map"></a>
### `quo< A | L >: AlgGen, List -> AlgGen, Map`

Create the quotient algebra $Q = A / I$, where $I$ is the two-sided ideal of $A$ generated by the elements of $A$ specified by the list $L$, which should satisfy the same conditions as for the `sub` constructor above. The constructor returns the quotient as a structure constant algebra with degree equal to its dimension. If $A$ is known to be associative, then $Q$ is of type `AlgAss`, otherwise $Q$ is of type `AlgGen`. As well as the quotient $Q$ itself, the constructor returns the natural homomorphism $f : A \rightarrow Q$.

<a id="operation-op-div-alggen-alggen"></a>
### `A / S: AlgGen, AlgGen -> AlgGen`

The quotient of the algebra $A$ by the (two-sided) ideal closure of its subalgebra $S$.
