Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Find the Rank of a Matrix

The rank is the number of independent rows, which always equals the number of independent columns. Row reduce the matrix to echelon form and count the pivots: that count is the rank.

Recognize the task

"Find the rank", "how many columns are independent", "is the system consistent", or a question about the nullity or the column space: (123246111)\begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 1 & 1 & 1 \end{pmatrix}, any m×nm \times n matrix. Test: every matrix, square or not, has a rank between 00 and min⁡(m,n)\min(m, n).
Rank is defined in the matrix rank lesson; the procedure is computing rank via row reduction.

Ways to do it

Row reductionany matrix
rank⁡(A)=number of pivots in an echelon form\operatorname{rank}(A) = \text{number of pivots in an echelon form}
Works for every shape, using Gaussian elimination.
Determinant testsquare matrices
det⁡(A)≠0  ⟺  rank⁡(A)=n\det(A) \neq 0 \iff \operatorname{rank}(A) = n
One number decides full rank (invertible matrix theorem); if det⁡(A)=0\det(A) = 0, row reduce to find the exact rank.
Inspectionsmall or patterned
all rows multiples of one row⇒rank⁡(A)=1\text{all rows multiples of one row} \Rightarrow \operatorname{rank}(A) = 1
Spot rows or columns that are multiples or sums of others. Fast, but confirm by reduction when unsure.

Steps

StepOn A=(123246111)A = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 1 & 1 & 1 \end{pmatrix}
1Row reduce to echelon form. Clear below each pivot with row operations; they do not change the rank.R2−2R1=(0,0,0)R_2 - 2R_1 = (0, 0, 0), R3−R1=(0,−1,−2)R_3 - R_1 = (0, -1, -2); swap: (1230−1−2000)\begin{pmatrix} 1 & 2 & 3 \\ 0 & -1 & -2 \\ 0 & 0 & 0 \end{pmatrix}
2Count the pivots. A pivot is the first nonzero entry of a nonzero row; each sits to the right of the one above.pivots in columns 11 and 22: rank⁡(A)=2\operatorname{rank}(A) = 2
3Check against the bound. The rank cannot exceed the number of rows or of columns.2≤min⁡(3,3)2 \le \min(3, 3) ✓; not full rank, so det⁡(A)=0\det(A) = 0
4Read off what the rank tells you. Nullity =n−rank⁡= n - \operatorname{rank} by the rank-nullity theorem; the pivot columns of the original AA form a basis of the column space.nullity 3−2=13 - 2 = 1; columns 11 and 22 of AA span the column space

Worked examples

Example 1 · rows that are multiples

rank 1
(213426639)\begin{pmatrix} 2 & 1 & 3 \\ 4 & 2 & 6 \\ 6 & 3 & 9 \end{pmatrix}: R2−2R1R_2 - 2R_1, R3−3R1R_3 - 3R_1
both rows become zero
one pivot: rank 11

Example 2 · a wide matrix

3 × 4
(121024313641)\begin{pmatrix} 1 & 2 & 1 & 0 \\ 2 & 4 & 3 & 1 \\ 3 & 6 & 4 & 1 \end{pmatrix}: R2−2R1R_2 - 2R_1, R3−3R1R_3 - 3R_1
both new rows are (0,0,1,1)(0, 0, 1, 1); R3−R2=0R_3 - R_2 = 0
pivots in columns 11 and 33: rank 22, nullity 4−2=24 - 2 = 2

Example 3 · a square matrix

determinant test
det⁡(102011114)=1(4−1)−0+2(0−1)=1\det\begin{pmatrix} 1 & 0 & 2 \\ 0 & 1 & 1 \\ 1 & 1 & 4 \end{pmatrix} = 1(4 - 1) - 0 + 2(0 - 1) = 1
first-row expansion
det⁡≠0\det \neq 0: rank 33, full rank
Count the pivots as they appear in the matrix rank visualizer.

See it happen

Row operations replace rows by combinations of rows, so they never change how many independent directions the rows span. Elimination squeezes every dependent row down to zero; the rows that survive, one per pivot, are independent. Their count is the dimension of the row space, and it always equals the dimension of the column space.

Common mistakes

Counting nonzero rows too early

✗ (121013026)\begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & 3 \\ 0 & 2 & 6 \end{pmatrix} has rank 33
✓ not in echelon form yet; R3−2R2=0R_3 - 2R_2 = 0, so the rank is 22

Counting nonzero entries instead of pivots

✗ (123005)\begin{pmatrix} 1 & 2 & 3 \\ 0 & 0 & 5 \end{pmatrix} has rank 33
✓ two nonzero rows, two pivots: rank 22

Taking basis columns from the reduced matrix

✗ the pivot columns of the echelon form span the column space of AA
✓ take the pivot columns of the original AA

A rank above the size

✗ a 2×52 \times 5 matrix of rank 33
✓ rank ≤min⁡(2,5)=2\le \min(2, 5) = 2