---
title: "Ideals and Quotient Rings"
canonical: "https://docs.magma-maths.org/v2.30-1/BasicRings/IntroductionToRings/ideal-quotient.html"
source: "https://docs.magma-maths.org/v2.30-1/BasicRings/IntroductionToRings/ideal-quotient.md"
part: "Basic Rings"
chapter: "Introduction to Rings"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Basic Rings", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/index-basic-rings.md"}
  - {"title": "Introduction to Rings", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/IntroductionToRings/index-introduction-to-rings.md"}
prev: {"title": "Generic Element Functions", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/IntroductionToRings/element.md"}
next: {"title": "Other Ring Constructions", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/IntroductionToRings/creation-other.md"}
intrinsics:
  - {"name": "ideal", "signature": "ideal< R | a₁, ..., aᵣ >: Rng, RngElt, ..., RngElt -> RngIdl"}
  - {"name": "quo", "signature": "quo< R | aᵣ, ..., aᵣ >: Rng, RngElt, ..., RngElt -> Rng"}
  - {"name": "/", "signature": "R / I: Rng, RngIdl -> Rng"}
  - {"name": "PowerIdeal", "signature": "PowerIdeal(R): Rng -> PowIdl"}
  - {"name": "+", "signature": "I + J: RngIdl, RngIdl -> RngIdl"}
  - {"name": "*", "signature": "I * J: RngIdl, RngIdl -> RngIdl"}
  - {"name": "meet", "signature": "I meet J: RngIdl, RngIdl -> RngIdl"}
  - {"name": "in", "signature": "a in I: RngElt, RngIdl -> BoolElt"}
  - {"name": "notin", "signature": "a notin I: RngElt, RngIdl -> BoolElt"}
  - {"name": "eq", "signature": "I eq J: RngIdl, RngIdl -> BoolElt"}
  - {"name": "ne", "signature": "I ne J: RngIdl, RngIdl -> BoolElt"}
  - {"name": "subset", "signature": "I subset J: RngIdl, RngIdl -> BoolElt"}
  - {"name": "notsubset", "signature": "I notsubset J: RngIdl, RngIdl -> BoolElt"}
---

# Ideals and Quotient Rings

The following entries describe the operations on ideals in a *commutative ring* $R$. Certain operations on left and right ideals in non-commutative rings will be described in the Chapters for the corresponding rings.

<a id="creation"></a>
<a id="rngintro-ideal"></a>
## Defining Ideals and Quotient Rings

<a id="constructor-constructor-ideal-rng-rngelt-rngelt-rngidl"></a>
### `ideal< R | a₁, ..., aᵣ >: Rng, RngElt, ..., RngElt -> RngIdl`

Given a ring $R$ and elements $a_1, \ldots, a_r$ of $R$, create the ideal $I$ of $R$ generated by $a_1, \ldots, a_r$.

<a id="constructor-constructor-quo-rng-rngelt-rngelt-rng"></a>
### `quo< R | aᵣ, ..., aᵣ >: Rng, RngElt, ..., RngElt -> Rng`

Given a ring $R$ and elements $a_1, \ldots, a_r$ of $R$, construct the quotient ring $Q = R/I$, where $I$ is the ideal of $R$ generated by $a_1, \ldots, a_r$.

<a id="operation-op-div-rng-rngidl"></a>
### `R / I: Rng, RngIdl -> Rng`

Given a ring $R$ and an ideal $I$ of $R$, construct the quotient ring $Q = R/I$, as well as the canonical map $R\rightarrow R/I$.

Note, however, that there can be pitfalls with this, particularly if the first argument is itself interpreted as an ideal, when instead the result could be interpreted as something like the `ColonIdeal`.

For instance:

```magma
> Z := Integers();
> I := ideal<Z|1>; // ideal of Z
> Z/I; // ideal quotient, similar to ColonIdeal
Integer Ring
> quo<Z|I>; // quotient of ring by ideal
Residue class ring of integers modulo 1
```

In fact, ${\mathbb{Z}}/I$ is computing the (fractional) ideal $J$ such that $JI={\mathbb{Z}}$. The technical reason for this is that both ${\mathbb{Z}}$ and $I$ are of type `RngInt`, and there is no specific `RngIntIdl` type as with order of number fields (where there are `RngOrd` and `RngOrdIdl`).

On the other hand, for instance for univariate polynomial rings where again there is no specific type for ideals, the `/` operator acts as the ring/ideal quotient (while `ColonIdeal` does not exist for this type, though it does for the multivariate polynomial ring type `RngMPol`).

```magma
> Zx<x> := PolynomialRing(Rationals());
> I := ideal<Zx|x>;
> Type(Zx),Type(I);
RngUPol RngUPol
> Zx/I; // same as quo<Zx|I>
Univariate Quotient Polynomial Algebra in over Rational Field
> Type(Zx/I);
RngUPolRes
```

<a id="function-powerideal-rng"></a>
### `PowerIdeal(R): Rng -> PowIdl`

The set of ideals of $R$. This is the parent of all ideals of $R$.

## Arithmetic Operations on Ideals

<a id="operation-op-plus-rngidl-rngidl"></a>
### `I + J: RngIdl, RngIdl -> RngIdl`

The sum of the ideals $I$ and $J$ of the ring $R$. This ideal consists of elements $a+b$, with $a\in I$ and $b\in J$. If $I$ is generated by $\{a_1, \ldots, a_k\}$ and $J$ is generated by $\{b_1, \ldots, b_m\}$, then $I+J$ is generated by $\{a_1, \ldots, a_k, b_1, \ldots, b_m\}$.

<a id="operation-op-times-rngidl-rngidl"></a>
### `I * J: RngIdl, RngIdl -> RngIdl`

The product of the ideals $I$ and $J$ of the ring $R$. This is the ideal generated by elements $a\cdot b$, with $a\in I$ and $b\in J$, and it consists of elements $a_1b_1+\cdots+a_nb_n$, with $a_i\in I$ and $b_j\in J$.

<a id="operation-op-meet-rngidl-rngidl"></a>
### `I meet J: RngIdl, RngIdl -> RngIdl`

The intersection of the ideals $I$ and $J$ of the ring $R$.

## Boolean Operators on Ideals

Throughout this subsection $I$ and $J$ are ideals belonging to the same integer ring $R$, while $a$ is an element of $R$.

<a id="operation-op-in-rngelt-rngidl"></a>
### `a in I: RngElt, RngIdl -> BoolElt`

Returns `true` if and only if the element $a$ is a member of the ideal $I$.

<a id="operation-op-notin-rngelt-rngidl"></a>
### `a notin I: RngElt, RngIdl -> BoolElt`

Returns `true` if and only if the element $a$ is not a member of the ideal $I$.

<a id="operation-op-eq-rngidl-rngidl"></a>
### `I eq J: RngIdl, RngIdl -> BoolElt`

Returns `true` if and only if the ideals $I$ and $J$ are equal.

<a id="operation-op-ne-rngidl-rngidl"></a>
### `I ne J: RngIdl, RngIdl -> BoolElt`

Returns `true` if and only if the ideals $I$ and $J$ are distinct.

<a id="operation-op-subset-rngidl-rngidl"></a>
### `I subset J: RngIdl, RngIdl -> BoolElt`

Returns `true` if and only if the ideal $I$ is contained in the ideal $J$.

<a id="operation-operation-notsubset-rngidl-rngidl-boolelt"></a>
### `I notsubset J: RngIdl, RngIdl -> BoolElt`

Returns `true` if and only if the ideal $I$ is not contained in the ideal $J$.
