# Invariant Forms

Given a group $G$ which acts on a vector space $V$ over a finite field $F$, the space of all $G$-invariant bilinear forms is isomorphic to ${\operatorname{Hom}}_G(V,V^*)$, where $V^*$ is the dual space of $V$. The isomorphism associates the form $\beta$ to $\theta\in{\operatorname{Hom}}_G(V,V^*)$, where $\beta(u,v) = \langle v, u\theta \rangle$ and where $\langle v, \varphi \rangle$ denotes the action of $\varphi$ on $v$. If $v_1$, $v_2$, …, $v_n$ is a basis for $V$ with dual basis $\omega_1$, $\omega_2$, …, $\omega_n$, the matrix of $\theta$ with respect to these bases is $J = (\beta(e_i,e_j))$.

A linear transformation with matrix $A$ preserves the form if and only if $AJA^{\hbox{tr}} = J$.

If the characteristic of the field is not 2, then $J = {1\over2}(J+J^{\hbox{tr}}) + {1\over2}(J-J^{\hbox{tr}})$. Therefore, in this case, every $G$-invariant form is the sum of a $G$-invariant symmetric form and a $G$-invariant alternating form. If the characteristic of the field is 2, every alternating form is symmetric. Thus in this case the space of $G$-invariant alternating forms is a subspace of the space of $G$-invariant symmetric forms. If the $G$-module is irreducible these two spaces coincide.

## `InvariantBilinearForms(G): GrpMat -> SeqEnum[AlgMatElt], SeqEnum[AlgMatElt]`

Given a matrix group $G$ this function returns two sequences: a basis for the space of $G$-invariant symmetric forms and a basis for the space of $G$-invariant alternating forms.

## `Example: reducible (ex-246b09)`

In this example the group $G$ is reducible but (up to a scalar multiple) there is a unique $G$-invariant bilinear form.

```magma
> F<x> := GF(25);
> G := MatrixGroup< 4, F |
>    [ 1, 0, 0, 0,  0, 1, 0, 0,  0, x^14, 1, 0,  0, 0, 0, 1 ],
>    [ 3, x^23, x^20, x^10,  2, 3, 0, x^13,  4, x^10, x^13, x^23,
>      x^5, x^11, x, x^17 ] >;
> IsIrreducible(G);
false
> InvariantBilinearForms(G);
[]
[
    [   0    0    0    1]
    [   0    0    1    0]
    [   0    4    0    0]
    [   4    0    0    0]
]

```

If $G$ acts irreducibly on a vector space $V$ of dimension $n$ over a (finite) field $F$ and if $\theta_0 : V\to V^*$ is a $G$-invariant isomorphism, then $D \to {\operatorname{Hom}}_G(V,V^*) : \theta \mapsto \theta\theta_0$ is an isomorphism of vector spaces, where $D = {\operatorname{End}}_G(V)$. The algebra $D$ is a division ring and hence a field (since $F$ is finite). Thus $V$ becomes a vector space of dimension $m$ over $D$, where $n = m|D:F|$ and $G$ is isomorphic to a subgroup of ${\operatorname{GL}}(m,D)$.

## `Example: nonabs (ex-8559f1)`

If $G$ acts irreducibly on $V$, the spaces of symmetric and alternating $G$-invariant forms are isomorphic (as vector spaces) to subfields of ${\operatorname{End}}_G(V)$ and therefore their dimensions are either 0 or divide $\dim_F(V)$.

```magma
> F<a> := GF(25);
> G := MatrixGroup< 4, F |
>   [ a^10, a^21, a^4, 4,
>     a^16, 4, a^9, a^8,
>     a^20, 4, 4, a^13,
>     0, a^2, a^11, a ] >;
> IsIrreducible(G), #G;
true 626
> sym, alt := InvariantBilinearForms(G);
> #sym,#alt;
2 2

```

If the characteristic of the field is not two and if $J$ is a symmetric bilinear form there is a unique upper triangular matrix $Q$ such that $J = Q + Q^{\hbox{tr}}$.

On the other hand, if the characteristic is two and $J$ is alternating, the upper triangular matrices $Q$ such that $J = Q + Q^{\hbox{tr}}$ form an affine space of dimension $\dim V$.

Suppose that the characteristic is two. If $G$ preserves a symmetric bilinear form which is not alternating, then $G$ is reducible. Conversely, if $G$ is irreducible and if $J$ is the matrix of a symmetric form preserved by $G$, then the form must be alternating and there is a unique $G$-invariant quadratic form $Q$ such that $J = Q + Q^{\hbox{tr}}$.

