[GAP Forum] Quaternion vs real algebras

Thomas Breuer thomas.breuer at math.rwth-aachen.de
Wed Dec 12 12:16:34 GMT 2007


Dear GAP Forum,

about two weeks ago,
Marek Mitros asked a question about dealing with matrices
over quaternion algebras.

> I want to define real lie algebra using quaternion matrices.
> How to do this ?
> See below code with example.
> It seems that there is no way in GAP to convert algebra over quaternions
> into algebra over reals (Rationals) !?

In private communication with Marek,
it turned out that the function `ComplexificationQuat' is sufficient for
the conversion in one direction.

For example, one can do the following.

    gap> H:= QuaternionAlgebra( Rationals );;
    gap> bh:= Basis( H );;
    gap> e:= bh[1];;
    gap> i:= bh[2];;
    gap> j:= bh[3];; 
    gap> k:= bh[4];;
    gap> z:= Zero( H );;
    gap> a1:= [ [z,i], [i,z] ];
    [ [ 0*e, i ], [ i, 0*e ] ]
    gap> c1:= ComplexificationQuat( a1 );
    [ [ 0, E(4), 0, 0 ], [ E(4), 0, 0, 0 ], [ 0, 0, 0, -E(4) ], 
      [ 0, 0, -E(4), 0 ] ]

The conversion in the other direction is currently not supported
by the GAP library,
but from the documentation of `ComplexificationQuat',
a simpleminded version could be written as follows.

    QuatMatrixFromComplexification:= function( mat, bas )
        local d, A11, A12, A21, A22, N1, N2, N3, N4;

        d:= Length( mat ) / 2;
        A11:= mat{ [ 1 .. d ] }{ [ 1 .. d ] };
        A12:= mat{ [ 1 .. d ] }{ [ d+1 .. 2*d ] };
        A21:= mat{ [ d+1 .. 2*d ] }{ [ 1 .. d ] };
        A22:= mat{ [ d+1 .. 2*d ] }{ [ d+1 .. 2*d ] };

        N1:= ( A11 + A22 ) / 2;
        N2:= E(4) * ( N1 - A11 );
        N3:= ( A12 - A21 ) / 2;
        N4:= E(4) * ( N3 - A12 );

        return bas[1] * N1 + bas[2] * N2 + bas[3] * N3 + bas[4] * N4;
    end;

Then for example the following works.

    gap> A:= H^[2,2];;
    gap> a1:= Random( A );;
    gap> a2:= Random( A );;
    gap> c1:= ComplexificationQuat( a1 );;
    gap> c2:= ComplexificationQuat( a2 );;
    gap> x:= LieBracket( c1, c2 );;
    gap> xx:= QuatMatrixFromComplexification( x, bh );;
    gap> ComplexificationQuat( xx ) = x;
    true

All the best,
Thomas



More information about the Forum mailing list