up previous next
rk

rank of a matrix or module

Syntax
rk(M: MAT): INT
rk(M: MODULE): INT

Description
This function computes the rank of M . For a module M this is defined as the vector space dimension of the subspace generated by the generators of M over the quotient field of the base ring -- contrast this with the function NumCompts which simply counts the number of components the module has.

Example
/**/  Use R ::= QQ[x,y,z];
/**/  rk(IdentityMat(R, 4));
4

  rk(Module([x,y,z,0])); --***WORK IN PROGRESS***
1
-------------------------------
  rk(Module([[1,2,3],[2,4,6]]));   --***WORK IN PROGRESS***
1
-------------------------------
  rk(Module([[1,2,3],[2,5,6]]));   --***WORK IN PROGRESS***
2
-------------------------------