<p>A <em>vector space</em> <span class="SimpleMath">\(V\)</span> over a field <span class="SimpleMath">\(F\)</span> is an (abelian) additive group that is closed under scalar multiplication by elements in <span class="SimpleMath">\(F\)</span>, such that</p>
</li>
</ol>
<p>for all <span class="SimpleMath">\(a,b \in F\)</span> and all <span class="SimpleMath">\(v,w \in V\)</span>. In <strong class="pkg">GAP</strong>, only those domains that are constructed as vector spaces are regarded as vector spaces. In particular, an additive group that does not know about an acting domain of scalars is not regarded as a vector space in <strong class="pkg">GAP</strong>.</p>
<p>Probably the most common <span class="SimpleMath">\(F\)</span>-vector spaces in <strong class="pkg">GAP</strong> are so-called <em>row spaces</em>. They consist of row vectors, that is, lists whose elements lie in <span class="SimpleMath">\(F\)</span>. In the following example we compute the vector space spanned by the row vectors <code class="code">[ 1, 1, 1 ]</code> and <code class="code">[ 1, 0, 2 ]</code> over the rationals.</p>
<p>The full row space <span class="SimpleMath">\(F^n\)</span> is created by commands like:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">F:= GF( 7 );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">V:= F^3; # The full row space over F of dimension 3.</span>
( GF(7)^3 )
<span class="GAPprompt">gap></span> <span class="GAPinput">[ 1, 2, 3 ] * One( F ) in V;</span>
true
</pre></div>
<p>In the same way we can also create matrix spaces. Here the short notation <code class="code"><varclass="Arg">field</var>^[<var class="Arg">dim1</var>,<var class="Arg">dim2</var>]</code> can be used:</p>
<p>If <span class="SimpleMath">\(\Phi\)</span> is an algebraic extension of <span class="SimpleMath">\(F\)</span>, then <span class="SimpleMath">\(\Phi\)</span> is also a vector space over <span class="SimpleMath">\(F\)</span> (and indeed over any subfield of <span class="SimpleMath">\(\Phi\)</span> that contains <span class="SimpleMath">\(F\)</span>). This field <span class="SimpleMath">\(F\)</span> is stored in the attribute <code class="func">LeftActingDomain</code> (<span class="RefLink">Reference: LeftActingDomain</span>). In <strong class="pkg">GAP</strong>, the default is to view fields as vector spaces over their <em>prime</em> fields. By the function <code class="func">AsVectorSpace</code> (<span class="RefLink">Reference: AsVectorSpace</span>), we can view fields as vector spaces over fields other than the prime field.</p>
<p>A vector space has three important attributes: its <em>field</em> of definition, its <em>dimension</em> and a <em>basis</em>. We already encountered the function <code class="func">LeftActingDomain</code> (<span class="RefLink">Reference: LeftActingDomain</span>) in the example above. It extracts the field of definition of a vector space. The function <code class="func">Dimension</code> (<span class="RefLink">Reference: Dimension</span>) provides the dimension of the vector space.</p>
<div class="<script src="manual"t/">script span=GAPprompt"gapgt;</ <spanclass=GAPinput">F:= GF( 9 );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">m:= [ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, Z(3)^0 ] ];;</span>
"gt< classGAPinput>=(Fm)/
<vector space over GF(3^2), with 2 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 2
<java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 126
<vector space over span span class"gapgt;<spanclass=Gjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 75
true
<span class="">gapgt;/pan span class="GAPinput">Dimension( W );</span> 4
<span class="GAPprompt">gap></span> <span class="GAPinput">LeftActingDomain( W );</span>
GF(3)
</pre></div>
<p>One of the most important attributes is a <em>basis</em>. For a given basis <span class="SimpleMath">\(B\)</span> of <span class="SimpleMath">\(V\)</span>, every vector <span class="SimpleMath">\(v\)</span> in <span class="SimpleMath">\(V\)</span> can be expressed uniquely as <span class="SimpleMath">\(v = \sum_{b \in B} c_b b\)</span>, with <span>
<p
<p>Given a vector space
<div class="example"><pre>
<an class="APprompt"gapgt;</span> <span class"">:= 12],[34 ; = [ [ 1 ,[ 1]
class"GAPprompt"gapgtspanspan ="APinput"V= (Rationals m2])<spanjava.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110
<vector space over Rationals, with 2 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">B:= Basis( V );</span>
SemiEchelonBasis( <vector space over Rationals, with 2 generators>, ... )
<span class="GAPprompt">gap></span> <span class="GAPinput">BasisVectors( Basis( V ) );</span>
[ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</re</div
<p>The coefficients of a vector relative to a given basis are found by java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<div class="example<span classGAPprompt"gapgt<span <span lass=GAPinput>V:= VectorSpace( F, [ [ 1, 1, 1 ], [ 1, 0, 2 ] ] );</span>
<span class="GAPprompt">gap&span classGAPprompt">gap></span> <span class="GAPinput">[ 2, 1, 3 ] in V;</span>
<vector space over Rationals, with 2 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">B:= Basis( V );</span>
SemiEchelonBasis( <vector space over Rationals, with 2 generators>, ... )
<span class="GAPprompt">java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 4
[ [ 1, 2 ], [ 0, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<pan class"APprompt>gap&<span><span class="APinput"( B,[ 1,0 )<span>
[ 1, -2 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">LinearCombination( B, [ 1, -2 ] );</java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 0
[span="">gap;><"">:F3; The row over 3./>
</pre>< =">[ , 2,3] * ( F )in V;/>
<p>In the above examples we have seen <
<class=e"pre>
<span class="GAPprompt">gap></java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="GAPinput"><span class="GAPprompt">gap></span> <span class="GAPinput">B ,4 ]:=[ ,1][ , </>
SemiEchelonBasis&t; space over Rationals with 2 generatorsg;
[ [ 1, 0 ], [ 0, 1 ] ] )
<spanclass=GAPprompt"gap&t;/span><span class"CoefficientsB, [[12]);<>
[ 1, 2 ]
</pre></div>
<p>We can construct subspaces and quotient spaces of vector spaces. The natural projection map (constructed by <code class="func">NaturalHomomorphismBySubspace</code>rue
<"example><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">V:= Rationals^4;</span>
(Rationals^4 )
<span class="GAPprompt">gap></span> <span class="GAPinput">W:= Subspace( V, [ [ 1, 2, 3, 4 ], [ 0, 9, 8, 7 ] ] );</span>
<class=example"<pre>
<="GAPprompt">gap&t<span> <span class="GAPinput">:= /;/span>
( Rationals^
<span<> < class="impleMath">(\)/span>is an algebraic extensionof<span class="">(\<span> then <panclass="SimpleMath">\(\Phi\)</span> is also a vector space over <span class="SimpleMath">\(F\)</span> (and indeed over any subfield of <span class="SimpleMath"
<linear mapping by matrix, ( Rationals^4 ) -> ( Rationals^2 )>
<span class="GAPprompt">gap></span> <span class="GAPinput">Image( h, [ 1, 2, 3, 4 ] );<(2
[ 0, 0 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PreImagesRepresentative(
[ 1, 0, 0, 0 ]
</pre></div>
<p><a id="X7DDBF6F47A2E021C" java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
<java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0
<div class="example"><pre>
<span class="GAPprompt">gap></spanjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
GF2^)
true
</pre></div>
p>of mostclassesof algebrasaresubalgebras ofmatrix the of all < class"impleMath"\n\times\/>matricesoverafieldspanclass"SimpleMath"\F)<span possibleto define multiplication many ways. mostfrequent are theordinarymatrix and theLiemultiplication/p
<p>Each matrix constructed as <span class="SimpleMath">\([ \textit{row1}, \textit{row2}, \ldots ]\)</span> is regarded by <strong class="pkg">GAP</strong> as an <<span class=G">gap&<span> <="Dimension( V ;</>
<ptrue
<=">
<span class="GAPpromptG()
<span class="GAPprompt">gap&java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 0
(GF^^[3 ] )
</pre></div>
<p>An algebra can be java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
<div class="example"><pre>
rompt>&<java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 128
< ="&t;/>< class"">A: ( ,>
<algebra over Rationals, with 2 generators>
</pre></div>
<p>An interesting class of algebras for which many special algorithms are implemented is the class of <em>Lie algebras</em>. java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
<p>Since the multiplication of objects in <strong class="pkg">GAP</strong> is always assumed to be the operation <code class="code">*</code> (resp. the infix operator <code class="code">*</code>), and since there is already the <q>ordinary</q> matrix product defined for ordinary matrices, as mentioned above, we must use a different construction for matrices that occur as elements of Lie algebras. Such Lie matrices can be constructed by <code class="func"<span class="APprompt>></span><span class"APinput"V:=VectorSpace , [ m1, m2] ;/>
<div class="example"><pre>
<;</span> <java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 117
<algebra of dimension 2 over Rationals>
</pre>
<p>If we know that a structure constants table defines a Lie algebra, then we can we can constructthecorresponding Lie algebra by <code class="func">LieAlgebraByStructureConstants</code> (<span class="RefLink">Reference: LieAlgebraByStructureConstants</span>); the algebra returned by this function knows that it is a Lie algebra, so <strong class="pkg">GAP</strong> need not check the Jacobi identity.</p>
<div class="example"><pre>
<span class="GAPprompt">
< java.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 100 3, z,"antisymmetric" ));;</java.lang.StringIndexOutOfBoundsException: Index 112 out of bounds for length 112
< classGAPprompt">></span> <span class="GAPinput">SetEntrySCTable( T, 1, 2, [ o, 1, o, 3 ] );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetEntrySCTable( T, 1, 3, [ o, 1 ] );</span>
<span class="GAPprompt">gap></re></iv>
< =GAPprompt>apgt</span> <span class="GAPinput">A:= AlgebraByStructureConstants( F, T );</span>
<algebra of dimension 3 over GF(2)>
<span class="GAPprompt">gap></span> <span class="GAPinput">Dimension( A );</span> 3
<span class="GAPprompt">gap></span> <span class="GAPinput">LeftActingDomain( A );</span>
GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">Basis( A );</span>
CanonicalBasis( <algebra of dimension 3 over GF(2)> )
</pre><div>
<p>Subalgebras and ideals of an algebra can be constructed by specifying a set of generators for the subalgebra
<div class=example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">
<></span> <span class=GAPinputA:=Algebra(,[ );<span>
<nclass=""gapgt<span>class"GAPinput">=Subalgebra A,[java.lang.StringIndexOutOfBoundsException: Range [88, 87) out of bounds for length 103
<algebra over Rationals, with 1 generator>
<span class="GAPprompt">gap></span> <span class="GAPinput">Dimension( subA )false 2
<span class="GAPprompt">gap></span> <span java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 0
&java.lang.StringIndexOutOfBoundsException: Range [47, 3) out of bounds for length 69
(1 generator)>
<span class="GAPprompt">gap></span> <span class="GAPinput">Dimension( idA );</span> 2
<span class="GAPprompt">gap></span> <span class=spanclass="GAPprompt">gap></span> <span class="GAPinput">m1:= [ [ 0, 1 ], [ 0, 0 ] ];;</span>
<algebra of dimension 1 over Rationals>
</pre></div>
<p>Thelt;Lie algebra over Rationals, with 2 generators>
<div class="example"><pre>
<span java.lang.StringIndexOutOfBoundsException: Range [22, 11) out of bounds for length 100
<class="GAPprompt">>span>><pan class="GAPinput">m2:=[[0,1,0],[0,0,2],[0,0,0]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">A:=
<ss=GAPprompt">></pan> <pan =GAPinput">( )<span 6
<span class"GAPprompt">gap>/> span class=GAPinput">R:= RadicalOfAlgebra(A );</span>
<algebra of dimension 3 over Rationals>
<class="GAPprompt">gap></span> <span class="GAPinput">h:= NaturalHomomorphismByIdeal( A, R );</span>
<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 6 over Rationals>-;<algebra of dimension 3 over Rationals>>
<span class="GAPprompt"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
< of dimension 3 overRationalsgt;
<span class="GAPprompt">java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 0
.1+-2)v.2+3)v.3 ]
<panclass="APprompt"gap>/span> <span =GAPinput">java.lang.StringIndexOutOfBoundsException: Range [105, 85) out of bounds for length 105
[[ 0,0, 0 ],[00, 0 ], [ 0, 0, 1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PreImagesRepresentative( h, id[2] );</span>
[ [ 0, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 0 ] ]
<span class="GAPprompt">gap></<span class="GAPprompt">gap></span class="GAPinput">SetEntrySCTable( T, 1, 2, [1/2,1,1/3,2] ); T;</span>
[ [ 1, 0, 0 ], [ 0, [[[ ,, 1/]] [ ] ]]] 0]
</pre></<>/iv>
<Structure constants tables for the simple Lie algebras are present in <strong java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<div class="/re></div>
<span class="GAPprompt">gap></span> <span class="GAPinput">L:= SimpleLieAlgebra( "G", 2, Rationals );</span>
<Lie algebra of dimension 14 over Rationals>
<span class="GAPprompt">gap></span> <span class="GAPinput">Rjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
l;root system ofrank &;
<span class="GAPprompt">gap></span> <span class="GAPinput">PositiveRoots( R );</span>
[ [ 2, -1 ], [ -3, 2 ], [ -1, 1 ], [ 1, 0 ], [ 3, -GAPinput>SetEntrySCTable( T 12, [231 );<span>
<span class="GAPprompt">gap<span class=GAPprompt>ap&t;<> span class=GAPinput"L=LieAlgebraByStructureConstants, )</span
java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 24
</pre></div>
<p>
<div class="example"><pre>
< ="APprompt">gap></span> <span class="GAPinput">b5:= EB(5);</span>
E()E(5)^4
<span class="GAPprompt">gap></span> <span class=span ="APprompt">gap></span> <span class="GAPinput">T:= EmptySCTable( 3, z, "antisymmetric" );;</span>
<algebra-with-one ofdimension 4 (51,4]>
<span class="span class=GAPprompt">></span> <panclass="GAPinput">SetEntrySCTable( T, 1, 3, [ o, 1 ] );</span>
[, ,j, k java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
< java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 124
<span class="GAPprompt">gap></span>java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
true
<span class=java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
false
<span class="GAPprompt">gap></GF)
java.lang.StringIndexOutOfBoundsException: Range [50, 1) out of bounds for length 1
(1)*
<span <div
e
</pre></div>
<p>If java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
<div<two-sided ideal in &t;lgebra of dimension 3 over >,
<span class="GAPprompt">gap></span> <span class="GAPinput">c5:= StarCyc( b5 );</span>
E class"java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 79
<span class="GAPprompt">gap></=";/>=(AmodR)<span
(1/2*E(5)+1/2*E(5)^4)*e+(1/2)*i+(-1/2spanjava.lang.StringIndexOutOfBoundsException: Range [24, 11) out of bounds for length 105
<span class="GAPprompt">gap& class="GAPinput"Order );</span 5 span=>&<span<panjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 99
(-2E(5)2-1/2*E(5)^3*+12*i+1/*E(5+1/2*5)4*k
<span class="GAPprompt">gap></span> <span class="GAPinput">Order( g2 );</span> 10
<span class="GAPprompt">span class="GAPprompt">gap<class=GAPinput>PreImagesRepresentativeh,id3]);/java.lang.StringIndexOutOfBoundsException: Range [105, 104) out of bounds for length 105
#I default `IsGeneratorsOfMagmaWithInverses' method returns `true' for
[ (1/2*E(5)+1/2*E(5)^4)*e+(1/2)*i+(-1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-/2*E()^-/2E5)3)**e(/)*i+1/*E5+1/2*E(5)^4)* ]
<span class="GAPprompt">gap></span> <span class="GAPinput">Size( g );</span> 120
<span class="GAPprompt">gap></span> <span class="GAPinput">IsPerfect( g );</span>
true
</pre></div>
<p>Since there is only one perfect group of order 120, up to isomorphism, we java.lang.StringIndexOutOfBoundsException: Range [0, 80) out of bounds for length 0
<div class="example"><pre>
<spanclass="GAPprompt">gap></span> <span class="GAPinput">cos:= RightCosets( g, Subgroup( g, [ g1 ] ) );;</span>
<span class="GAPprompt"gapgt;span> <span class="GAPinput">Length( cos );</span> 24
<span class="GAPprompt">gap></span> <span class="GAPinput">hom:= ActionHomomorphism( g, cos, OnRight );;</span>
<pan class"GAPprompt">ap&t;<span> <span class="GAPinput">im:= Image( hom );</span>
Group([ (2,3,5,9,15)(4,7,12,8,14)(10,17,23,20[[ 2, -1 ]],[ -3, , [1] [ ,0 ] ,1,[0,1]]
(
<class"GAPprompt>gap></span span =GAPinput">Size( m );/span> 120
</pre>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p>To get a matrix representation of <code class="code">g</code> or of the whole(5)
<h4>6.3 <span class="Heading">Further Information about Vector Spaces pSojava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 324
<p>More information about vector spaces can be found in Chapter <span class="RefLink">Reference: Vector Spaces</span>. Chapter <span class="RefLink">Reference: Algebras</span> deals
<div class="chlinkprevnextbotspan "APprompt"java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 98
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.