---
title: "Elements of Orders"
canonical: "https://docs.magma-maths.org/v2.30-1/Algebras/AssociativeAlgebras/elements.html"
source: "https://docs.magma-maths.org/v2.30-1/Algebras/AssociativeAlgebras/elements.md"
part: "Algebras"
chapter: "Associative 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": "Associative Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/AssociativeAlgebras/index-associative-algebras.md"}
prev: {"title": "Orders", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/AssociativeAlgebras/alg_ass_ord.md"}
next: {"title": "Ideals of Orders", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/AssociativeAlgebras/ideals.md"}
intrinsics:
  - {"name": "!", "signature": "O ! 0: AlgAssVOrd, RngIntElt -> AlgAssVOrdElt"}
  - {"name": "Zero", "signature": "Zero(O): AlgAssVOrd -> AlgAssVOrdElt"}
  - {"name": "!", "signature": "O ! 1: AlgAssVOrd, RngIntElt -> AlgAssVOrdElt"}
  - {"name": "One", "signature": "One(O): AlgAssVOrd -> AlgAssVOrdElt"}
  - {"name": ".", "signature": "O . i: AlgAssVOrd, RngIntElt -> AlgAssVElt"}
  - {"name": "!", "signature": "O ! x: AlgAssVOrd, Any -> AlgAssVOrdElt"}
  - {"name": "+", "signature": "x + y: AlgAssVOrdElt, AlgAssVOrdElt -> AlgAssVOrdElt"}
  - {"name": "-", "signature": "x - y: AlgAssVOrdElt, AlgAssVOrdElt -> AlgAssVOrdElt"}
  - {"name": "-", "signature": "- x: AlgAssVOrdElt -> AlgAssVOrdElt"}
  - {"name": "*", "signature": "x * y: AlgAssVOrdElt, AlgAssVOrdElt -> AlgAssVOrdElt"}
  - {"name": "*", "signature": "u * c: AlgAssVOrdElt, RngElt -> AlgAssVOrdElt"}
  - {"name": "*", "signature": "c * u: RngElt, AlgAssVOrdElt -> AlgAssVOrdElt"}
  - {"name": "/", "signature": "x / y: AlgAssVOrdElt, AlgAssVOrdElt -> AlgAssVElt"}
  - {"name": "div", "signature": "x div y: AlgAssVOrdElt, AlgAssVOrdElt -> AlgAssVOrdElt"}
  - {"name": "^", "signature": "x ^ n: AlgAssVOrdElt, RngIntElt -> AlgAssVOrdElt"}
  - {"name": "eq", "signature": "x eq y: AlgAssVOrdElt, AlgAssVOrdElt -> BoolElt"}
  - {"name": "ne", "signature": "x ne y: AlgAssVOrdElt, AlgAssVOrdElt -> BoolElt"}
  - {"name": "IsZero", "signature": "IsZero(x): AlgAssVOrdElt -> BoolElt"}
  - {"name": "IsUnit", "signature": "IsUnit(a): AlgAssVOrdElt -> BoolElt"}
  - {"name": "IsScalar", "signature": "IsScalar(x): AlgAssVOrdElt -> BoolElt, RngElt"}
  - {"name": "ElementToSequence", "signature": "ElementToSequence(x): AlgAssVOrdElt -> SeqEnum"}
  - {"name": "Eltseq", "signature": "Eltseq(x): AlgAssVOrdElt -> SeqEnum"}
  - {"name": "Norm", "signature": "Norm(x): AlgAssVOrdElt -> RngElt"}
  - {"name": "Trace", "signature": "Trace(x): AlgAssVOrdElt -> RngElt"}
  - {"name": "LeftRepresentationMatrix", "signature": "LeftRepresentationMatrix(e): AlgAssVOrdElt -> AlgMatElt"}
  - {"name": "RightRepresentationMatrix", "signature": "RightRepresentationMatrix(e): AlgAssVOrdElt -> AlgMatElt"}
  - {"name": "RepresentationMatrix", "signature": "RepresentationMatrix(a): AlgAssVOrdElt -> AlgMatElt"}
  - {"name": "CharacteristicPolynomial", "signature": "CharacteristicPolynomial(x): AlgAssVOrdElt -> RngUPolElt"}
  - {"name": "MinimalPolynomial", "signature": "MinimalPolynomial(x): AlgAssVOrdElt -> RngUPolElt"}
---

# Elements of Orders

## Construction of Elements

<a id="operation-op-algassvord-rngintelt"></a>
### `O ! 0: AlgAssVOrd, RngIntElt -> AlgAssVOrdElt`

<a id="function-zero-algassvord"></a>
### `Zero(O): AlgAssVOrd -> AlgAssVOrdElt`

The zero element of the associative order $O$.

<a id="operation-op-algassvord-rngintelt-2"></a>
### `O ! 1: AlgAssVOrd, RngIntElt -> AlgAssVOrdElt`

<a id="function-one-algassvord"></a>
### `One(O): AlgAssVOrd -> AlgAssVOrdElt`

The identity element of the associative order $O$.

<a id="operation-operation-algassvord-rngintelt-algassvelt"></a>
### `O . i: AlgAssVOrd, RngIntElt -> AlgAssVElt`

Given an associative order $O$ and an integer $i$, returns the $i$th basis element as an order over the base ring. Note that the element $1$ may or may not be the first element of a basis. These basis elements are returned as elements of the algebra of $O$ not as elements of $O$ itself.

<a id="operation-op-algassvord-any"></a>
### `O ! x: AlgAssVOrd, Any -> AlgAssVOrdElt`

Return an element of the associative order $O$ described by $x$, where $x$ may be a sequence, an element of an associative order, an element coercible into the coefficient ring of $O$ or into the algebra of $O$.

## Arithmetic of Elements

<a id="operation-op-plus-algassvordelt-algassvordelt"></a>
### `x + y: AlgAssVOrdElt, AlgAssVOrdElt -> AlgAssVOrdElt`

The sum of elements $x$ and $y$ of an order of an associative algebra.

<a id="operation-op-minus-algassvordelt-algassvordelt"></a>
### `x - y: AlgAssVOrdElt, AlgAssVOrdElt -> AlgAssVOrdElt`

The difference of elements $x$ and $y$ of an order of an associative algebra.

<a id="operation-operation-algassvordelt-algassvordelt"></a>
### `- x: AlgAssVOrdElt -> AlgAssVOrdElt`

The negation of element $x$ of an order of an associative algebra.

<a id="operation-op-times-algassvordelt-algassvordelt"></a>
### `x * y: AlgAssVOrdElt, AlgAssVOrdElt -> AlgAssVOrdElt`

The product of elements $x$ and $y$ of an associative algebra.

<a id="operation-op-times-algassvordelt-rngelt"></a>
### `u * c: AlgAssVOrdElt, RngElt -> AlgAssVOrdElt`

<a id="operation-op-times-rngelt-algassvordelt"></a>
### `c * u: RngElt, AlgAssVOrdElt -> AlgAssVOrdElt`

The product of the element $u$ of an associative order by the scalar $c$.

<a id="operation-op-div-algassvordelt-algassvordelt"></a>
### `x / y: AlgAssVOrdElt, AlgAssVOrdElt -> AlgAssVElt`

The quotient of $x$ by the unit $y$ in the parent algebra.

<a id="operation-operation-div-algassvordelt-algassvordelt-algassvordelt"></a>
### `x div y: AlgAssVOrdElt, AlgAssVOrdElt -> AlgAssVOrdElt`

The exact division of $x$ by $y$ in the order containing them.

<a id="operation-op-pow-algassvordelt-rngintelt"></a>
### `x ^ n: AlgAssVOrdElt, RngIntElt -> AlgAssVOrdElt`

The product of the element $x$ of an associative order with itself $n$ times.

## Predicates on Elements

<a id="operation-op-eq-algassvordelt-algassvordelt"></a>
### `x eq y: AlgAssVOrdElt, AlgAssVOrdElt -> BoolElt`

Returns `true` if and only if the elements $x$ and $y$ are equal.

<a id="operation-op-ne-algassvordelt-algassvordelt"></a>
### `x ne y: AlgAssVOrdElt, AlgAssVOrdElt -> BoolElt`

Returns `true` if and only if the elements $x$ and $y$ are not equal.

<a id="function-iszero-algassvordelt"></a>
### `IsZero(x): AlgAssVOrdElt -> BoolElt`

Return `true` if the element $x$ of an associative order is the zero element.

<a id="function-isunit-algassvordelt"></a>
### `IsUnit(a): AlgAssVOrdElt -> BoolElt`

Return `true` if the element $x$ of an associative order is a unit in that order.

<a id="function-isscalar-algassvordelt"></a>
### `IsScalar(x): AlgAssVOrdElt -> BoolElt, RngElt`

Returns `true` if and only if $x$ is an element of the base ring of the order containing it, and if so returns the coerced element.

## Other Operations with Elements

<a id="function-elementtosequence-algassvordelt"></a>
### `ElementToSequence(x): AlgAssVOrdElt -> SeqEnum`

<a id="function-eltseq-algassvordelt"></a>
### `Eltseq(x): AlgAssVOrdElt -> SeqEnum`

Given an element $x$ of an associative order $O$, returns the sequence of coordinates of $x$ in terms of the basis of $O$.

<a id="function-norm-algassvordelt"></a>
### `Norm(x): AlgAssVOrdElt -> RngElt`

The norm of the element $x$ of an order as an element of its parent algebra.

<a id="function-trace-algassvordelt"></a>
### `Trace(x): AlgAssVOrdElt -> RngElt`

The trace of the element $x$ of an order as an element of its parent algebra.

<a id="function-leftrepresentationmatrix-algassvordelt"></a>
### `LeftRepresentationMatrix(e): AlgAssVOrdElt -> AlgMatElt`

<a id="function-rightrepresentationmatrix-algassvordelt"></a>
### `RightRepresentationMatrix(e): AlgAssVOrdElt -> AlgMatElt`

The representation matrix describing left (right) multiplication by the element $e$ of an associative order.

<a id="function-representationmatrix-algassvordelt"></a>
### `RepresentationMatrix(a): AlgAssVOrdElt -> AlgMatElt`

```magma
Side: MonStgElt                    Default: "Left"
```

The representation matrix of the element $a$ of an associative order. This describes left multiplication unless the parameter `Side` is set to `"Right"`.

<a id="function-characteristicpolynomial-algassvordelt"></a>
### `CharacteristicPolynomial(x): AlgAssVOrdElt -> RngUPolElt`

The characteristic polynomial of the element $x$ of an order as an element of its parent algebra.

<a id="function-minimalpolynomial-algassvordelt"></a>
### `MinimalPolynomial(x): AlgAssVOrdElt -> RngUPolElt`

The minimal polynomial of the element $x$ of an order as an element of its parent algebra.
