Previous Page Next Page Contents

linalg::rank -- rank of a matrix

Introduction

linalg::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.

Call(s)

linalg::rank(A)
linalg::rank(S)

Parameters

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)

Returns

a nonnegative integer

Related Functions

linalg::det, linalg::gaussElim

Details

Example 1

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

Example 2

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

Background




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000