Documentation

This is machine translation

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

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

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

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)```