## `InvariantQuadraticForms(G): GrpMat -> SeqEnum[AlgMatElt]`

A basis for the space of quadratic forms preserved by the irreducible matrix group $G$.

## `Example: invquadform (ex-e24e49)`

In the following example the quadratic forms which are invariant under the action of a cyclic group $H$ of order 13 form a vector space of dimension 3 over ${\bf F}_{4}$.

```magma
> F<z> := GF(4);
> H := MatrixGroup<6,F |
>     [ z, 0, z^2, z, z, 1,
>       1, z, 0, z, z, z,
>       0, z^2, z, 1, z^2, z^2,
>       z, 1, z, 1, 1, 0,
>       1, z^2, z, z, 0, 1,
>       1, 0, 1, 0, z^2, 1 ] >;
>
> InvariantQuadraticForms(H);
[
    [  1   1   0   1   0   0]
    [  0   0   1 z^2 z^2   z]
    [  0   0   1   0 z^2   z]
    [  0   0   0   0   0   z]
    [  0   0   0   0 z^2   z]
    [  0   0   0   0   0 z^2],

    [  1   0   1 z^2   1   0]
    [  0   z   1   1   1   z]
    [  0   0   z   0   1   0]
    [  0   0   0 z^2 z^2 z^2]
    [  0   0   0   0 z^2   1]
    [  0   0   0   0   0   1],

    [  0   0   0   0   0   1]
    [  0   0   0   0   1   0]
    [  0   0   1   1   0   0]
    [  0   0   0   z   0   0]
    [  0   0   0   0   0   0]
    [  0   0   0   0   0   0]
]

```

Given a group $G$ which acts on a vector space $V$ over a finite field $F$ with an automorphism $F \to F :a \mapsto \overline{a}$ of order $2$, the space of $G$-invariant sesquilinear forms is isomorphic to the space of $G$-invariant semilinear maps from $V$ to $V^*$; equivalently it is isomorphic to ${\operatorname{Hom}}_G(V, \overline{V}^*)$, where $\overline{V}^*$ is the semilinear dual of $V$, namely the space of all semilinear maps from $V$ to $F$.

If $\theta\in {\operatorname{Hom}}_G(V,\overline{V}^*)$, the corresponding sesquilinear form $\beta$ is defined by $\beta(u,v) = \langle v,u\theta\rangle$ where, as before, $\langle v, \varphi \rangle$ denotes the action of $\varphi$ on $v$.

## `SemilinearDual(M, mu): ModGrp, Map -> ModGrp`

The semilinear dual of the $G$-module $M$ with respect to the field automorphism `mu`.

## `InvariantSesquilinearForms(G): GrpMat -> SeqEnum[AlgMatElt]`

A basis for the space of *hermitian* forms preserved by the matrix group $G$.

## `Example: sesquiforms (ex-17b876)`

Let $F_0$ be the fixed field of the involution. The set $\cal H$ of $G$-invariant hermitian forms is a vector space over $F_0$ and if the characteristic of $F$ is not 2, then ${\operatorname{Hom}}_G(V,\overline{V}^*) \simeq {\cal H}\otimes_{F_0} F$.

```magma
> F<x> := GF(5,2);
> mu := hom< F->F | x :-> x^5 >;
> H := MatrixGroup< 5, F |
>    [ 0, x^3, 0, 1, x^9, x^8, 1, 0, x^11, x^7, x^20, x^16, 1,
>     x^11, x^3, x^21, 4, 1, x^3, x^23, x^4, x^3, x, x^3, 2 ] >;
> M := GModule(H);
> D := SemilinearDual(M,mu);
> E := AHom(M,D);
> Dimension(E);
5
> herm := InvariantSesquilinearForms(H);
> #herm;
5

```

## `Example: hermandalt (ex-9dd62c)`

If an irreducible group preserves both a bilinear and a sesquilinear form then it is realisable over a subfield of its base field. Conversely, this observation can be used to construct an example:

```magma
> F<x> := GF(81);
> H := MatrixGroup< 4, F | [ChangeRing(g,F) : g in Generators(Sp(4,9))]>;
> InvariantBilinearForms(H);
[]
[
    [   0    0    0    1]
    [   0    0    1    0]
    [   0    2    0    0]
    [   2    0    0    0]
]
> InvariantSesquilinearForms(H);
[
    [   0    0    0 x^45]
    [   0    0 x^45    0]
    [   0  x^5    0    0]
    [ x^5    0    0    0]
]

```

## `InvariantFormBases(G): GrpMat -> SeqEnum[AlgMatElt], SeqEnum[AlgMatElt], SeqEnum[AlgMatElt], SeqEnum[AlgMatElt]`

