33.16 Basis

Basis( V )
Basis( V, vectors )

Basis( V ) returns a basis of the row space V. If the component V.canonicalBasis or V.semiEchelonBasis was bound before the first call to Basis for V then one of these bases is returned. Otherwise a semi-echelonized basis (see Row Space Bases) is computed. The basis is stored in V.basis.

Basis( V, vectors ) returns the basis of V that consists of the vectors in the list vectors. In the case that V.basis was not bound before the call the basis is stored in this component.

Note that it is not necessarily checked whether vectors is really linearly independent.

    gap> v:= GF(2)^2; v.name:= "v";;
    RowSpace( GF(2), [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ] )
    gap> b:= Basis( v, [ [ 1, 1 ], [ 1, 0 ] ] * Z(2) );
    Basis( v, [ [ Z(2)^0, Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ] )
    gap> Coefficients( b, [ 0, 1 ] * Z(2) );
    [ Z(2)^0, Z(2)^0 ]
    gap> IsSemiEchelonBasis( b );
    false 

Previous Up Top Next
Index

GAP 3.4.4
April 1997