Functions > Vector and Matrix > Array Characteristics > Rank and Linear Systems Properties of Matrices
Rank and Linear Systems Properties of Matrices
rank(A)—Returns the rank, or the number of linearly independent columns, of A.
geninv(A)—Returns L, the generalized (pseudo) inverse of A, which gives the least-squares solution to a system of equations. If x = L · b, then x is the minimum of |A·x − b|2. If A is square, and nonsingular, then geninv returns the transpose matrix A-1.
If A has full rank (all columns are linearly independent), then geninv returns L, the left inverse of A, that is, L · A = I. In this case, L = (AT · A)-1 · AT.
The geninv function is dependent on TOL, so for matrices that are nearly singular, adjusting this value may produce a better result.
The geninv function is based on a routine from the book Nash, J.C.,Compact Numerical Methods for Computers: Linear Algebra and Functional Minimization, John Wiley & Sons, New York, 1979.
rref(A)—Returns the row-reduced echelon form of A.
Arguments
A is a real vector or matrix. For geninv, the number of rows must be greater than or equal to the number of columns.