up previous next
SubmoduleCols, SubmoduleRows

convert a matrix into a module

Syntax
SubmoduleCols(F: MODULE, M: MATRIX): MODULE
SubmoduleRows(F: MODULE, M: MATRIX): MODULE

Description
The first (second) function returns the submodule of F generated by the module elements described by the columns (rows) in the matrix M (which might be empty).

Dimensions must be compatible.

Example
/**/  R3 := NewFreeModule(R, 3);
/**/  MGens := matrix(R,[[x,y,z],[x-1,0,z]]);

/**/  M := SubmoduleRows(R3, MGens);
/**/  gens(M);
[[x, y, z], [x -1, 0, z]]

-- /**/  M := SubmoduleCols(R3, MGens); -- !!! ERROR: wrong length !!!

/**/  M := SubmoduleCols(NewFreeModule(R,2), MGens);
/**/  gens(M);
[[x, x -1], [y, 0], [z, z]]

See Also