# 67.46 GeneralOrthogonalGroup

`GeneralOrthogonalGroup(s, d, q)`
`O( s, d, q )`

This function returns the group of isometries fixing a non-degenerate quadratic form as matrix group. d specifies the dimension, q the size of the finite field, and s the sign of the quadratic form Q. If the dimension is odd, the sign must be 0. If the dimension is even the sign must be -1 or +1. The quadratic form Q used is returned in the component `quadraticForm`, the corresponding symmetric form beta is returned in the component `symmetricForm`.

Given the standard basis B = {e_1, ..., e_d} then `symmetricForm` is the matrix (f(e_i,e_j)), `quadraticForm` is an upper triangular matrix (q_{ij}) such that q_{ij} = f(e_i,e_j) for i < j, q_{ii} = Q(e_i), and q_{ij} = 0 for j < i, and the equations 2Q(e_i) = f(e_i,e_i) hold.

There are precisely two isometry classes of geometries in each dimension d. If d is even then the geometries are distinguished by the dimension of the maximal totally singular subspaces. If the sign s is +1, then the Witt defect of the underlying vector space is 0, i. e. the maximal totally singular subspaces have dimension <d>/2; if the sign is -1, the defect is 1, i.e. the dimension is <d>/2-1.

If d is odd then the geometries are distinguished by the discriminant of the quadratic form Q which is defined as the determinant of (f(e_i,e_j)) modulo (GF(q)^star)^2. The determinant of (f(e_i,e_j)) is not independent of B, whereas modulo squares it is. However, the two geometries are similar and give rise to isomorphic groups of isometries. `GeneralOrthogonalGroup` uses a quadratic form Q with discriminant -2^{d-2} modulo squares.

In case of odd dimension, q must also be odd because the group ```O( 0, 2d+1, 2^k )``` is isomorphic to the symplectic group `Sp( 2d, 2^k )` and you can use `SP` to construct it.

```    gap> G := GeneralOrthogonalGroup(0,5,3);
O(0,5,3)
gap> Size( G );
103680
gap> Size( SP(4,3) );
51840
gap> DeterminantMat(G.1);
Z(3)^0
gap> DeterminantMat(G.2);
Z(3) ```

vbox

```    gap> DisplayMat( G.symmetricForm );
. 1 . . .
1 . . . .
. . 2 . .
. . . 2 .
. . . . 2```

vbox

```     gap> DisplayMat( G.quadraticForm );
. 1 . . .
. . . . .
. . 1 . .
. . . 1 .
. . . . 1 ```

You can evaluate the quadratic form on a vector by multiplying it from both sides.

```    gap> v1 := [1,2,0,1,2] * Z(3);
[ Z(3), Z(3)^0, 0*Z(3), Z(3), Z(3)^0 ]
gap> v1 * G.quadraticForm * v1;
Z(3)^0
gap> v1 * G.symmetricForm * v1;
Z(3) ```

GAP 3.4.4
April 1997