This function returns four sequences: bases for the spaces of symmetric, alternating, hermitian and quadratic forms preserved by the matrix group $G$.

## Semi-invariant Forms

Given a vector space $V$ over a finite field $F$ and a group $G$ which acts on $V$, a bilinear form $\beta : V\times V \to F$ is *semi-invariant* if for all $g\in G$ there is a scalar $\lambda(g)$ such that $\beta(ug,vg) = \lambda(g)\beta(u,v)$ for all $u,v\in V$. The function $\lambda : G \to F^\times$ is a homomorphism and its kernel contains the derived group of $G$. The *twisted dual* $V^*_\lambda$ of the $G$-module $V$ is the dual space of $V$ with $G$-action given by $\langle v, \varphi g\rangle = \lambda(g)\langle vg^{-1},\varphi\rangle$; thus if $A$ is the matrix of $g$ acting on $V$ the matrix of the action on $V_\lambda^*$ with respect to the dual basis is $\lambda(g)A^{-\hbox{tr}}$.

The space of all semi-invariant bilinear forms is isomorphic to ${\operatorname{Hom}}_G(V,V_\lambda^*)$. The isomorphism associates the form $\beta$ to $\theta\in{\operatorname{Hom}}_G(V,V_\lambda^*)$, where $\beta(u,v) = \langle v, u\theta \rangle$.

If $\beta$ is a bilinear form with matrix $J$, then the linear transformation $g$ with matrix $A$ preserves the form up to multiplication by $\lambda(g)$ if and only if $AJA^{\hbox{tr}} = \lambda(g)J$.

### `TwistedDual(M, lambda): ModGrp, Map -> ModGrp`

The twisted dual of the $G$-module M with respect to the linear character `lambda`.

### `SemiInvariantBilinearForms(G): GrpMat -> SeqEnum`

A sequence of triples $\langle L, S, A\rangle$ where $L$ is a sequence of field elements (one for each generator) which define a homomorphism from the matrix group $G$ to its base field and $S$ and $A$ are bases for the spaces of symmetric and alternating forms preserved by $G$ (up to multiplication by scalars).

### `SemiInvariantQuadraticForms(G): GrpMat -> SeqEnum`

A sequence of pairs $\langle L, Q\rangle$ where $L$ is a sequence of field elements (one for each generator) which define a homomorphism from the matrix group $G$ to its base field and $Q$ is a basis for the space of quadratic forms preserved by $G$ (up to multiplication by scalars).

### `TwistedSemilinearDual(M, lambda, mu): ModGrp, Map, Map -> ModGrp`

The twisted semilinear dual of the $G$-module $M$ with respect to the linear character $\lambda$ and the field automorphism $\mu$.

### `SemiInvariantSesquilinearForms(G): GrpMat -> SeqEnum`

A sequence of pairs $\langle L, H\rangle$ where $L$ is a sequence of field elements (one for each generator) which define a homomorphism from the matrix group $G$ to the field $F_0$, where the base field of $G$ is a quadratic extension of $F_0$, and $H$ is a basis for the space of hermitian forms preserved by $G$ (up to multiplication by scalars).

### `Example: semiinv (ex-f6ba6b)`

In this example $H$ is a normal subgroup of the absolutely irreducible group $N$ an $H$ is irreducible but not absolutely irreducible.

```magma
> F<x> := GF(3,2);
> H := MatrixGroup<3,F|
>   [x^2,x^7,x^3, x,0,1, x^3,x^6,2],
>   [x^3, 0, 0, 0, x^3, 0, 0, 0, x^3 ] >;
> N := MatrixGroup<3,F|H.1,H.2,[x^5,x^5,2, 0,x^2,x^6, x^7,x^7,2]>;
> IsNormal(N,H);
true
> IsIrreducible(H), IsAbsolutelyIrreducible(H);
true false
> IsIrreducible(N), IsAbsolutelyIrreducible(N);
true true
> SemiInvariantSesquilinearForms(H);
[
    <[ 1, 2 ],
    [
        [  1   x   x]
        [x^3   0 x^3]
        [x^3   x   1],

        [  0 x^3   x]
        [  x   0 x^5]
        [x^3 x^7   0],

        [  0   0   1]
        [  0   1   0]
        [  1   0   0]
    ]>
]
> SemiInvariantSesquilinearForms(N);
[
    <[ 1, 2, 1 ],
    [
        [  0   0   1]
        [  0   1   0]
        [  1   0   0]
    ]>
]

```
