Goto Chapter: Top 1 2 3 4 5 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

5 Utilities
 5.1 Empty matrices

5 Utilities

5.1 Empty matrices

5.1-1 IsEmptyMatrix
‣ IsEmptyMatrix( arg )( filter )

Returns: true or false

Category for empty matrices

5.1-2 MakeEmptyMatrix
‣ MakeEmptyMatrix( m, n, R )( operation )

Returns: IsEmptyMatrix (5.1-1)

Create an empty m by n matrix over the ring R. The arguments m and n are nonnegative integers, and at least one of them must be zero.

5.1-3 RingOfEmptyMatrix
‣ RingOfEmptyMatrix( M )( attribute )

Returns: IsRing (Reference: IsRing)

Returns the base ring of the empty matrix M.

5.1-4 MakeZeroMatrix
‣ MakeZeroMatrix( m, n, R )( operation )

Returns: IsEmptyMatrix (5.1-1)

Create an m by n zero matrix over the ring R. The arguments m and n are nonnegative integers. If at least one of them is zero, then an empty matrix is constructed. Otherwise, a normal GAP matrix filled with zeros is constructed, as by NullMat (Reference: NullMat).

gap> M := MakeEmptyMatrix( 0, 3, Rationals );
<empty 0x3 matrix over Rationals>
gap> M * [ 5, 8, 2 ];
[  ]
gap> [] * M;
[ 0, 0, 0 ]
gap> N := MakeEmptyMatrix( 3, 0, Rationals );
<empty 3x0 matrix over Rationals>
gap> N * [];
[ 0, 0, 0 ]
gap> [ 4, 3, 7 ] * N;
[  ]
gap> M * N;
<empty 0x0 matrix over Rationals>
gap> N * M;
[ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ]
gap> P := MakeZeroMatrix( 2, 3, Rationals );
[ [ 0, 0, 0 ], [ 0, 0, 0 ] ]
gap> P * N;
<empty 2x0 matrix over Rationals>
gap> N + N;
<empty 3x0 matrix over Rationals>
gap> N + N = N;
true
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 Ind

generated by GAPDoc2HTML