---
title: "Module Elements"
canonical: "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/element.html"
source: "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/element.md"
part: "Representation Theory"
chapter: "Modules over an Algebra and Group Representations"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Representation Theory", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/index-representation-theory.md"}
  - {"title": "Modules over an Algebra and Group Representations", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/index-modules-over-an-algebra-and-group-representations.md"}
prev: {"title": "Group Representations", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/representation.md"}
next: {"title": "Submodules and Quotient Modules", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/submodules.md"}
intrinsics:
  - {"name": "elt", "signature": "elt< M | a₁, ..., aₙ >: ModRng, List -> ModRngElt"}
  - {"name": "!", "signature": "M ! Q: ModRng, [RngElt] -> ModRngElt"}
  - {"name": "Zero", "signature": "Zero(M): ModRng -> ModRngElt"}
  - {"name": "!", "signature": "M ! 0: ModRng, RngIntElt -> ModRngElt"}
  - {"name": "Random", "signature": "Random(M): ModRng -> ModRngElt"}
  - {"name": "ElementToSequence", "signature": "ElementToSequence(u): ModRngElt -> [RngElt]"}
  - {"name": "Eltseq", "signature": "Eltseq(u): ModRngElt -> [RngElt]"}
  - {"name": "*", "signature": "u * a: ModRngElt, AlgElt -> ModRngElt"}
  - {"name": "*", "signature": "u * g: ModGrpElt, GrpElt -> ModGrpElt"}
  - {"name": "+", "signature": "u + v: ModRngElt, ModRngElt -> ModRngElt"}
  - {"name": "-", "signature": "- u: ModRngElt -> ModRngElt"}
  - {"name": "-", "signature": "u - v: ModRngElt, ModRngElt -> ModRngElt"}
  - {"name": "*", "signature": "k * u: RngElt, ModRngElt -> ModRngElt"}
  - {"name": "*", "signature": "u * k: ModRngElt, RngElt -> ModRngElt"}
  - {"name": "/", "signature": "u / k: ModRngElt, RngElt -> ModRngElt"}
  - {"name": "u", "signature": "u[i]: ModRngElt, RngIntElt -> RngElt"}
  - {"name": "u[i] := x", "signature": "u[i] := x: ModRngElt, RngIntElt, RngElt -> ModRngElt"}
  - {"name": "IsZero", "signature": "IsZero(u): ModRngElt -> BoolElt"}
  - {"name": "Support", "signature": "Support(u): ModRngElt -> { RngIntElt }"}
---

# Module Elements

## Construction

<a id="constructor-constructor-elt-modrng-list-modrngelt"></a>
### `elt< M | a₁, ..., aₙ >: ModRng, List -> ModRngElt`

Given a module $M$ with underlying vector space $K^{(n)}$, and elements $a_1, \ldots, a_n$ belonging to $K$, construct the element $m = (a_1, \ldots, a_n)$ of $M$. Note that if $m$ is not an element of $M$, an error will result.

<a id="operation-op-modrng-rngelt"></a>
### `M ! Q: ModRng, [RngElt] -> ModRngElt`

Given the module $M$ with underlying vector space $K^n$, and a sequence $Q = [a_1, \ldots, a_n]$ with universe $K$, construct the element $m = (a_1, \ldots, a_n)$ of $M$. Note that if $m$ is not an element of $M$, an error will result.

<a id="function-zero-modrng"></a>
### `Zero(M): ModRng -> ModRngElt`

<a id="operation-op-modrng-rngintelt"></a>
### `M ! 0: ModRng, RngIntElt -> ModRngElt`

The zero element for the $A$-module $M$.

<a id="function-random-modrng"></a>
### `Random(M): ModRng -> ModRngElt`

Given a module $M$ defined over a finite ring or field, return a random vector.

## Deconstruction of Module Elements

<a id="function-elementtosequence-modrngelt"></a>
### `ElementToSequence(u): ModRngElt -> [RngElt]`

<a id="function-eltseq-modrngelt"></a>
### `Eltseq(u): ModRngElt -> [RngElt]`

Given an element $u$ belonging to the $A$-module $M$, return $u$ in the form of a sequence $Q$ of elements of $K$.

## Action of the Algebra on the Module

<a id="operation-op-times-modrngelt-algelt"></a>
### `u * a: ModRngElt, AlgElt -> ModRngElt`

Given a vector $u$ belonging to an $A$-module $M$, and an element $a \in A$ return the image of $u$ under the action of $a$.

<a id="operation-op-times-modgrpelt-grpelt"></a>
### `u * g: ModGrpElt, GrpElt -> ModGrpElt`

Given a vector $u$ belonging to an $K[G]$-module $M$, and an element $g$ belonging to the group $G$, return the image of $u$ under the action of $K[G]$ on the module $M$.

## Arithmetic with Module Elements

<a id="operation-op-plus-modrngelt-modrngelt"></a>
### `u + v: ModRngElt, ModRngElt -> ModRngElt`

Sum of the elements $u$ and $v$, where $u$ and $v$ lie in the same $A$-module $M$.

<a id="operation-operation-modrngelt-modrngelt"></a>
### `- u: ModRngElt -> ModRngElt`

Additive inverse of the element $u$.

<a id="operation-op-minus-modrngelt-modrngelt"></a>
### `u - v: ModRngElt, ModRngElt -> ModRngElt`

Difference of the elements $u$ and $v$, where $u$ and $v$ lie in the same $A$-module $M$.

<a id="operation-op-times-rngelt-modrngelt"></a>
### `k * u: RngElt, ModRngElt -> ModRngElt`

Given an element $u$ in an $A$-module $M$, where $A$ is a $K$-algebra and an element $k \in K$, return the scalar product $k * u$ as an element of $M$.

<a id="operation-op-times-modrngelt-rngelt"></a>
### `u * k: ModRngElt, RngElt -> ModRngElt`

Given an element $u$ in an $A$-module $M$, where $A$ is a $K$-algebra and an element $k \in K$, return the scalar product $u * k$ as an element of $M$.

<a id="operation-op-div-modrngelt-rngelt"></a>
### `u / k: ModRngElt, RngElt -> ModRngElt`

Given an element $u$ in an $A$-module $M$, where $A$ is a $K$-algebra and a non-zero element $k \in K$, return the scalar product $u * (1/k)$ as an element of $M$.

## Indexing

<a id="indexed-indexed-u-modrngelt-rngintelt-rngelt"></a>
### `u[i]: ModRngElt, RngIntElt -> RngElt`

Given an element $u$ belonging to a submodule $M$ of the $R$-module $R^{(n)}$ and a positive integer $i$, $1 \leq i\leq n$, return the $i$-th component of $u$ (as an element of the ring $R$).

<a id="literal-literal-u-i-x-modrngelt-rngintelt-rngelt-modrngelt"></a>
### `u[i] := x: ModRngElt, RngIntElt, RngElt -> ModRngElt`

Given an element $u$ belonging to a submodule $M$ of the $R$-module $T = R^{(n)}$, a positive integer $i$, $1 \leq i\leq n$, and an element $x$ of the ring $R$, redefine the $i$-th component of $u$ to be $x$. The parent of $u$ is changed to $T$ (since the modified element $u$ need not lie in $M$).

## Properties of Module Elements

<a id="function-iszero-modrngelt"></a>
### `IsZero(u): ModRngElt -> BoolElt`

Returns `true` if the element $u$ of the $A$-module $M$ is the zero element.

<a id="function-support-modrngelt"></a>
### `Support(u): ModRngElt -> { RngIntElt }`

A set of integers giving the positions of the non-zero components of the vector $u$.
