Matrix Rank — Definition, Formula & Examples
Matrix rank is the number of linearly independent rows (or equivalently, columns) in a matrix. It tells you the dimension of the vector space spanned by the matrix's rows or columns.
The rank of an matrix , denoted , is the dimension of the column space (or row space) of . Equivalently, it equals the number of nonzero rows in any row echelon form of . The rank satisfies .
Key Formula
Where:
- = An m × n matrix
- = The number of linearly independent rows or columns of A
How It Works
To find the rank of a matrix, reduce it to row echelon form using elementary row operations. Then count the number of nonzero rows — that count is the rank. A matrix with rank equal to is said to have full rank. If a square matrix has rank , it is invertible; if its rank is less than , the matrix is singular.
Worked Example
Problem: Find the rank of the matrix A = [[1, 2, 3], [2, 4, 6], [0, 1, 1]].
Step 1: Perform row reduction. Replace R₂ with R₂ − 2R₁ to eliminate the first entry of row 2.
Step 2: Swap R₂ and R₃ to move the zero row to the bottom.
Step 3: Count the nonzero rows. There are 2 pivot rows (rows 1 and 2), and one zero row.
Answer: The rank of A is 2. Row 2 of the original matrix was a scalar multiple of row 1, so only 2 of the 3 rows were linearly independent.
Why It Matters
Rank determines whether a system of linear equations has a unique solution, infinitely many solutions, or none. In data science and machine learning, matrix rank helps identify redundant features in datasets and underlies techniques like principal component analysis (PCA).
Common Mistakes
Mistake: Counting all nonzero rows in the original matrix instead of in row echelon form.
Correction: A row can be nonzero yet still be a linear combination of other rows. Always row-reduce first, then count pivot rows.
