---
title: "Invariant Forms"
canonical: "https://docs.magma-maths.org/v2.30-1/FiniteGroups/MatrixGroupsOverQAndZ/forms.html"
source: "https://docs.magma-maths.org/v2.30-1/FiniteGroups/MatrixGroupsOverQAndZ/forms.md"
part: "Finite Groups"
chapter: "Matrix Groups over Q and Z"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Finite Groups", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/index-finite-groups.md"}
  - {"title": "Matrix Groups over Q and Z", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/MatrixGroupsOverQAndZ/index-matrix-groups-over-qand-z.md"}
prev: {"title": "Overview", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/MatrixGroupsOverQAndZ/Overview.md"}
next: {"title": "Endomorphisms", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/MatrixGroupsOverQAndZ/Endomorphisms.md"}
intrinsics:
  - {"name": "PositiveDefiniteForm", "signature": "PositiveDefiniteForm(G): GrpMat -> Mtrx"}
  - {"name": "InvariantForms", "signature": "InvariantForms(G): GrpMat -> [ AlgMatElt ]"}
  - {"name": "SymmetricForms", "signature": "SymmetricForms(G): GrpMat -> [ AlgMatElt ]"}
  - {"name": "AntisymmetricForms", "signature": "AntisymmetricForms(G): GrpMat -> [ AlgMatElt ]"}
  - {"name": "InvariantForms", "signature": "InvariantForms(G, n): GrpMat, RngIntElt -> [ AlgMatElt ]"}
  - {"name": "SymmetricForms", "signature": "SymmetricForms(G, n): GrpMat, RngIntElt -> [ AlgMatElt ]"}
  - {"name": "AntisymmetricForms", "signature": "AntisymmetricForms(G, n): GrpMat, RngIntElt -> [ AlgMatElt ]"}
  - {"name": "NumberOfInvariantForms", "signature": "NumberOfInvariantForms(G): GrpMat -> RngIntElt, RngIntElt"}
  - {"name": "NumberOfSymmetricForms", "signature": "NumberOfSymmetricForms(G): GrpMat -> RngIntElt"}
  - {"name": "NumberOfAntisymmetricForms", "signature": "NumberOfAntisymmetricForms(G): GrpMat -> RngIntElt"}
---

# Invariant Forms

Let $G$ be a finite matrix group $G < {\operatorname{GL}}_n({\mathbb{Q}})$. A matrix $F \in M_n({\mathbb{Q}})$ is $G$-invariant if $gFg^{tr} = F$ for all $g \in G$.

<a id="function-grpmatqz-positivedefiniteform"></a>
## `PositiveDefiniteForm(G): GrpMat -> Mtrx`

For a finite integral or rational matrix group $G$, return a positive definite symmetric $G$-invariant form.

<a id="function-invariantforms-grpmat"></a>
## `InvariantForms(G): GrpMat -> [ AlgMatElt ]`

<a id="function-symmetricforms-grpmat"></a>
## `SymmetricForms(G): GrpMat -> [ AlgMatElt ]`

<a id="function-antisymmetricforms-grpmat"></a>
## `AntisymmetricForms(G): GrpMat -> [ AlgMatElt ]`

For an integral or rational matrix group $G$, return a basis for the space of $G$-linear forms or for the subspace of (anti-) symmetric forms respectively.

The first form returned by `InvariantForms` and `SymmetricForms` will be positive definite.

<a id="function-invariantforms-grpmat-rngintelt"></a>
## `InvariantForms(G, n): GrpMat, RngIntElt -> [ AlgMatElt ]`

<a id="function-symmetricforms-grpmat-rngintelt"></a>
## `SymmetricForms(G, n): GrpMat, RngIntElt -> [ AlgMatElt ]`

<a id="function-antisymmetricforms-grpmat-rngintelt"></a>
## `AntisymmetricForms(G, n): GrpMat, RngIntElt -> [ AlgMatElt ]`

For an integral or rational matrix group $G$, return a sequence consisting of $n\geq 0$ $G$-invariant (symmetric or antisymmetric) bilinear forms for $G$.

<a id="function-numberofinvariantforms-grpmat"></a>
## `NumberOfInvariantForms(G): GrpMat -> RngIntElt, RngIntElt`

<a id="function-numberofsymmetricforms-grpmat"></a>
## `NumberOfSymmetricForms(G): GrpMat -> RngIntElt`

<a id="function-numberofantisymmetricforms-grpmat"></a>
## `NumberOfAntisymmetricForms(G): GrpMat -> RngIntElt`

For an integral or rational matrix group $G$ or a $G$-lattice $L$, return the dimension of the space of (symmetric or anti-symmetric) invariant bilinear forms for $G$.

The algorithm uses a modular method which is much faster than the actual computation of the forms.
