Contents Previous Next Subchapters

Computing The Rank Of A Matrix
Syntax rank(x)
rank(xtol)
See Also cond , det , trace

Description
Returns the integer scalar that equals the rank of the matrix x, where x is an integer, real, double-precision, or complex matrix. The rank of a matrix is computed as the number of absolute singular values of x that are larger than tol where tol is an integer, real, or double-precision scalar. If tol is not present,
     tol = maxdim * maxabs * eps
is used where, matdim is the maximum of the row and column dimension of x, maxabs is the maximum absolute singular value of x, and eps is machine epsilon . If x is a real matrix, machine epsilon corresponds to single precision, otherwise it corresponds to double-precision.

Example
     x = {[1, 0], [0, 2]}
     rank(x)
returns
     2