58.8 Row and Matrix Spaces

  • IsRowSpace( V ) F

    A row space in GAP is a vector space that consists of row vectors (see Chapter Row Vectors).

  • IsMatrixSpace( V ) F

    A matrix space in GAP is a vector space that consists of matrices (see Chapter Matrices).

  • IsGaussianSpace( V ) F

    The filter IsGaussianSpace (see Filters) for the row space (see IsRowSpace) or matrix space (see IsMatrixSpace) V over the field F, say, indicates that the entries of all row vectors or matrices in V, respectively, are all contained in F. In this case, V is called a Gaussian vector space. Bases for Gaussian spaces can be computed using Gaussian elimination for a given list of vector space generators.

    gap> mats:= [ [[1,1],[2,2]], [[3,4],[0,1]] ];;
    gap> V:= VectorSpace( Rationals, mats );;
    gap> IsGaussianSpace( V );
    true
    gap> V:= VectorSpace( Rationals, mats * E(4) );;
    gap> IsGaussianSpace( V );
    false
    

  • FullRowSpace( F, n ) F

    For a field F and a nonnegative integer n, FullRowSpace returns the F-vector space that consists of all row vectors (see IsRowVector) of length n with entries in F.

    An alternative to construct this vector space is via F^n.

    gap> FullRowSpace( GF( 9 ), 3 );
    ( GF(3^2)^3 )
    gap> GF(9)^3;           # the same as above
    ( GF(3^2)^3 )
    

  • FullMatrixSpace( F, m, n ) F

    For a field F and two positive integers m and n, FullMatrixSpace returns the F-vector space that consists of all m by n matrices (see IsMatrix) with entries in F.

    If m = n then the result is in fact an algebra (see FullMatrixAlgebra).

    An alternative to construct this vector space is via F^[m,n].

    gap> FullMatrixSpace( GF(2), 4, 5 );
    ( GF(2)^[ 4, 5 ] )
    gap> GF(2)^[ 4, 5 ];    # the same as above
    ( GF(2)^[ 4, 5 ] )
    

  • DimensionOfVectors( M ) A

    For a left module M that consists of row vectors (see IsRowModule), DimensionOfVectors returns the length of each row vector in M. For a left module M that consists of matrices (see IsMatrixModule), DimensionOfVectors returns the list of dimensions (see DimensionsMat) of each matrix in M.

    gap> DimensionOfVectors( GF(2)^5 );
    5
    gap> DimensionOfVectors( GF(2)^[2,3] );
    [ 2, 3 ]
    

  • IsSemiEchelonized( B ) P

    Let B be a basis of a Gaussian row or matrix space V, say (see IsGaussianSpace) over the field F.

    If V is a row space then B is semi-echelonized if the matrix formed by its basis vectors has the property that the first nonzero element in each row is the identity of F, and all values exactly below these pivot elements are the zero of F (cf. SemiEchelonMat).

    If V is a matrix space then B is semi-echelonized if the matrix obtained by replacing each basis vector by the concatenation of its rows is semi-echelonized (see above, cf. SemiEchelonMats).

    gap> V:= GF(2)^2;;
    gap> B1:= Basis( V, [ [ 0, 1 ], [ 1, 0 ] ] * Z(2) );;
    gap> IsSemiEchelonized( B1 );
    true
    gap> B2:= Basis( V, [ [ 0, 1 ], [ 1, 1 ] ] * Z(2) );;
    gap> IsSemiEchelonized( B2 );
    false
    

  • SemiEchelonBasis( V ) A
  • SemiEchelonBasis( V, vectors ) O
  • SemiEchelonBasisNC( V, vectors ) O

    Let V be a Gaussian row or matrix vector space over the field F (see IsGaussianSpace, IsRowSpace, IsMatrixSpace).

    Called with V as the only argument, SemiEchelonBasis returns a basis of V that has the property IsSemiEchelonized (see IsSemiEchelonized).

    If additionally a list vectors of vectors in V is given that forms a semi-echelonized basis of V then SemiEchelonBasis returns this basis; if vectors do not form a basis of V then fail is returned.

    SemiEchelonBasisNC does the same as SemiEchelonBasis for two arguments, except that it is not checked whether vectors form a semi-echelonized basis.

    gap> V:= GF(2)^2;;
    gap> B:= SemiEchelonBasis( V );
    SemiEchelonBasis( ( GF(2)^2 ), ... )
    gap> Print( BasisVectors( B ), "\n" );
    [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ]
    gap> B:= SemiEchelonBasis( V, [ [ 1, 1 ], [ 0, 1 ] ] * Z(2) );
    SemiEchelonBasis( ( GF(2)^2 ), [ [ Z(2)^0, Z(2)^0 ], [ 0*Z(2), Z(2)^0 ] ] )
    gap> Coefficients( B, [ 0, 1 ] * Z(2) );
    [ 0*Z(2), Z(2)^0 ]
    gap> Coefficients( B, [ 1, 0 ] * Z(2) );
    [ Z(2)^0, Z(2)^0 ]
    gap> SemiEchelonBasis( V, [ [ 0, 1 ], [ 1, 1 ] ] * Z(2) );    
    fail
    

  • IsCanonicalBasisFullRowModule( B ) P

    IsCanonicalBasisFullRowModule returns true if B is the canonical basis (see IsCanonicalBasis) of a full row module (see IsFullRowModule), and false otherwise.

    The canonical basis of a Gaussian row space is defined as the unique semi-echelonized (see IsSemiEchelonized) basis with the additional property that for j > i the position of the pivot of row j is bigger than the position of the pivot of row i, and that each pivot column contains exactly one nonzero entry.

  • IsCanonicalBasisFullMatrixModule( B ) P

    IsCanonicalBasisFullMatrixModule returns true if B is the canonical basis (see IsCanonicalBasis) of a full matrix module (see IsFullMatrixModule), and false otherwise.

    The canonical basis of a Gaussian matrix space is defined as the unique semi-echelonized (see IsSemiEchelonized) basis for which the list of concatenations of the basis vectors forms the canonical basis of the corresponding Gaussian row space.

  • NormedRowVectors( V ) A

    For a finite Gaussian row space V (see IsRowSpace, IsGaussianSpace), NormedRowVectors returns a list of those nonzero vectors in V that have a one in the first nonzero component.

    The result list can be used as action domain for the action of a matrix group via OnLines (see OnLines), which yields the natural action on one-dimensional subspaces of V (see also Subspaces).

    gap> vecs:= NormedRowVectors( GF(3)^2 );
    [ [ 0*Z(3), Z(3)^0 ], [ Z(3)^0, 0*Z(3) ], [ Z(3)^0, Z(3)^0 ], 
      [ Z(3)^0, Z(3) ] ]
    gap> Action( GL(2,3), vecs, OnLines );
    Group([ (3,4), (1,2,4) ])
    

  • SiftedVector( B, v ) O

    Let B be a semi-echelonized basis (see IsSemiEchelonized) of a Gaussian row or matrix space V (see IsGaussianSpace), and v a row vector or matrix, respectively, of the same dimension as the elements in V. SiftedVector returns the residuum of v with respect to B, which is obtained by successively cleaning the pivot positions in v by subtracting multiples of the basis vectors in B. So the result is the zero vector in V if and only if v lies in V.

    B may also be a mutable basis (see Mutable Bases) of a Gaussian row or matrix space.

    gap> V:= VectorSpace( Rationals, [ [ 1, 2, 7 ], [ 1/2, 1/3, 5 ] ] );;
    gap> B:= Basis( V );;
    gap> SiftedVector( B, [ 1, 2, 8 ] );
    [ 0, 0, 1 ]
    

    [Top] [Previous] [Up] [Next] [Index]

    GAP 4 manual
    February 2000