.. _SectRefGrpRfl:

.. _reflections:

Construction of Pseudo- reflections
===================================

Let :math:`V` be a vector space of dimension :math:`n` over a field :math:`F`.
As defined in Bourbaki :cite:`BourbakiLie`, a *pseudo-reflection* in
Magma is a linear transformation of :math:`V` whose space of fixed points is a
subspace of dimension :math:`n-1`, namely a hyperplane. (Some authors require a
pseudo-reflection to be invertible and diagonalisable.)

A reflection, as defined above, is a pseudo-reflection and so too is a
transvection. The Magma package described in this chapter includes code for the
construction of transvections but the emphasis is on groups generated by
reflections.

If :math:`r` is a pseudo-reflection, then :math:`\dim(\im(1-r)) = 1` and a basis
element of :math:`\im(1-r)` is called a *root* of :math:`r`.

Let :math:`a` be a root of the pseudo-reflection :math:`r` and let
:math:`H = \ker(1-r)` be the hyperplane of fixed points of :math:`r`. For all
:math:`v\in V` there exists :math:`\phi(v) \in F` such that
:math:`v - vr = \phi(v)a`. Then :math:`\phi\in V^*` and :math:`\ker\phi = H`.
This means that every pseudo-reflection has the form

.. math:: vr = v - \phi(v)a

and its determinant is :math:`1-\phi(a)`. The linear functional :math:`\phi` is
a *coroot* of :math:`r`.

:math:`\bullet` If :math:`\phi(a) = 1`, then :math:`r` is not invertible; it is
the *projection* of :math:`V` onto :math:`H` along :math:`a`.

:math:`\bullet` If :math:`\phi(a) = 0` (equivalently, :math:`a\in H`), then
:math:`r` is by definition a *transvection*.

:math:`\bullet` If :math:`\phi(a) \ne 0,1`, then :math:`r` is called a
*reflection*. For the most part we consider only reflections of finite order,
but not necessarily of order two.

In “ both :math:`V` and its dual space :math:`V^*` are identified with the space
:math:`F^n` of row vectors of length :math:`n` and the standard bilinear pairing
between :math:`V` and :math:`V^*` is :math:`(a,b) \mapsto ab^\tr`, where
:math:`b^\tr` denotes the column vector which is the *transpose* of :math:`b`.

The row vector :math:`b` which represents the coroot :math:`\phi` is also called
a *coroot* of the pseudo-reflection; it is uniquely determined by :math:`r` and
:math:`a`. The matrix of :math:`r` is

.. math:: I - b^\tr a

and, in particular, :math:`ar = (1-ab^\tr)a`. Thus :math:`r` is a reflection of
finite order :math:`d` if and only if :math:`ab^\tr \ne 0, 1` and
:math:`1-ab^\tr` is a :math:`d`-th root of unity.

.. magma:function:: PseudoReflection(a, b)
   :input_types: ModTupRngElt, ModTupRngElt
   :output_types: AlgMatElt
   :label: PseudoReflection_ModTupRngElt_ModTupRngElt

   The matrix of the pseudo-reflection with root :math:`a` and coroot :math:`b`.

.. magma:function:: Transvection(a, b)
   :input_types: ModTupRngElt, ModTupRngElt
   :output_types: AlgMatElt
   :label: Transvection_ModTupRngElt_ModTupRngElt

   The matrix of the transvection with root :math:`a` and coroot :math:`b`. The
   input is checked to ensure that the root and coroot define a transvection.

.. magma:function:: Reflection(a, b)
   :input_types: ModTupRngElt, ModTupRngElt
   :output_types: AlgMatElt
   :label: Reflection_ModTupRngElt_ModTupRngElt

   The matrix of the reflection with root :math:`a` and coroot :math:`b`. The input
   is checked to ensure that the root and coroot define a reflection.

.. magma:function:: IsPseudoReflection(r)
   :input_types: Mtrx
   :output_types: BoolElt, ModTupRngElt, ModTupRngElt
   :label: IsPseudoReflection_Mtrx

   Returns ``true`` if :math:`r` is the matrix of a pseudo-reflection, in which
   case a root and a coroot are returned as well.

.. magma:function:: IsTransvection(r)
   :input_types: Mtrx
   :output_types: BoolElt, ModTupRngElt, ModTupRngElt
   :label: IsTransvection_Mtrx

   Returns ``true`` if :math:`r` is the matrix of a transvection, in which case a
   root and a coroot are returned as well.

.. magma:function:: IsReflection(r)
   :input_types: Mtrx
   :output_types: BoolElt, ModTupRngElt, ModTupRngElt
   :label: IsReflection_Mtrx

   Returns ``true`` if :math:`r` is the matrix of a reflection, in which case a
   root and a coroot are returned as well.

.. magma:function:: IsReflectionGroup(G)
   :input_types: GrpMat
   :output_types: BoolElt
   :label: IsReflectionGroup_GrpMat

Strict : BoolElt : ``true``

The default action is to return ``true`` if every generator of :math:`G` is a
reflection. If ``Strict`` is ``false``, the function checks if :math:`G` can be
generated by *some* of its reflections, not necessarily those returned by
``Generators(G)``.

