Rank of a Matrix
Learn about the rank of a matrix and its properties.
Rank
The rank of a matrix , denoted by , is defined as the number of linearly independent rows of .
By definition, a coefficient matrix, , represents a linearly independent system of equations. The number of linearly independent rows is called row rank, and the number of linearly independent columns is called column rank. However, because row rank is always equal to column rank, these terms are seldom used. Instead, we simply refer to them as rank.
Calculating rank through Python
The following Python code calculates the rank of a matrix.
import numpy as npmat = np.array([[2, 3, -4, 7],[1, 6, -5, 1],[-2, 1, 10, -4]])print(mat)rank = np.linalg.matrix_rank(mat)print("The rank of the matrix is", rank)
Rank and
The rank of a matrix, , equals the number of pivots in the of ."
This follows from our previous discussion on linearly dependent rows in . All linearly dependent rows are converted into all-zero rows in , and we’re left with only the linearly independent rows as the nonzero rows. Each nonzero row in ...