RankMat( mat )
RankMat returns the rank of the matrix mat. The rank is defined as
the dimension of the vector space spanned by the rows of mat. It
follows that a n by n matrix is invertible exactly if its rank is
n.
gap> RankMat( [ [ 4, 1, 2 ], [ 3, -1, 4 ], [ -1, -2, 2 ] ] );
2
Note that RankMat performs a Gaussian elimination. For large rational
matrices this may take very long, because the entries may become very
large.
GAP 3.4.4