.. magma:example:: Example: pseudoreflection
   :label: pseudoreflection

   Create a pseudo-reflection directly and then check that it is a transvection.

   .. code-block:: magma

      > V := VectorSpace(GF(5), 3);
      > t := PseudoReflection(V![1,0,0],V![0,1,0]);                                  
      > t;            
      [1 0 0]
      [4 1 0]
      [0 0 1]
      > IsTransvection(t);
      true (1 0 0)
      (0 1 0)
      > IsReflection(t);
      false
      %%a> assert not $1;

.. magma:example:: Example: Ref Group
   :label: ref-group

   An example of a group which can be generated by reflections even though not
   every given generator is a reflection.

   To find reflection generators for this group we look for a reflection which,
   together with the reflection :math:`r`, generates :math:`G`. (This is a rather
   special example; not every finite reflection group of rank two can be generated
   by two reflections.)

   .. code-block:: magma

      > F<omega> := CyclotomicField(3);
      > r := Matrix(F,2,2,[1,omega^2,0,omega]);
      > IsReflection(r);
      true (         0 -omega + 1)
      (1/3*(2*omega + 1)                 1)
      > s := Matrix(F,2,2,[0,-1,1,0]);
      > IsReflection(s);
      false
      %%a> assert not $1;
      > G := MatrixGroup<2,F | r,s >;
      > IsReflectionGroup(G);
      false
      %%a> assert not $1;
      > IsReflectionGroup(G : Strict := false);
      true
      %%a> assert $1;
      > #G;
      24
      %%a> assert $1 eq 24;
      > exists(t){ t : t in G | IsReflection(t) and G eq sub<G|r,t> };
      true
      %%a> assert $1;
      > t;
      [        0 omega + 1]
      [        1    -omega]

.. magma:example:: Example: transvections
   :label: transvections

   The groups :math:`{\operatorname{SL}}(n,q)` are generated by transvections. To
   illustrate this we find representatives for the conjugacy classes of
   :math:`{\operatorname{GL}}(3,25)` which are transvections and then check that
   the normal closure is :math:`{\operatorname{SL}}(3,25)`.

   .. code-block:: magma

      > G := GL(3,25);
      > ccl := Classes(G);
      > T := [ c : c in ccl | IsTransvection(c[3]) ];
      > #T;
      1
      %%a> assert $1 eq 1;
      > t := T[1][3]; t;
      [     1      0      0]
      [     0      1      1]
      [     0      0      1]
      > S := ncl< G | t >;
      > S eq SL(3,25);
      true
      %%a> assert $1;

.. _SubsectGrpRflForms:

.. _reflections-forms:

Pseudo-reflections Preserving  Reflexive Forms
----------------------------------------------

Let :math:`J` be the matrix of a non-degenerate reflexive bilinear or
sesquilinear form :math:`\beta` on the vector space :math:`V` over a field
:math:`F`. Then :math:`\beta` is either a symmetric, alternating or hermitian
form.

We may assume that :math:`F` is equipped with an automorphism :math:`\sigma`
such that :math:`\sigma^2 = 1`. If :math:`\beta` is a symmetric or alternating
form, :math:`\sigma` is the identity; if :math:`\beta` is hermitian, the order
of :math:`\sigma :\alpha \mapsto \bar\alpha` is two and :math:`J = \bar J^\tr`.
If :math:`a` is the row vector :math:`(\alpha_1,\alpha_2,\dots,\alpha_n)`,
define
:math:`\sigma(a) = (\sigma(\alpha_1),\sigma(\alpha_2),\dots,\sigma(\alpha_n))`.

If :math:`a` is a root of a pseudo-reflection :math:`r` and if :math:`r`
preserves :math:`\beta`, then the coroot of :math:`r` is
:math:`\alpha \sigma(a) J^\tr` for some :math:`\alpha\in F`. Thus the matrix of
:math:`r` is :math:`I-\alpha J^\tr\sigma(a)^\tr a`.

.. magma:function:: SymplecticTransvection(a, alpha)
   :input_types: ModTupRngElt, FldElt
   :output_types: AlgMatElt
   :label: SymplecticTransvection_ModTupRngElt_FldElt

   The symplectic transvection with root :math:`a` and multiplier :math:`\alpha`
   with respect to the form attached to the parent of :math:`a`. If the form is not
   alternating a runtime error is generated.

   If :math:`\beta` is a non-degenerate alternating form preserved by a
   pseudo-reflection :math:`r`, then the dimension of :math:`V` is even and
   :math:`r` must be a transvection. If :math:`a` is a root of :math:`r`, the
   coroot is :math:`\alpha aJ^\tr` and the matrix of :math:`r` is
   :math:`I - \alpha J a^\tr a`, for some :math:`\alpha\ne 0` in :math:`F`.

