---
title: "Generic Operations"
canonical: "https://docs.magma-maths.org/v2.30-1/Algebras/NonAssociativeAlgebras/Generics-for-nonassociative-algebras.html"
source: "https://docs.magma-maths.org/v2.30-1/Algebras/NonAssociativeAlgebras/Generics-for-nonassociative-algebras.md"
part: "Algebras"
chapter: "Non–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": "Non–Associative Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/NonAssociativeAlgebras/index-non-associative-algebras.md"}
prev: {"title": "Invariants", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/NonAssociativeAlgebras/Invariants-of-nonassociative-algebras.md"}
next: {"title": "Bibliography", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/NonAssociativeAlgebras/bibliography.md"}
intrinsics:
  - {"name": "IsStarAlgebra", "signature": "IsStarAlgebra(A): AlgGen -> BoolElt"}
  - {"name": "Star", "signature": "Star(A): AlgGen -> Map"}
  - {"name": "GenericMinimalPolynomial", "signature": "GenericMinimalPolynomial(x): AlgGenElt -> FldElt"}
  - {"name": "GenericNorm", "signature": "GenericNorm(x): AlgGenElt -> FldElt"}
  - {"name": "GenericTrace", "signature": "GenericTrace(x): AlgGenElt -> FldElt"}
  - {"name": "GenericTracelessSubspaceBasis", "signature": "GenericTracelessSubspaceBasis(A): AlgGen -> Any"}
examples:
  - "ex-ffb750"
  - "ex-099024"
---

# Generic Operations

## Nonassociative Algebras with Involutions

<a id="function-isstaralgebra-alggen"></a>
### `IsStarAlgebra(A): AlgGen -> BoolElt`

Decides if algebra has an involution, i.e. a $*$-algebra.

<a id="function-star-alggen"></a>
### `Star(A): AlgGen -> Map`

Returns involution of given $*$-algebra.

<a id="example-ex-ffb750"></a>
### `Example: Involutions of an Octonion Algebra (ex-ffb750)`

We demonstrate the functions dealing with involutions of nonassociative algebras.

```magma
> A := OctonionAlgebra(Rationals(),-1,-1,-1);
> IsStarAlgebra(A);
true
>
> s := Star(A);
> A.1; // A.1 is the mult. id.
(1 0 0 0 0 0 0 0)
> A.1 @ s;
(1 0 0 0 0 0 0 0)
>
> A.2;
(0 1 0 0 0 0 0 0)
> A.2 @ s;
( 0 -1  0  0  0  0  0  0)
```

## Operations on Power Associative Algebras

The following operations are defined for nonassociative algebras for which $x*(x*x)=(x*x)*x$.

<a id="function-genericminimalpolynomial-alggenelt"></a>
### `GenericMinimalPolynomial(x): AlgGenElt -> FldElt`

The generic minimum polynomial of an element in a power associative algebra.

<a id="function-genericnorm-alggenelt"></a>
### `GenericNorm(x): AlgGenElt -> FldElt`

The generic norm of an element in a power associative algebra.

<a id="function-generictrace-alggenelt"></a>
### `GenericTrace(x): AlgGenElt -> FldElt`

The generic trace of an element in a power associative algebra.

<a id="function-generictracelesssubspacebasis-alggen"></a>
### `GenericTracelessSubspaceBasis(A): AlgGen -> Any`

Given a power associative algebra return a basis for the elements of generic trace 0.

<a id="example-ex-099024"></a>
### `Example: Generic Trace of a Quaternion (ex-099024)`

The trace $x+\bar{x}$ of a quaternion doubles the rational component, producing degenerate behavior in characteristic $2$. The generic trace avoids this.

```magma
> Q := QuaternionAlgebra(Rationals(), 1,1);
> Trace(Q!1);
2
> GenericTrace(Q!1);
1
> Q := QuaternionAlgebra(GF(2), 1,1);
> Trace(Q!1);
0
> GenericTrace(Q!1);
1
```

The generic minimum polynomial of an element $x$ in power associative algebra need only be a factor of the minimal polynomial of its right regular matrix $yR_x:=x*y$.

```magma
> J := ExceptionalJordanCSA(GF(5));
> p := GenericMinimumPolynomial(J.3+J.12);
> Rx := AsMatrices(Tensor(J), 2,0);     // yR_x = y*x.
> q := MinimalPolynomial(Rx[3]+Rx[12]);
> Degree(p);
3
> Degree(q);
6
> q mod p;
0
```
