Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->1<!-- %% -->2<!-- %W algvspc.tex GAP documentation Thomas Breuer -->3<!-- %% -->4<!-- %H @(#)<M>Id: algvspc.tex,v 4.22 2002/10/04 09:19:52 gap Exp </M> -->5<!-- %% -->6<!-- %Y Copyright (C) 1997, Lehrstuhl D für Mathematik, RWTH Aachen, Germany -->7<!-- %% -->8<Chapter Label="Vector Spaces and Algebras">9<Heading>Vector Spaces and Algebras</Heading>1011This chapter contains an introduction into vector spaces and12algebras in &GAP;.131415<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->16<Section Label="Vector Spaces">17<Heading>Vector Spaces</Heading>18<P/>19A <E>vector space</E> over the field <M>F</M> is an additive group20that is closed under scalar multiplication with elements in <M>F</M>.21In &GAP;, only those domains that are22constructed as vector spaces are regarded as vector spaces.23In particular, an additive group that does not know about an24acting domain of scalars is not regarded as a vector space in &GAP;.25<P/>26Probably the most common <M>F</M>-vector spaces in &GAP; are so-called27<E>row spaces</E>.28They consist of row vectors, that is, lists whose elements lie in <M>F</M>.29In the following example we compute the vector space spanned by the30row vectors <C>[ 1, 1, 1 ]</C> and <C>[ 1, 0, 2 ]</C> over the rationals.31<P/>32<Example><![CDATA[33gap> F:= Rationals;;34gap> V:= VectorSpace( F, [ [ 1, 1, 1 ], [ 1, 0, 2 ] ] );35<vector space over Rationals, with 2 generators>36gap> [ 2, 1, 3 ] in V;37true38]]></Example>39<P/>40The full row space <M>F^n</M> is created by commands like:41<P/>42<Example><![CDATA[43gap> F:= GF( 7 );;44gap> V:= F^3; # The full row space over F of dimension 3.45( GF(7)^3 )46gap> [ 1, 2, 3 ] * One( F ) in V;47true48]]></Example>49<P/>50In the same way we can also create matrix spaces. Here the short notation51<C><A>field</A>^[<A>dim1</A>,<A>dim2</A>]</C> can be used:52<P/>53<Example><![CDATA[54gap> m1:= [ [ 1, 2 ], [ 3, 4 ] ];; m2:= [ [ 0, 1 ], [ 1, 0 ] ];;55gap> V:= VectorSpace( Rationals, [ m1, m2 ] );56<vector space over Rationals, with 2 generators>57gap> m1+m2 in V;58true59gap> W:= Rationals^[3,2];60( Rationals^[ 3, 2 ] )61gap> [ [ 1, 1 ], [ 2, 2 ], [ 3, 3 ] ] in W;62true63]]></Example>64<P/>65A field is naturally a vector space over itself.66<P/>67<Example><![CDATA[68gap> IsVectorSpace( Rationals );69true70]]></Example>71<P/>72If <M>\Phi</M> is an algebraic extension of <M>F</M>, then <M>\Phi</M> is73also a vector space over <M>F</M>74(and indeed over any subfield of <M>\Phi</M> that contains <M>F</M>).75This field <M>F</M> is stored in the attribute76<Ref Func="LeftActingDomain" BookName="ref"/>.77In &GAP;, the default is to view fields as vector spaces78over their <E>prime</E> fields.79By the function <Ref Func="AsVectorSpace" BookName="ref"/>,80we can view fields as vector spaces over fields other than the prime field.81<P/>82<Example><![CDATA[83gap> F:= GF( 16 );;84gap> LeftActingDomain( F );85GF(2)86gap> G:= AsVectorSpace( GF( 4 ), F );87AsField( GF(2^2), GF(2^4) )88gap> F = G;89true90gap> LeftActingDomain( G );91GF(2^2)92]]></Example>93<P/>94A vector space has three important attributes:95its <E>field</E> of definition,96its <E>dimension</E> and a <E>basis</E>.97We already encountered the function98<Ref Func="LeftActingDomain" BookName="ref"/> in the example above.99It extracts the field of definition of a vector space.100The function <Ref Func="Dimension" BookName="ref"/> provides the dimension101of the vector space.102<P/>103<Example><![CDATA[104gap> F:= GF( 9 );;105gap> m:= [ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, Z(3)^0 ] ];;106gap> V:= VectorSpace( F, m );107<vector space over GF(3^2), with 2 generators>108gap> Dimension( V );1092110gap> W:= AsVectorSpace( GF( 3 ), V );111<vector space over GF(3), with 4 generators>112gap> V = W;113true114gap> Dimension( W );1154116gap> LeftActingDomain( W );117GF(3)118]]></Example>119<P/>120One of the most important attributes is a <E>basis</E>.121For a given basis <M>B</M> of <M>V</M>,122every vector <M>v</M> in <M>V</M> can be expressed uniquely as123<M>v = \sum_{b \in B} c_b b</M>, with coefficients <M>c_b \in F</M>.124<P/>125In &GAP;, bases are special lists of vectors.126They are used mainly for the computation of coefficients and linear127combinations.128<P/>129Given a vector space <M>V</M>, a basis of <M>V</M> is obtained by130simply applying the function <Ref Func="Basis" BookName="ref"/> to <M>V</M>.131The vectors that form the basis are extracted from the basis by132<Ref Func="BasisVectors" BookName="ref"/>.133<P/>134<Example><![CDATA[135gap> m1:= [ [ 1, 2 ], [ 3, 4 ] ];; m2:= [ [ 1, 1 ], [ 1, 0 ] ];;136gap> V:= VectorSpace( Rationals, [ m1, m2 ] );137<vector space over Rationals, with 2 generators>138gap> B:= Basis( V );139SemiEchelonBasis( <vector space over Rationals, with1402 generators>, ... )141gap> BasisVectors( Basis( V ) );142[ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 0, 1 ], [ 2, 4 ] ] ]143]]></Example>144<P/>145The coefficients of146a vector relative to a given basis are found by the function147<Ref Func="Coefficients" BookName="ref"/>.148Furthermore, linear combinations of the basis vectors149are constructed using <Ref Func="LinearCombination" BookName="ref"/>.150<P/>151<Example><![CDATA[152gap> V:= VectorSpace( Rationals, [ [ 1, 2 ], [ 3, 4 ] ] );153<vector space over Rationals, with 2 generators>154gap> B:= Basis( V );155SemiEchelonBasis( <vector space over Rationals, with1562 generators>, ... )157gap> BasisVectors( Basis( V ) );158[ [ 1, 2 ], [ 0, 1 ] ]159gap> Coefficients( B, [ 1, 0 ] );160[ 1, -2 ]161gap> LinearCombination( B, [ 1, -2 ] );162[ 1, 0 ]163]]></Example>164<P/>165In the above examples we have seen that &GAP; often chooses the basis166it wants to work with. It is also possible to construct bases with167prescribed basis vectors by giving a list of these vectors as second argument168to <Ref Func="Basis" BookName="ref"/>.169<P/>170<Example><![CDATA[171gap> V:= VectorSpace( Rationals, [ [ 1, 2 ], [ 3, 4 ] ] );;172gap> B:= Basis( V, [ [ 1, 0 ], [ 0, 1 ] ] );173SemiEchelonBasis( <vector space over Rationals, with 2 generators>,174[ [ 1, 0 ], [ 0, 1 ] ] )175gap> Coefficients( B, [ 1, 2 ] );176[ 1, 2 ]177]]></Example>178<P/>179We can construct subspaces and quotient spaces of vector spaces. The180natural projection map (constructed by181<Ref Func="NaturalHomomorphismBySubspace" BookName="ref"/>),182connects a vector space with its quotient space.183<P/>184<Example><![CDATA[185gap> V:= Rationals^4;186( Rationals^4 )187gap> W:= Subspace( V, [ [ 1, 2, 3, 4 ], [ 0, 9, 8, 7 ] ] );188<vector space over Rationals, with 2 generators>189gap> VmodW:= V/W;190( Rationals^2 )191gap> h:= NaturalHomomorphismBySubspace( V, W );192<linear mapping by matrix, ( Rationals^4 ) -> ( Rationals^2 )>193gap> Image( h, [ 1, 2, 3, 4 ] );194[ 0, 0 ]195gap> PreImagesRepresentative( h, [ 1, 0 ] );196[ 1, 0, 0, 0 ]197]]></Example>198199</Section>200201202<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->203<Section Label="Algebras">204<Heading>Algebras</Heading>205206If a multiplication is defined for the elements of a vector space,207and if the vector space is closed under this multiplication then it is208called an <E>algebra</E>. For example, every field is an algebra:209<P/>210<Example><![CDATA[211gap> f:= GF(8); IsAlgebra( f );212GF(2^3)213true214]]></Example>215<P/>216One of the most important classes of algebras are sub-algebras of matrix217algebras. On the set of all <M>n \times n</M> matrices over a field <M>F</M>218it is possible to define a multiplication in many ways.219The most frequent are the ordinary matrix multiplication and the Lie220multiplication.221<P/>222Each matrix constructed as <M>[ <A>row1</A>, <A>row2</A>, \ldots ]</M>223is regarded by &GAP; as an <E>ordinary</E> matrix,224its multiplication is the ordinary associative matrix multiplication.225The sum and product of two ordinary matrices are again ordinary matrices.226<P/>227The <E>full</E> matrix associative algebra can be created as follows:228<P/>229<Example><![CDATA[230gap> F:= GF( 9 );;231gap> A:= F^[3,3];232( GF(3^2)^[ 3, 3 ] )233]]></Example>234<P/>235An algebra can be constructed from generators using the function236<Ref Func="Algebra" BookName="ref"/>.237It takes as arguments the field of coefficients and a list of generators.238Of course the coefficient field and the generators must fit together;239if we want to construct an algebra of ordinary matrices,240we may take the field generated by the entries of the generating matrices,241or a subfield or extension field.242<P/>243<Example><![CDATA[244gap> m1:= [ [ 1, 1 ], [ 0, 0 ] ];; m2:= [ [ 0, 0 ], [ 0, 1 ] ];;245gap> A:= Algebra( Rationals, [ m1, m2 ] );246<algebra over Rationals, with 2 generators>247]]></Example>248<P/>249An interesting class of algebras for which many special algorithms250are implemented is the class of <E>Lie algebras</E>.251They arise for example as algebras of matrices whose product is defined252by the Lie bracket <M>[ A, B ] = A * B - B * A</M>,253where <M>*</M> denotes the ordinary matrix product.254<P/>255Since the multiplication of objects in &GAP; is always assumed to be256the operation <C>*</C> (resp. the infix operator <C>*</C>),257and since there is already the <Q>ordinary</Q> matrix product defined for258ordinary matrices, as mentioned above,259we must use a different construction for matrices that occur as elements260of Lie algebras.261Such Lie matrices can be constructed by262<Ref Func="LieObject" BookName="ref"/> from ordinary matrices,263the sum and product of Lie matrices are again Lie matrices.264<P/>265<Example><![CDATA[266gap> m:= LieObject( [ [ 1, 1 ], [ 1, 1 ] ] );267LieObject( [ [ 1, 1 ], [ 1, 1 ] ] )268gap> m*m;269LieObject( [ [ 0, 0 ], [ 0, 0 ] ] )270gap> IsOrdinaryMatrix( m1 ); IsOrdinaryMatrix( m );271true272false273gap> IsLieMatrix( m1 ); IsLieMatrix( m );274false275true276]]></Example>277<P/>278Given a field <C>F</C> and a list <C>mats</C> of Lie objects over <C>F</C>,279we can construct the Lie algebra generated by <C>mats</C> using the function280<Ref Func="Algebra" BookName="ref"/>.281Alternatively, if we do not want to be bothered with the function282<Ref Func="LieObject" BookName="ref"/>,283we can use the function <Ref Func="LieAlgebra" BookName="ref"/>284that takes a field285and a list of ordinary matrices, and constructs the Lie algebra generated286by the corresponding Lie matrices.287Note that this means that the ordinary matrices used in the call of288<Ref Func="LieAlgebra" BookName="ref"/> are not contained in the returned289Lie algebra.290<P/>291<Example><![CDATA[292gap> m1:= [ [ 0, 1 ], [ 0, 0 ] ];;293gap> m2:= [ [ 0, 0 ], [ 1, 0 ] ];;294gap> L:= LieAlgebra( Rationals, [ m1, m2 ] );295<Lie algebra over Rationals, with 2 generators>296gap> m1 in L;297false298]]></Example>299<P/>300A second way of creating an algebra is by specifying a multiplication table.301Let <M>A</M> be a finite dimensional algebra with basis302<M>(x_1, x_2, \ldots, x_n)</M>,303then for <M>1 \leq i, j \leq n</M> the product <M>x_i x_j</M> is304a linear combination of basis elements, i.e., there are <M>c_{ij}^k</M> in the305ground field such that306<M>x_i x_j = \sum_{k=1}^n c_{ij}^k x_k.</M>307It is not difficult to show that the constants <M>c_{ij}^k</M>308determine the multiplication completely. Therefore, the <M>c_{ij}^k</M> are309called <E>structure constants</E>. In &GAP; we can create a finite dimensional310algebra by specifying an array of structure constants.311<P/>312In &GAP; such a table of structure constants is represented using313lists. The obvious way to do this314would be to construct a <Q>three-dimensional</Q> list <C>T</C> such that315<C>T[i][j][k]</C> equals <M>c_{ij}^k</M>.316But it often happens that many of these constants vanish.317Therefore a more complicated structure is used in order to be able to318omit the zeros.319A multiplication table of an <M>n</M>-dimensional algebra is an320<M>n \times n</M> array <C>T</C> such that <C>T[i][j]</C> describes the product321of the <C>i</C>-th and the <C>j</C>-th basis element. This product is encoded322in the following way. The entry <C>T[i][j]</C> is a list of two elements.323The first of these is a list of324indices <M>k</M> such that <M>c_{ij}^k</M> is nonzero.325The second list contains the corresponding constants <M>c_{ij}^k</M>.326Suppose, for example, that <C>S</C> is the table327of an algebra with basis <M>(x_1, x_2, \ldots, x_8)</M> and that <C>S[3][7]</C>328equals <C>[ [ 2, 4, 6 ], [ 1/2, 2, 2/3 ] ]</C>.329Then in the algebra we have the relation330<M>x_3 x_7 = (1/2) x_2 + 2 x_4 + (2/3) x_6.</M>331Furthermore, if <C>S[6][1] = [ [ ], [ ] ]</C> then the product of the332sixth and first basis elements is zero.333<P/>334Finally two numbers are added to the table. The first number can be3351, -1, or 0. If it is 1, then the table is known to be symmetric,336i.e., <M>c_{ij}^k = c_{ji}^k</M>. If this number is -1, then the table is337known to be antisymmetric (this happens for instance when the algebra338is a Lie algebra).339The remaining case, 0, occurs in all other cases.340The second number that is added is the zero element of the field over341which the algebra is defined.342<P/>343Empty structure constants tables are created by the function344<Ref Func="EmptySCTable" BookName="ref"/>, which takes a dimension <M>d</M>,345a zero element <M>z</M>,346and optionally one of the strings <C>"symmetric"</C>, <C>"antisymmetric"</C>,347and returns an empty structure constants table <M>T</M> corresponding to348a <M>d</M>-dimensional algebra over a field with zero element <M>z</M>.349Structure constants can be entered into the table <M>T</M> using the function350<Ref Func="SetEntrySCTable" BookName="ref"/>.351It takes four arguments, namely <M>T</M>, two indices <M>i</M> and <M>j</M>,352and a list of the form353<M>[ c_{ij}^{{k_1}}, k_1, c_{ij}^{{k_2}}, k_2, \ldots ]</M>.354In this call to <C>SetEntrySCTable</C>,355the product of the <M>i</M>-th and the <M>j</M>-th basis vector356in any algebra described by <M>T</M> is set to357<M>\sum_l c_{ij}^{{k_l}} x_{{k_l}}</M>.358(Note that in the empty table, this product was zero.)359If <M>T</M> knows that it is (anti)symmetric, then at the same time also360the product of the <M>j</M>-th and the <M>i</M>-th basis vector is set361appropriately.362<P/>363In the following example we temporarily increase the line length limit from364its default value 80 to 82 in order to make the long output expression fit365into one line.366<P/>367<Example><![CDATA[368gap> T:= EmptySCTable( 2, 0, "symmetric" );369[ [ [ [ ], [ ] ], [ [ ], [ ] ] ],370[ [ [ ], [ ] ], [ [ ], [ ] ] ], 1, 0 ]371gap> SetEntrySCTable( T, 1, 2, [1/2,1,1/3,2] ); T;372[ [ [ [ ], [ ] ], [ [ 1, 2 ], [ 1/2, 1/3 ] ] ],373[ [ [ 1, 2 ], [ 1/2, 1/3 ] ], [ [ ], [ ] ] ], 1, 0 ]374]]></Example>375<P/>376If we have defined a structure constants table, then we can construct377the corresponding algebra by378<Ref Func="AlgebraByStructureConstants" BookName="ref"/>.379<P/>380<Example><![CDATA[381gap> A:= AlgebraByStructureConstants( Rationals, T );382<algebra of dimension 2 over Rationals>383]]></Example>384<P/>385If we know that a structure constants table defines a Lie algebra,386then we can construct the corresponding Lie algebra by387<Ref Func="LieAlgebraByStructureConstants" BookName="ref"/>;388the algebra returned by this function knows that it is a Lie algebra,389so &GAP; need not check the Jacobi identity.390<P/>391<Example><![CDATA[392gap> T:= EmptySCTable( 2, 0, "antisymmetric" );;393gap> SetEntrySCTable( T, 1, 2, [2/3,1] );394gap> L:= LieAlgebraByStructureConstants( Rationals, T );395<Lie algebra of dimension 2 over Rationals>396]]></Example>397<P/>398In &GAP; an algebra is naturally a vector space. Hence all the functionality399for vector spaces is also available for algebras.400<P/>401<Example><![CDATA[402gap> F:= GF(2);;403gap> z:= Zero( F );; o:= One( F );;404gap> T:= EmptySCTable( 3, z, "antisymmetric" );;405gap> SetEntrySCTable( T, 1, 2, [ o, 1, o, 3 ] );406gap> SetEntrySCTable( T, 1, 3, [ o, 1 ] );407gap> SetEntrySCTable( T, 2, 3, [ o, 3 ] );408gap> A:= AlgebraByStructureConstants( F, T );409<algebra of dimension 3 over GF(2)>410gap> Dimension( A );4113412gap> LeftActingDomain( A );413GF(2)414gap> Basis( A );415CanonicalBasis( <algebra of dimension 3 over GF(2)> )416]]></Example>417<P/>418Subalgebras and ideals of an algebra can be constructed by specifying419a set of generators for the subalgebra or ideal. The quotient space420of an algebra by an ideal is naturally an algebra itself.421<P/>422In the following example we temporarily increase the line length limit from423its default value 80 to 81 in order to make the long output expression fit424into one line.425<P/>426<Example><![CDATA[427gap> m:= [ [ 1, 2, 3 ], [ 0, 1, 6 ], [ 0, 0, 1 ] ];;428gap> A:= Algebra( Rationals, [ m ] );;429gap> subA:= Subalgebra( A, [ m-m^2 ] );430<algebra over Rationals, with 1 generators>431gap> Dimension( subA );4322433gap> idA:= Ideal( A, [ m-m^3 ] );434<two-sided ideal in <algebra of dimension 3 over Rationals>,435(1 generators)>436gap> Dimension( idA );4372438gap> B:= A/idA;439<algebra of dimension 1 over Rationals>440]]></Example>441<P/>442The call <C>B:= A/idA</C> creates a new algebra that does not <Q>know</Q> about443its connection with <C>A</C>. If we want to connect an algebra with its factor444via a homomorphism, then we first have to create the homomorphism445(<Ref Func="NaturalHomomorphismByIdeal" BookName="ref"/>).446After this we create the factor algebra from the homomorphism by447the function <Ref Func="ImagesSource" BookName="ref"/>. In the next example448we divide an algebra <C>A</C> by its radical and lift the central idempotents449of the factor to the original algebra <C>A</C>.450<P/>451<Example><![CDATA[452gap> m1:=[[1,0,0],[0,2,0],[0,0,3]];;453gap> m2:=[[0,1,0],[0,0,2],[0,0,0]];;454gap> A:= Algebra( Rationals, [ m1, m2 ] );;455gap> Dimension( A );4566457gap> R:= RadicalOfAlgebra( A );458<algebra of dimension 3 over Rationals>459gap> h:= NaturalHomomorphismByIdeal( A, R );460<linear mapping by matrix, <algebra of dimension4616 over Rationals> -> <algebra of dimension 3 over Rationals>>462gap> AmodR:= ImagesSource( h );463<algebra of dimension 3 over Rationals>464gap> id:= CentralIdempotentsOfAlgebra( AmodR );465[ v.3, v.2+(-3)*v.3, v.1+(-2)*v.2+(3)*v.3 ]466gap> PreImagesRepresentative( h, id[1] );467[ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 1 ] ]468gap> PreImagesRepresentative( h, id[2] );469[ [ 0, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 0 ] ]470gap> PreImagesRepresentative( h, id[3] );471[ [ 1, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ]472]]></Example>473<P/>474Structure constants tables for the simple Lie algebras are present in &GAP;.475They can be constructed using the function476<Ref Func="SimpleLieAlgebra" BookName="ref"/>. The Lie477algebras constructed by this function come with a root system attached.478<P/>479<Example><![CDATA[480gap> L:= SimpleLieAlgebra( "G", 2, Rationals );481<Lie algebra of dimension 14 over Rationals>482gap> R:= RootSystem( L );483<root system of rank 2>484gap> PositiveRoots( R );485[ [ 2, -1 ], [ -3, 2 ], [ -1, 1 ], [ 1, 0 ], [ 3, -1 ], [ 0, 1 ] ]486gap> CartanMatrix( R );487[ [ 2, -1 ], [ -3, 2 ] ]488]]></Example>489<P/>490Another example of algebras is provided by <E>quaternion algebras</E>.491We define a quaternion algebra over an extension field of the492rationals, namely the field generated by <M>\sqrt{{5}}</M>.493(The number <C>EB(5)</C> is equal to <M>1/2 (-1+\sqrt{{5}})</M>.494The field is printed as <C>NF(5,[ 1, 4 ])</C>.)495<P/>496<Example><![CDATA[497gap> b5:= EB(5);498E(5)+E(5)^4499gap> q:= QuaternionAlgebra( FieldByGenerators( [ b5 ] ) );500<algebra-with-one of dimension 4 over NF(5,[ 1, 4 ])>501gap> gens:= GeneratorsOfAlgebra( q );502[ e, i, j, k ]503gap> e:= gens[1];; i:= gens[2];; j:= gens[3];; k:= gens[4];;504gap> IsAssociative( q );505true506gap> IsCommutative( q );507false508gap> i*j; j*i;509k510(-1)*k511gap> One( q );512e513]]></Example>514<P/>515If the coefficient field is a real subfield of the complex numbers516then the quaternion algebra is in fact a division ring.517<P/>518<Example><![CDATA[519gap> IsDivisionRing( q );520true521gap> Inverse( e+i+j );522(1/3)*e+(-1/3)*i+(-1/3)*j523]]></Example>524<P/>525So &GAP; knows about this fact.526As in any ring, we can look at groups of units.527(The function <Ref Func="StarCyc" BookName="ref"/> used below computes528the unique algebraic529conjugate of an element in a quadratic subfield of a cyclotomic field.)530<P/>531<Example><![CDATA[532gap> c5:= StarCyc( b5 );533E(5)^2+E(5)^3534gap> g1:= 1/2*( b5*e + i - c5*j );535(1/2*E(5)+1/2*E(5)^4)*e+(1/2)*i+(-1/2*E(5)^2-1/2*E(5)^3)*j536gap> Order( g1 );5375538gap> g2:= 1/2*( -c5*e + i + b5*k );539(-1/2*E(5)^2-1/2*E(5)^3)*e+(1/2)*i+(1/2*E(5)+1/2*E(5)^4)*k540gap> Order( g2 );54110542gap> g:=Group( g1, g2 );;543#I default `IsGeneratorsOfMagmaWithInverses' method returns `true' for544[ (1/2*E(5)+1/2*E(5)^4)*e+(1/2)*i+(-1/2*E(5)^2-1/2*E(5)^3)*j,545(-1/2*E(5)^2-1/2*E(5)^3)*e+(1/2)*i+(1/2*E(5)+1/2*E(5)^4)*k ]546gap> Size( g );547120548gap> IsPerfect( g );549true550]]></Example>551<P/>552Since there is only one perfect group of order 120, up to isomorphism,553we see that the group <C>g</C> is isomorphic to <M>SL_2(5)</M>.554As usual, a permutation representation of the group can be constructed555using a suitable action of the group.556<P/>557<Example><![CDATA[558gap> cos:= RightCosets( g, Subgroup( g, [ g1 ] ) );;559gap> Length( cos );56024561gap> hom:= ActionHomomorphism( g, cos, OnRight );;562gap> im:= Image( hom );563Group([ (2,3,5,9,15)(4,7,12,8,14)(10,17,23,20,24)(11,19,22,16,13),564(1,2,4,8,3,6,11,20,17,19)(5,10,18,7,13,22,12,21,24,15)(9,16)(14,23) ])565gap> Size( im );566120567]]></Example>568<P/>569To get a matrix representation of <C>g</C> or of the whole algebra <C>q</C>,570we must specify a basis of the vector space on which the algebra acts,571and compute the linear action of elements w.r.t. this basis.572<P/>573<Example><![CDATA[574gap> bas:= CanonicalBasis( q );;575gap> BasisVectors( bas );576[ e, i, j, k ]577gap> op:= OperationAlgebraHomomorphism( q, bas, OnRight );578<op. hom. AlgebraWithOne( NF(5,[ 1, 4 ]),579[ e, i, j, k ] ) -> matrices of dim. 4>580gap> ImagesRepresentative( op, e );581[ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ]582gap> ImagesRepresentative( op, i );583[ [ 0, 1, 0, 0 ], [ -1, 0, 0, 0 ], [ 0, 0, 0, -1 ], [ 0, 0, 1, 0 ] ]584gap> ImagesRepresentative( op, g1 );585[ [ 1/2*E(5)+1/2*E(5)^4, 1/2, -1/2*E(5)^2-1/2*E(5)^3, 0 ],586[ -1/2, 1/2*E(5)+1/2*E(5)^4, 0, -1/2*E(5)^2-1/2*E(5)^3 ],587[ 1/2*E(5)^2+1/2*E(5)^3, 0, 1/2*E(5)+1/2*E(5)^4, -1/2 ],588[ 0, 1/2*E(5)^2+1/2*E(5)^3, 1/2, 1/2*E(5)+1/2*E(5)^4 ] ]589]]></Example>590591</Section>592593594<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->595<Section Label="Further Information about Vector Spaces and Algebras">596<Heading>Further Information about Vector Spaces and Algebras</Heading>597598More information about vector spaces can be found in599Chapter <Ref Chap="Vector Spaces" BookName="ref"/>.600Chapter <Ref Chap="Algebras" BookName="ref"/> deals with the601functionality for general algebras.602Furthermore, concerning special functions for Lie algebras,603there is Chapter <Ref Chap="Lie Algebras" BookName="ref"/>.604605</Section>606</Chapter>607608609<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->610<!-- %% -->611<!-- %E -->612613614615