---
title: "Element Operations"
canonical: "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/CharactersOfFiniteGroups/element.html"
source: "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/CharactersOfFiniteGroups/element.md"
part: "Representation Theory"
chapter: "Characters of Finite Groups"
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": "Characters of Finite Groups", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/CharactersOfFiniteGroups/index-characters-of-finite-groups.md"}
prev: {"title": "Character Ring Operations", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/CharactersOfFiniteGroups/ring.md"}
next: {"title": "The Schur Index", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/CharactersOfFiniteGroups/schur-index.md"}
intrinsics:
  - {"name": "+", "signature": "+ y: AlgChtrElt -> AlgChtrElt"}
  - {"name": "-", "signature": "- y: AlgChtrElt -> AlgChtrElt"}
  - {"name": "+", "signature": "x + y: AlgChtrElt, AlgChtrElt -> AlgChtrElt"}
  - {"name": "-", "signature": "x - y: AlgChtrElt, AlgChtrElt -> AlgChtrElt"}
  - {"name": "*", "signature": "x * y: AlgChtrElt, AlgChtrElt -> AlgChtrElt"}
  - {"name": "*", "signature": "a * x: FldCycElt, AlgChtrElt -> AlgChtrElt"}
  - {"name": "^", "signature": "x ^ j: AlgChtrElt, RngIntElt -> AlgChtrElt"}
  - {"name": "in", "signature": "x in y: AlgChtrElt, AlgChtrElt -> BoolElt"}
  - {"name": "notin", "signature": "x notin y: AlgChtrElt, AlgChtrElt -> BoolElt"}
  - {"name": "in", "signature": "a in F: FldFunElt, FldFun -> BoolElt"}
  - {"name": "notin", "signature": "a notin F: FldFunElt, FldFun -> BoolElt"}
  - {"name": "eq", "signature": "x eq y: AlgChtrElt, AlgChtrElt -> BoolElt"}
  - {"name": "ne", "signature": "x ne y: AlgChtrElt, AlgChtrElt -> BoolElt"}
  - {"name": "IsCharacter", "signature": "IsCharacter(x): AlgChtrElt -> BoolElt"}
  - {"name": "IsGeneralizedCharacter", "signature": "IsGeneralizedCharacter(x): AlgChtrElt -> BoolElt"}
  - {"name": "IsIrreducible", "signature": "IsIrreducible(x): AlgChtrElt -> BoolElt"}
  - {"name": "IsLinear", "signature": "IsLinear(x): AlgChtrElt -> BoolElt"}
  - {"name": "IsFaithful", "signature": "IsFaithful(x): AlgChtrElt -> BoolElt"}
  - {"name": "IsReal", "signature": "IsReal(x): AlgChtrElt -> BoolElt"}
  - {"name": "IsOne", "signature": "IsOne(x): AlgChtrElt -> BoolElt"}
  - {"name": "IsMinusOne", "signature": "IsMinusOne(x): AlgChtrElt -> BoolElt"}
  - {"name": "IsZero", "signature": "IsZero(x): AlgChtrElt -> BoolElt"}
  - {"name": "IsPermutationCharacter", "signature": "IsPermutationCharacter(c): AlgChtrElt -> BoolElt"}
  - {"name": "T[i]", "signature": "T[i]: TabChtr, RngIntElt -> AlgChtrElt"}
  - {"name": "T[i][j]", "signature": "T[i][j]: TabChtr, RngIntElt, RngIntElt -> FldCycElt"}
  - {"name": "#", "signature": "# T: SeqEnum -> RngIntElt"}
  - {"name": "x(g)", "signature": "x(g): AlgChtrElt, GrpElt -> FldCycElt"}
  - {"name": "@", "signature": "g @ x: GrpElt, AlgChtrElt -> FldCycElt"}
  - {"name": "x[i]", "signature": "x[i]: AlgChtrElt, RngIntElt -> FldCycElt"}
  - {"name": "#", "signature": "# x: AlgChtrElt -> RngIntElt"}
  - {"name": "^", "signature": "x ^ g: AlgChtrElt, GrpElt -> AlgChtrElt"}
  - {"name": "^", "signature": "x ^ H: AlgChtrElt, Grp -> { AlgChtrElt }"}
  - {"name": "GaloisConjugate", "signature": "GaloisConjugate(x, j): AlgChtrElt, RngIntElt -> AlgChtrElt"}
  - {"name": "GaloisOrbit", "signature": "GaloisOrbit(x): AlgChtrElt -> { AlgChtrElt }"}
  - {"name": "IsConjugate", "signature": "IsConjugate(x, y): AlgChtrElt, AlgChtrElt -> BoolElt, RngIntElt"}
  - {"name": "ClassPowerCharacter", "signature": "ClassPowerCharacter(x, j): AlgChtrElt, RngIntElt -> AlgChtrElt"}
  - {"name": "Degree", "signature": "Degree(x): AlgChtrElt -> RngIntElt"}
  - {"name": "InnerProduct", "signature": "InnerProduct(x, y): AlgChtrElt, AlgChtrElt -> FldCycElt"}
  - {"name": "Order", "signature": "Order(x): AlgChtrElt -> RngIntElt"}
  - {"name": "Norm", "signature": "Norm(x): AlgChtrElt -> FldCycElt"}
  - {"name": "Schur", "signature": "Schur(x, k): AlgChtrElt, RngIntElt -> FldCycElt"}
  - {"name": "Indicator", "signature": "Indicator(x): AlgChtrElt -> FldCycElt"}
  - {"name": "StructureConstant", "signature": "StructureConstant(G, i, j, k): Grp, RngIntElt, RngIntElt, RngIntElt -> RngIntElt"}
examples:
  - "ex-cd3c30"
---

# Element Operations

## Arithmetic

In the list of arithmetic operations below $x$ and $y$ denote class functions in the same ring, and $a$ denotes a scalar, which is any element coercible into a cyclotomic field. Also, $j$ denotes an integer.

<a id="operation-operation-algchtrelt-algchtrelt"></a>
### `+ y: AlgChtrElt -> AlgChtrElt`

<a id="operation-operation-algchtrelt-algchtrelt-2"></a>
### `- y: AlgChtrElt -> AlgChtrElt`

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

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

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

<a id="operation-op-times-fldcycelt-algchtrelt"></a>
### `a * x: FldCycElt, AlgChtrElt -> AlgChtrElt`

<a id="operation-op-pow-algchtrelt-rngintelt"></a>
### `x ^ j: AlgChtrElt, RngIntElt -> AlgChtrElt`

## Predicates and Booleans

The following Boolean-valued functions are available. Note that with the exception of `in`, `notin`, `IsReal`, and `IsFaithful`, these functions use the table of irreducible characters, which will be created if it is not yet available.

<a id="operation-op-in-algchtrelt-algchtrelt"></a>
### `x in y: AlgChtrElt, AlgChtrElt -> BoolElt`

Returns `true` if the inner product of class functions $x$ and $y$ is non-zero, otherwise `false`. If $x$ is irreducible and $y$ is a character, this tests whether or not $x$ is a constituent of $y$.

<a id="operation-op-notin-algchtrelt-algchtrelt"></a>
### `x notin y: AlgChtrElt, AlgChtrElt -> BoolElt`

Returns `true` if the inner product of class functions $x$ and $y$ is zero, otherwise `false`. If $x$ is irreducible and $y$ is a character, this tests whether or not $x$ is not a constituent of $y$. Returns `true` if the character $x$ is not a constituent of the character $y$, otherwise `false`.

<a id="operation-op-in-fldfunelt-fldfun"></a>
### `a in F: FldFunElt, FldFun -> BoolElt`

<a id="operation-op-notin-fldfunelt-fldfun"></a>
### `a notin F: FldFunElt, FldFun -> BoolElt`

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

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

<a id="function-ischaracter-algchtrelt"></a>
### `IsCharacter(x): AlgChtrElt -> BoolElt`

Returns `true` if the class function $x$ is a character, otherwise `false`. A class function is a character if and only if all inner products with the irreducible characters are non-negative integers.

<a id="function-isgeneralizedcharacter-algchtrelt"></a>
### `IsGeneralizedCharacter(x): AlgChtrElt -> BoolElt`

Returns `true` if the class function $x$ is a generalized character, otherwise `false`. A class function is a generalized character if and only if all inner products with the irreducible characters are integers.

<a id="function-isirreducible-algchtrelt"></a>
### `IsIrreducible(x): AlgChtrElt -> BoolElt`

Returns `true` if the character $x$ is an irreducible character, otherwise `false`.

<a id="function-islinear-algchtrelt"></a>
### `IsLinear(x): AlgChtrElt -> BoolElt`

Returns `true` if the character $x$ is a linear character, otherwise `false`.

<a id="function-isfaithful-algchtrelt"></a>
### `IsFaithful(x): AlgChtrElt -> BoolElt`

Returns `true` if the character $x$ is faithful, i.e. has trivial kernel, otherwise `false`.

<a id="function-isreal-algchtrelt"></a>
### `IsReal(x): AlgChtrElt -> BoolElt`

Returns `true` if the character $x$ is a real character, i.e. takes real values on all of the classes of $G$, otherwise `false`.

<a id="function-isone-algchtrelt"></a>
### `IsOne(x): AlgChtrElt -> BoolElt`

<a id="function-isminusone-algchtrelt"></a>
### `IsMinusOne(x): AlgChtrElt -> BoolElt`

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

<a id="function-ispermutationcharacter-algchtrelt"></a>
### `IsPermutationCharacter(c): AlgChtrElt -> BoolElt`

Test if a character $c$ of $G$ is a virtual permutation character, that is ${\mathbb{C}}[X]-{\mathbb{C}}[Y]$ for some $G$-sets $X$ and $Y$. (The implementation relies on `BurnsideCokernel`, and does not compute the subgroup lattice.)

<a id="example-ex-cd3c30"></a>
### `Example: Testing for Permutation Characters (ex-cd3c30)`

In a symmetric group $S_n$ every character is a virtual permutation character, but not in the quaternion group $Q_8$.

```magma
> C:=CharacterTable(Group("S5"));
> [IsPermutationCharacter(c): c in C];
[ true, true, true, true, true, true, true ]
> C:=CharacterTable(Group("Q8"));
> [IsPermutationCharacter(c): c in C];
[ true, true, true, true, false ]
```

## Accessing Class Functions

In this subsection $T$ is a character table, and $x$ is any class function. A character table is an enumerated sequence of characters that has a special print function attached. In particular, its entries can be accessed with the ordinary sequence indexing operations.

<a id="literal-literal-t-i-tabchtr-rngintelt-algchtrelt"></a>
### `T[i]: TabChtr, RngIntElt -> AlgChtrElt`

Given the table $T$ of ordinary characters of $G$, return the $i$-th character of $G$, where $i$ is an integer in the range $[1...k]$.

<a id="literal-literal-t-i-j-tabchtr-rngintelt-rngintelt-fldcycelt"></a>
### `T[i][j]: TabChtr, RngIntElt, RngIntElt -> FldCycElt`

The value of the $i$-th irreducible character (from the character table $T$) on the $j$-th conjugacy class of $G$.

<a id="operation-operation-seqenum-rngintelt"></a>
### `# T: SeqEnum -> RngIntElt`

Given a character table $T$ (or any sequence of characters), return the number of entries.

<a id="literal-x-algchtrelt-grpelt"></a>
### `x(g): AlgChtrElt, GrpElt -> FldCycElt`

<a id="operation-operation-grpelt-algchtrelt-fldcycelt"></a>
### `g @ x: GrpElt, AlgChtrElt -> FldCycElt`

The value of the class function $x$ on the element $g$ of $G$.

<a id="literal-literal-x-i-algchtrelt-rngintelt-fldcycelt"></a>
### `x[i]: AlgChtrElt, RngIntElt -> FldCycElt`

The value of the class function $x$ on the $i$-th conjugacy class of $G$.

<a id="operation-operation-algchtrelt-rngintelt"></a>
### `# x: AlgChtrElt -> RngIntElt`

Given a class function $x$ on $G$ return its length (which equals the number of conjugacy classes of the group $G$).

## Conjugation of Class Functions

<a id="operation-op-pow-algchtrelt-grpelt"></a>
### `x ^ g: AlgChtrElt, GrpElt -> AlgChtrElt`

Given a class function $x$ on a normal subgroup $N$ of the group $G$, and an element $g$ of $G$, construct the conjugate class function $x^g$ of $x$ which is defined as follows: $x^g(n) = x( g^{-1}ng)$, for all $n$ in $N$.

<a id="operation-op-pow-algchtrelt-grp"></a>
### `x ^ H: AlgChtrElt, Grp -> { AlgChtrElt }`

Given a class function $x$ on a normal subgroup $N$ of the group $G$, and a subgroup $H$ of $G$, construct the sequence of conjugates of $x$ under the action of the subgroup $H$. The action of an element of $H$ on $x$ is that defined for $x^g$.

<a id="function-galoisconjugate-algchtrelt-rngintelt"></a>
### `GaloisConjugate(x, j): AlgChtrElt, RngIntElt -> AlgChtrElt`

Let ${\mathbb{Q}}(x)$ be the subfield of ${\mathbb{Q}(\zeta_m)}$ generated by ${\mathbb{Q}}$ and the values of the $G$-character $x$. This function returns the Galois conjugate $x^j$ of $x$ under the action of the element of the Galois group ${\operatorname{Gal}}({\mathbb{Q}}(x)/{\mathbb{Q}})$ determined by the integer $j$. The integer $j$ must be coprime to $m$.

<a id="function-galoisorbit-algchtrelt"></a>
### `GaloisOrbit(x): AlgChtrElt -> { AlgChtrElt }`

Let ${\mathbb{Q}}(x)$ be the subfield of ${\mathbb{Q}(\zeta_m)}$ generated by ${\mathbb{Q}}$ and the values of the $G$-character $x$. This function returns the sequence of Galois conjugates of $x$ under the action of the Galois group ${\operatorname{Gal}}({\mathbb{Q}}(x)/{\mathbb{Q}})$.

<a id="function-isconjugate-algchtrelt-algchtrelt"></a>
### `IsConjugate(x, y): AlgChtrElt, AlgChtrElt -> BoolElt, RngIntElt`

Determine if $x$ and $y$ are galois conjugate characters. Return `false` if not. If so, return `true`, and $j$ such that `GaloisConjugate(x, j)` is $y$.

<a id="function-classpowercharacter-algchtrelt-rngintelt"></a>
### `ClassPowerCharacter(x, j): AlgChtrElt, RngIntElt -> AlgChtrElt`

Given a class function $x$ on the group $G$ and a positive integer $j$, construct the class function $x^j$ which is defined as follows: $x^j(g) = x(g^j)$.

## Functions Returning a Scalar

<a id="function-degree-algchtrelt"></a>
### `Degree(x): AlgChtrElt -> RngIntElt`

The degree of the class function $x$, i.e. the value of $x$ on the identity element of $G$.

<a id="function-innerproduct-algchtrelt-algchtrelt"></a>
### `InnerProduct(x, y): AlgChtrElt, AlgChtrElt -> FldCycElt`

The inner product of the class functions $x$ and $y$, where $x$ and $y$ are class functions belonging to the same character ring.

<a id="function-order-algchtrelt"></a>
### `Order(x): AlgChtrElt -> RngIntElt`

Given a linear character of the group $G$, determine the order of $x$ as an element of the group of linear characters of $G$.

<a id="function-norm-algchtrelt"></a>
### `Norm(x): AlgChtrElt -> FldCycElt`

Norm of the class function $x$ (which is the inner product with itself).

<a id="function-schur-algchtrelt-rngintelt"></a>
### `Schur(x, k): AlgChtrElt, RngIntElt -> FldCycElt`

<a id="function-indicator-algchtrelt"></a>
### `Indicator(x): AlgChtrElt -> FldCycElt`

Given class function $x$ and a positive integer $k$, return the generalised Frobenius–Schur indicator which is defined as follows: Suppose $g$ is some element of $G$, and set $T_k(g) = \vert\{ h\in G | h^k = g\}\vert$. The value of `Schur(x, k)` is the coefficient $a_x$ in the expression $T_k = \sum_{ x\in{\operatorname{Irr}}(G)} a_x x$.

The call `Indicator(x)` is equivalent to `Schur(x,2)`.

<a id="function-structureconstant-grp-rngintelt-rngintelt-rngintelt"></a>
### `StructureConstant(G, i, j, k): Grp, RngIntElt, RngIntElt, RngIntElt -> RngIntElt`

The structure constant $a_{i,j,k}$ for the centre of the group algebra of the group $G$. If $K_i$ is the formal sum of the elements of the $i$-th conjugacy class, $a_{i,j,k}$ is defined by the equation $K_i * K_j = \sum_k a_{i,j,k} * K_k$.
