Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Compute Rank of a Matrix

The rank of a matrix is the number of independent rows of a matrix. For a matrix in its reduced row echelon form, the rank is the number of nonzero rows. To compute the rank of a matrix, use the linalg::rank function. For example, compute the rank of the following square matrix:

A := matrix([[1, 2, 3, 4], [5, 6, 7, 8],
    [9, 10, 11, 12], [13, 14, 15, 16]]):
linalg::rank(A)

Now, compute the reduced row echelon form and the rank of the following 3×4 matrix:

OriginalMatrix := matrix([[1, 2, 3], [5, 6, 7],
                    [9, 10, 11], [13, 14, 15]]);
RREF = linalg::gaussJordan(OriginalMatrix);
Rank = linalg::rank(OriginalMatrix)

Was this topic helpful?