Rank (Matrix) — Definition, Formula & Examples
The rank of a matrix is the number of linearly independent rows (or equivalently, columns) it contains. 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 equivalently, the row space) of . It equals the number of pivot positions in any row echelon form of , and satisfies .
Key Formula
Where:
- = An m × n matrix
- = Number of pivot columns (dimension of the column space)
- = Dimension of the null space of A
- = Number of columns of A
How It Works
To find the rank, row-reduce the matrix to row echelon form using elementary row operations. Then count the number of nonzero rows (rows containing a leading 1, or pivot). Each pivot corresponds to one linearly independent row and one linearly independent column. A matrix with rank equal to its smaller dimension is called full rank; otherwise it is rank-deficient.
Worked Example
Problem: Find the rank of the matrix A = [[1, 2, 3], [2, 4, 6], [0, 1, 1]].
Step 1: Write the matrix and perform row reduction. Replace R₂ with R₂ − 2R₁ to eliminate the first entry in 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 pivots (in columns 1 and 2), so the rank is 2.
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 are linearly independent.
Why It Matters
Rank determines whether a system of linear equations has a unique solution, infinitely many solutions, or none at all. In applied fields like data science and engineering, matrix rank reveals the true dimensionality of a dataset and is central to techniques like principal component analysis (PCA) and least-squares fitting.
Common Mistakes
Mistake: Counting all nonzero rows in the original matrix instead of after row reduction.
Correction: A row that is a linear combination of other rows contributes nothing to rank. Always reduce to echelon form first, then count pivot rows.