.. magma:function:: UnitaryTransvection(a, alpha)
   :input_types: ModTupRngElt, FldElt
   :output_types: AlgMatElt
   :label: UnitaryTransvection_ModTupRngElt_FldElt

   The unitary transvection with root :math:`a` and multiplier :math:`\alpha` with
   respect to the hermitian form attached to the parent of :math:`a`.

   The matrix of the unitary transvection is :math:`I - \alpha J\bar a^\tr a`,
   where :math:`a` is isotropic and the trace of :math:`\alpha` is :math:`0`; that
   is, :math:`a J \bar a^\tr = 0` and :math:`\alpha + \bar\alpha = 0`.

   A runtime error is generated if the form is not hermitian, if :math:`a` is not
   isotropic, or if the trace of :math:`\alpha` is not :math:`0`.

.. magma:function:: UnitaryReflection(a, zeta)
   :input_types: ModTupRngElt, FldElt
   :output_types: AlgMatElt
   :label: UnitaryReflection_ModTupRngElt_FldElt

   The unitary reflection with root :math:`a` and determinant :math:`\zeta`, where
   :math:`\zeta` is a root of unity. The reflection preserves the hermitian form
   attached to the ambient space of :math:`a` and sends :math:`a` to
   :math:`\zeta a`.

   In the case of a unitary reflection :math:`r` with matrix
   :math:`I-\alpha J^\tr\sigma(a)^\tr a`, the root :math:`a` must be non-isotropic
   and :math:`ar = \zeta a`, where :math:`\zeta` is a root of unity. Therefore,
   :math:`\alpha = (1-\zeta)/aJ\bar a^\tr`.

   The vector :math:`a^\vee = \bar\alpha a` is the *coroot* of :math:`a` and the
   definition of :math:`r` becomes

   .. math:: v r = v - \beta(v,a^\vee)a.

.. magma:function:: OrthogonalReflection(a)
   :input_types: ModTupFldElt
   :output_types: AlgMatElt
   :label: OrthogonalReflection_ModTupFldElt

   The reflection determined by a non-singular vector :math:`a` of a quadratic
   space.

   A *quadratic space* is a vector space :math:`V` equipped with a quadratic form
   :math:`Q` (see Chapter :ref:`AlgClff` for more details). The *polar
   form* of :math:`Q` is the symmetric bilinear form
   :math:`\beta(u,v) = Q(u+v)-Q(u)-Q(v)`. Thus :math:`\beta(v,v) = 2Q(v)` and
   therefore, if the characteristic of :math:`F` is not two, :math:`Q` is uniquely
   determined by :math:`\beta`.

   If :math:`a` is non-singular (that is, :math:`Q(a) \ne 0`), the formula

   .. math:: vr = v - Q(a)^{-1}\beta(v,a)a

   defines a pseudo-reflection. If the characteristic of :math:`F` is 2, this is a
   transvection; in all other cases it is a reflection. However, in characteristic
   2 there is a certain ambivalence in the literature and the pseudo-reflections
   just defined are often called reflections.

   The *coroot* of :math:`a` is :math:`a^\vee = Q(a)^{-1}a`. If the characteristic
   of :math:`F` is not two, then :math:`a^\vee = 2a/\beta(a,a)` and this coincides
   with the usual notion of coroot, as found in :cite:`HumphreysRefl`,
   for example. In particular, if :math:`\beta(u,v)` is the standard inner product
   :math:`(u,v) = uv^\tr`, then the inner product and the pairing between :math:`V`
   and its dual are essentially the same and the concepts of coroot and coroot
   coincide.

.. magma:example:: Example: Unitary Transvection
   :label: unitary-transvection

   We create an hermitian space by attaching an hermitian form :math:`J` to a
   vector space :math:`V` over a field with complex conjugation. The vector
   :math:`a = (1,0,0,0)` is isotropic with respect to this form and therefore we
   can use it to create a unitary transvection.

   Continuing the previous example we note that :math:`b = (1,1,1,1)` is
   non-isotropic and we create a unitary reflection of order 4 with :math:`b` as
   root.

   .. code-block:: magma

      > K<i> := CyclotomicField( 4 );
      > sigma := hom< K -> K | x :-> ComplexConjugate(x) >; 
      > J := Matrix(4,4,[K|0,0,0,1, 0,0,1,0, 0,1,0,0, 1,0,0,0]);
      > V := UnitarySpace(J,sigma);
      > a := V![1,0,0,0];
      > t := UnitaryTransvection(a,i);
      > t;
      [ 1  0  0  0]
      [ 0  1  0  0]
      [ 0  0  1  0]
      [-i  0  0  1]
      > b := V![1,1,1,1];
      > InnerProduct(b,b);
      4
      %%a> assert $1 eq 4;
      > r := UnitaryReflection(b,i);
      > r, Eigenvalues(r);
      [1/4*(i + 3) 1/4*(i - 1) 1/4*(i - 1) 1/4*(i - 1)]
      [1/4*(i - 1) 1/4*(i + 3) 1/4*(i - 1) 1/4*(i - 1)]
      [1/4*(i - 1) 1/4*(i - 1) 1/4*(i + 3) 1/4*(i - 1)]
      [1/4*(i - 1) 1/4*(i - 1) 1/4*(i - 1) 1/4*(i + 3)]
      {
          <i, 1>,
          <1, 3>
      }
