linalg::rank
-- rank of a
matrixlinalg::rank
(A)
computes the rank of the
matrix A.
linalg::rank
(S)
computes the rank of the
matrix whose columns are the vectors in S.
linalg::rank(A)
linalg::rank(S)
A |
- | a matrix of a domain of category Cat::Matrix |
S |
- | a list or set of column vectors of the same dimension
(a column vector is an n x 1 matrix of a domain of category
Cat::Matrix ) |
a nonnegative integer
linalg::det
, linalg::gaussElim
A
or of the vectors given in
S
, respectively, must be an integral domain, i.e., a
domain of category Cat::IntegralDomain
.We define the following matrix over Z:
>> MatZ := Dom::Matrix( Dom::Integer ): A := MatZ([[1, 2, 3, 4], [-1, 0, 1, 0], [3, 5, 6, 9]])
+- -+ | 1, 2, 3, 4 | | | | -1, 0, 1, 0 | | | | 3, 5, 6, 9 | +- -+
and compute its rank:
>> linalg::rank(A)
3
The rank of the matrix A=(s[i]), i=1..3 with s[1]=[0,1,1], s[2]=[0,1,0], s[3]=[0,0,1] is:
>> S:= { MatZ([0,1,1]), MatZ([0,1,0]), MatZ([0,0,1]) }: linalg::rank(S)
2
linalg::gaussElim
),
it is equal to the number of characteristic column indices.