Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Rank of a Matrix






Measuring the Effective Size of a Matrix

A matrix may have many rows and columns, but some of them may carry redundant information — expressible as combinations of others. The rank strips away this redundancy and counts the number of truly independent directions the matrix uses, revealing its effective dimensionality and governing the solvability of every linear system it defines.

For step-by-step results on your own numbers, use the matrix rank calculator on CalculateMatrix.



What Rank Measures

Three rows do not always carry three rows' worth of information.
If one row of a matrix can be built from the others, it adds nothing new — like a list of three facts where the third follows from the first two. Counting rows overstates how much the matrix really says.
Three 3 × 3 matrices, each with three rows, carry 3, 2 and 1 independent rows.
The middle one looks harmless — no row is a multiple of another — yet its third row is 2⋅(4,5,6)−(1,2,3)2 \cdot (4, 5, 6) - (1, 2, 3).
rows of the 3 × 3 matrixrows that repeat informationindependent rows
(1, 0, 0), (0, 1, 0), (0, 0, 1)none3
(1, 2, 3), (4, 5, 6), (7, 8, 9)row 3 = 2 · row 2 − row 12
(1, 2, 3), (2, 4, 6), (3, 6, 9)rows 2 and 3 are multiples of row 11
The count is forced by what can be rebuilt: a row that is a combination of the others can be dropped without losing anything.
Drop row 3 from the middle matrix and every combination of its rows can still be made from rows 1 and 2. Rows 1 and 2 cannot be cut further — neither is a multiple of the other — so 22 is the true count.
When rank(A)=min⁡(m,n)\text{rank}(A) = \min(m, n), the matrix has full rank — every row and every column contributes something that no combination of the others can reproduce. When rank(A)<min⁡(m,n)\text{rank}(A) < \min(m, n), the matrix is rank-deficient, meaning at least one row or column is a linear combination of the others.
The definition
The rank of a matrix is the number of independent rows it has — equivalently, the number of independent columns: the number of genuinely different directions the matrix uses.
The rank of an m×nm \times n matrix AA is a single non-negative integer rr that captures how much of the matrix's potential dimensionality is actually used. It satisfies
Rank Bounds
0≤rank(A)≤min⁡(m,n)0 \leq \text{rank}(A) \leq \min(m, n)
So the matrix with rows (1,2,3)(1, 2, 3), (4,5,6)(4, 5, 6), (7,8,9)(7, 8, 9) has rank 22.
Rank is a single whole number per matrix, sitting between 0 and the shorter side.
Pitfall: Checking rows only in pairs
Concluding rank 33 because no row of (123456789)\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix} is a multiple of another misses combinations of several rows. Row 33 is 2⋅2 \cdot row 2−2 - row 11, so the rank is 22.
A 5×35 \times 3 matrix with rank 33 uses all three of its column directions. A 5×35 \times 3 matrix with rank 22 has one column that is redundant — it lies in the span of the other two. The rank does not say which column is redundant (often more than one subset works), only that the effective column count is 22.
DownloadPNG2×PDF
How much dimensionality is used
The rank of an m×nm \times n matrix is a single non-negative integer that can never exceed min⁡(m,n)\min(m, n). Whether it reaches that ceiling splits matrices into two conditions.
Rank bounds
0≤rank(A)≤min⁡(m,n)0 \leq \text{rank}(A) \leq \min(m, n)
split by rank(A)\text{rank}(A) compared with min⁡(m,n)\min(m, n)
✓
Case 1
rank(A)=min⁡(m,n)\text{rank}(A) = \min(m, n)
Full rank
every row and every column contributes something that no combination of the others can reproduce
e.g.a 5×35 \times 3 matrix with rank 33 uses all three column directions
−
Case 2
rank(A)<min⁡(m,n)\text{rank}(A) < \min(m, n)
Rank-deficient
at least one row or column is a linear combination of the others
e.g.a 5×35 \times 3 matrix with rank 22 has one redundant column, in the span of the other two
Takeaway
The rank does not say which row or column is redundant, often more than one subset works; it only gives the effective count.
Full rank or rank-deficient·/linear-algebra/matrix/rankLearn Math Class
Rank counts the independent directions a matrix actually uses, not the rows or columns it happens to have.
What generalizes: rows or columns give the same count — a fact that needs proof.
Counting independent rows and counting independent columns could have given two different numbers; they never do, which is why one word, rank, covers both. The section on column rank and row rank explains why.
The rest of the page covers rank notation, row and column rank, computing rank by row reduction, and how rank connects to dimension, linear systems, the rank-nullity theorem and the properties of rank.

Rank Notation

Notation

Rank Notation

One unqualified word standing for two quantities that are only equal because a theorem says so, an operator with four spellings, and a bound whose ceiling names the two conditions a matrix can be in. All of them are catalogued among the linear algebra symbols.
The m×nm \times n shape and the entry brackets come from matrix operation notation; dim⁡\dim, Col⁡\operatorname{Col} and Nul⁡\operatorname{Nul} from fundamental-space notation; ker⁡\ker, Im⁡\operatorname{Im} and the rank–nullity dictionary from image and kernel notation.
rank⁡(A)\operatorname{rank}(A)
the rank of A
An operator name set upright, like det⁡\det and tr⁡\operatorname{tr} — it takes a matrix of any shape and returns a single non-negative integer, as What Rank Measures above defines. Unlike the trace and the determinant it does not require a square matrix, which is why the bound below has to mention both dimensions.
Also writtenrk⁡(A)\operatorname{rk}(A) is the common short form and appears on this page alongside the long one; rg⁡(A)\operatorname{rg}(A) in German and French texts (from Rang); and ρ(A)\rho(A) in older and some engineering sources — a spelling worth knowing but not imitating, since ρ\rho is heavily booked elsewhere.
Do not confuseThe Greek ρ\rho at its other posts — spectral radius in numerical analysis, correlation in statistics, density in physics. When a source writes ρ(A)\rho(A) for a matrix, the surrounding claim decides whether it means rank or spectral radius, and the two are unrelated numbers.
0≤rank⁡(A)≤min⁡(m,n)0 \le \operatorname{rank}(A) \le \min(m, n)
rank runs from zero up to the smaller dimension
The ceiling is min⁡(m,n)\min(m, n), not mm or nn — the shorter side of the matrix caps how many independent directions there can be. Hitting the ceiling is full rank; falling short is rank-deficient. Those two words are the notation's whole vocabulary for a matrix's condition.
CasesOnly the zero matrix reaches the floor: rank⁡(A)=0\operatorname{rank}(A) = 0 means every entry vanishes. For a square n×nn \times n matrix, full rank =n= n is exactly invertibility, which is why rank⁡(A)=n\operatorname{rank}(A) = n, det⁡(A)≠0\det(A) \neq 0 and "A−1A^{-1} exists" are three spellings of one condition — the determinant and inverse pages state the same fact in their own marks.
Do not confuseReading "full rank" as "square". A 5×35 \times 3 matrix of rank 33 is at full rank while being nowhere near square — the term measures attainment of the min⁡(m,n)\min(m,n) ceiling, not the shape of the array.
column rank == row rank =rank⁡(A)= \operatorname{rank}(A)
the two rank counts coincide, so the bare word is unambiguous
The single unqualified word is licensed by a theorem, not by convention: the columns live in Rm\mathbb{R}^m and the rows in Rn\mathbb{R}^n — different spaces — yet the two counts always agree, as Column Rank and Row Rank below proves. Only that equality makes it safe to write rank⁡(A)\operatorname{rank}(A) with no qualifier at all.
CasesThe qualified forms survive where the distinction is being argued rather than used — a proof will say "row rank" while establishing the equality, then drop the adjective forever after. In the four fundamental subspaces the same number appears as dim⁡(Col⁡A)\dim(\operatorname{Col} A) and dim⁡(Row⁡A)\dim(\operatorname{Row} A), which is the dimension dialect of the same claim.
Do not confuseTreating the equality as a definition. It is a result — the notation quietly depends on it, and a reader who assumes the bare word was simply defined to be unambiguous misses that something had to be proved before the word could exist.
DownloadPNG2×PDF
Notation · Cheat sheet
Matrix Notation at a Glance
The marks from the notation cards across the matrix pages: how each is read and what it means. Every group links to the full card on its page.
Matrix operations
A=(aij)A = (a_{ij})
A with entries a i j
Capital for the matrix, aija_{ij} for one entry: row first, column second.
ABAB
A times B
Product written with no sign; needs (m×n)(n×p)(m \times n)(n \times p).
ATA^{T}
A transpose
Rows and columns swapped: (AT)ij=aji(A^{T})_{ij} = a_{ji}.
Inverse
A−1A^{-1}
A inverse
The matrix with AA−1=A−1A=IAA^{-1} = A^{-1}A = I.
A/BA/B
not defined
No matrix division: AB−1AB^{-1} and B−1AB^{-1}A differ.
(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}
the order reverses
Undo the last step first.
RankThis page
rank⁡(A)\operatorname{rank}(A)
the rank of A
The number of independent columns, which equals the number of independent rows.
min⁡(m,n)\min(m, n)
the cap on the rank
rank⁡(A)≤min⁡(m,n)\operatorname{rank}(A) \le \min(m, n); full rank when it reaches it.
Trace
tr⁡(A)\operatorname{tr}(A)
the trace of A
The sum of the diagonal entries aiia_{ii}.
tr⁡(AB)=tr⁡(BA)\operatorname{tr}(AB) = \operatorname{tr}(BA)
unchanged by rotating factors
Rotations only: tr⁡(ABC)\operatorname{tr}(ABC) need not equal tr⁡(BAC)\operatorname{tr}(BAC).
⟨A,B⟩F\langle A, B \rangle_F
the Frobenius inner product
Equals tr⁡(ATB)\operatorname{tr}(A^{T}B): entries multiplied in pairs, then summed.
Same marks, different job
ATA^{T}A label, not a power: TT is not a number.
A−1A^{-1}The inverse matrix, not 1A\frac{1}{A}, which has no meaning.
a23a_{23} vs a32a_{32}Row 22, column 33 against row 33, column 22: different entries.
Matrix Notation at a Glance·/linear-algebra/matrix/operationsLearn Math Class

Column Rank and Row Rank

The column rank of AA is the dimension of its column space — the subspace of Rm\mathbb{R}^m spanned by the columns of AA. It counts the maximum number of linearly independent columns.

The row rank is the dimension of the row space — the subspace of Rn\mathbb{R}^n spanned by the rows. It counts the maximum number of linearly independent rows.

A fundamental theorem states that these two numbers are always equal:

Column Rank and Row Rank
column rank of A=row rank of A\text{column rank of } A = \text{row rank of } A

This common value is called the rank of AA, written rank(A)\text{rank}(A) or rk(A)\text{rk}(A).

Fact: A million entries, rank 2
The 1000×10001000 \times 1000 matrix holding 1,2,…,1,000,0001, 2, \ldots, 1{,}000{,}000 in reading order has rank 22. Each row is the first row plus a multiple of the all-ones row, and each column is the first column plus a multiple of the all-ones column.

The equality is not obvious. The columns live in Rm\mathbb{R}^m and the rows live in Rn\mathbb{R}^n — two different spaces, potentially of different dimensions. The proof goes through row reduction: elementary row operations do not change the row space, and in reduced row echelon form, the number of nonzero rows (row rank) equals the number of pivot columns (column rank). Since row operations preserve both counts, the equality holds for the original matrix.

Rows and columns live in different spaces, yet they always hold the same number of independent directions.

Computing Rank via Row Reduction

The standard method for finding the rank of a matrix is to reduce it to row echelon form and count the pivot positions.

Worked Example


Computing Rank via Row Reduction
A=(120−1324105−1−23410023−1)A = \begin{pmatrix} 1 & 2 & 0 & -1 & 3 \\ 2 & 4 & 1 & 0 & 5 \\ -1 & -2 & 3 & 4 & 1 \\ 0 & 0 & 2 & 3 & -1 \end{pmatrix}

Subtract 22 times row 11 from row 22, and add row 11 to row 33:

Computing Rank via Row Reduction
(120−130012−1003340023−1)\begin{pmatrix} 1 & 2 & 0 & -1 & 3 \\ 0 & 0 & 1 & 2 & -1 \\ 0 & 0 & 3 & 3 & 4 \\ 0 & 0 & 2 & 3 & -1 \end{pmatrix}

Subtract 33 times row 22 from row 33, and subtract 22 times row 22 from row 44:

Computing Rank via Row Reduction
(120−130012−1000−37000−11)\begin{pmatrix} 1 & 2 & 0 & -1 & 3 \\ 0 & 0 & 1 & 2 & -1 \\ 0 & 0 & 0 & -3 & 7 \\ 0 & 0 & 0 & -1 & 1 \end{pmatrix}

Subtract 33 times row 44 from row 33:

Computing Rank via Row Reduction
(120−130012−100004000−11)\begin{pmatrix} 1 & 2 & 0 & -1 & 3 \\ 0 & 0 & 1 & 2 & -1 \\ 0 & 0 & 0 & 0 & 4 \\ 0 & 0 & 0 & -1 & 1 \end{pmatrix}

Swap rows 33 and 44 to place the pivot:

Computing Rank via Row Reduction
(120−130012−1000−1100004)\begin{pmatrix} 1 & 2 & 0 & -1 & 3 \\ 0 & 0 & 1 & 2 & -1 \\ 0 & 0 & 0 & -1 & 1 \\ 0 & 0 & 0 & 0 & 4 \end{pmatrix}

Pitfall: Counting rows too early
Counting the nonzero rows of (121013026)\begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & 3 \\ 0 & 2 & 6 \end{pmatrix} gives 33, but rows 22 and 33 both start in column 22, so it is not in echelon form yet. Subtracting 22 times row 22 from row 33 leaves a zero row: the rank is 22.

There are four pivots, in columns 11, 33, 44, and 55. So rank(A)=4\text{rank}(A) = 4. Column 22 is the only non-pivot column, corresponding to the single free variable if this matrix were the coefficient matrix of a system.
A3×3123246101→R3×31230−2−2000→rank A2
Elimination finished, pivots counted

The pivots have been marked and counted, and that count is the rank. Row operations were applied throughout without changing the answer, because none of them can create or destroy an independent direction — they only make the existing ones easy to see. Run the elimination on a matrix of your own on the rank visualizer.

Counting pivots is therefore not an approximation to the rank but a direct measurement of it.

Rank and Dimension

For an m×nm \times n matrix AA, the rank can be at most min⁡(m,n)\min(m, n). Whether it reaches this maximum depends on the matrix's entries, not just its shape.

Full column rank means rank(A)=n\text{rank}(A) = n — all nn columns are independent. When AA has full column rank, the system Ax=bAx = \mathbf{b} has at most one solution for any b\mathbf{b}, because no free variables exist. The null space is {0}\{\mathbf{0}\}.

Full row rank means rank(A)=m\text{rank}(A) = m — all mm rows are independent. When AA has full row rank, the system Ax=bAx = \mathbf{b} has at least one solution for every b\mathbf{b}, because the column space is all of Rm\mathbb{R}^m.

When AA is square (m=nm = n) and has full rank nn, both conditions hold simultaneously: the system has exactly one solution for every right-hand side, and AA is invertible.

Full column rank allows at most one solution, full row rank at least one; only a square matrix can have both.

Rank and Linear Systems

The solvability of a linear system Ax=bAx = \mathbf{b} is determined entirely by comparing the rank of the coefficient matrix AA with the rank of the augmented matrix [A∣b][A \mid \mathbf{b}].

THEOREM
A solution exists if and only if rank(A)=rank([A∣b])\text{rank}(A) = \text{rank}([A \mid \mathbf{b}]).

This condition means that b\mathbf{b} lies in the column space of AA — it can be expressed as a linear combination of the columns.

When solutions exist, uniqueness depends on whether the rank equals the number of unknowns nn. If rank(A)=n\text{rank}(A) = n, there are no free variables and the solution is unique. If rank(A)<n\text{rank}(A) < n, there are n−rank(A)n - \text{rank}(A) free variables, and the solution set is an infinite family parametrized by those free variables.

Pitfall: Skipping the consistency check
Seeing rank(A)=1<2\text{rank}(A) = 1 < 2 for x+y=1x + y = 1, x+y=2x + y = 2 and concluding infinitely many solutions ignores b\mathbf{b}. Here rank([A∣b])=2\text{rank}([A \mid \mathbf{b}]) = 2, so the system has no solution.

The three possible outcomes are: rank(A)<rank([A∣b])\text{rank}(A) < \text{rank}([A \mid \mathbf{b}]) means the system is inconsistent and has no solution. rank(A)=rank([A∣b])=n\text{rank}(A) = \text{rank}([A \mid \mathbf{b}]) = n means there is exactly one solution. rank(A)=rank([A∣b])<n\text{rank}(A) = \text{rank}([A \mid \mathbf{b}]) < n means there are infinitely many solutions.

There is no scenario with a finite number of solutions greater than one. A linear system either has zero, one, or infinitely many solutions.
Outcome Rank condition Number of solutions
Inconsistent rank(A) < rank([A | b]) 0 (no solution)
Unique solution rank(A) = rank([A | b]) = n exactly 1
Infinite solutions rank(A) = rank([A | b]) < n;  n − rank(A) free variables ∞ (parametrized family)

The Rank-Nullity Theorem

For an m×nm \times n matrix AA, the rank and the nullity — the dimension of the null space {x:Ax=0}\{\mathbf{x} : A\mathbf{x} = \mathbf{0}\} — satisfy

The Rank-Nullity Theorem
rank(A)+nullity(A)=n\text{rank}(A) + \text{nullity}(A) = n

Pitfall: Subtracting the rank from the rows
Using the number of rows gives a 2×42 \times 4 matrix of rank 22 a nullity of 2−2=02 - 2 = 0. But Ax=0A\mathbf{x} = \mathbf{0} has 44 unknowns, so the nullity is 4−2=24 - 2 = 2.

The nn columns of AA partition into two groups: the pivot columns, which contribute to the column space and drive the rank, and the free columns, which contribute to the null space and drive the nullity. Every column does exactly one of these things.

For a 3×53 \times 5 matrix with rank 22, the nullity is 33. The column space is a two-dimensional subspace of R3\mathbb{R}^3 (a plane through the origin), and the null space is a three-dimensional subspace of R5\mathbb{R}^5.

For a square n×nn \times n matrix, the theorem says rank(A)+nullity(A)=n\text{rank}(A) + \text{nullity}(A) = n. If the rank is nn (full rank), the nullity is 00 — the null space contains only 0\mathbf{0}, and AA is invertible. If the rank is less than nn, the null space is nontrivial, the determinant is zero, and AA is singular.

The rank-nullity theorem is sometimes called the dimension theorem for linear maps. If AA defines a linear transformation T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m, then the rank is the dimension of the image (range) of TT, and the nullity is the dimension of the kernel. Their sum equals the dimension of the domain.
domain — kernel in redcodomain — image in greenker Avim AAv
rank 1 + nullity 1 = 2

A 2 × 2 matrix of rank 1, drawn as what it does. On the left, the domain: a whole line of vectors — the kernel — is sent to zero, so the nullity is 1. On the right, the codomain: every output lands on a single line — the image — so the rank is 1. The two dimensions add up to the 2 input dimensions, exactly as rank + nullity = n says. Change the matrix and watch the two lines trade dimension on the kernel and image visualizer.

Every input dimension is accounted for exactly once: it either survives into the image or collapses into the kernel.

Properties of Rank

The rank function obeys several inequalities and identities that constrain how matrix operations affect it.

The rank of the zero matrix is 00, and this is the only matrix with rank zero. For any nonzero scalar cc, rank(cA)=rank(A)\text{rank}(cA) = \text{rank}(A) — scaling does not create or destroy independence.

Transposition preserves rank:

Rank of Transpose
rank(AT)=rank(A)\text{rank}(A^T) = \text{rank}(A)

This is a restatement of the equality of row rank and column rank.

The rank of a product can only decrease:

Rank Product Inequality
rank(AB)≤min⁡(rank(A),rank(B))\text{rank}(AB) \leq \min(\text{rank}(A), \text{rank}(B))

Multiplying by a matrix can collapse dimensions but cannot create new independent directions. There is also a lower bound due to Sylvester's inequality:

Sylvester Rank Inequality
rank(A)+rank(B)−n≤rank(AB)\text{rank}(A) + \text{rank}(B) - n \leq \text{rank}(AB)

for AA of size m×nm \times n and BB of size n×pn \times p. This says the rank of the product cannot drop too far below the ranks of the factors.

The rank of a sum is bounded by the sum of the ranks:

Rank Sum Inequality
rank(A+B)≤rank(A)+rank(B)\text{rank}(A + B) \leq \text{rank}(A) + \text{rank}(B)

Equality holds when the column spaces of AA and BB intersect only at 0\mathbf{0} and their row spaces also intersect only at 0\mathbf{0}.

Multiplying by an invertible matrix preserves rank exactly:

Rank Invariance Invertible
rank(PAQ)=rank(A)\text{rank}(PAQ) = \text{rank}(A)

for invertible PP and QQ. This is because invertible matrices neither collapse nor create dimensions.
DownloadPNG2×PDF
Matrix · rank

Properties of rank

Rank is constrained rather than computed by these rules — most are inequalities, not identities. That asymmetry is the point: operations can destroy independence but never create it.

08properties
Unconditional3
i
Rank bounds§ 10≤rank⁡(A)≤min⁡(m,n)0 \leq \operatorname{rank}(A) \leq \min(m, n)
Rank cannot exceed either dimension, because it counts independent rows and independent columns…
Unconditional
Requires
AA is m×nm \times n

Rank cannot exceed either dimension, because it counts independent rows and independent columns simultaneously and those counts agree. A matrix reaching this bound has full rank; anything less is rank-deficient, meaning some row or column is a linear combination of the others.

ii
Zero matrix§ 7rank⁡(A)=0  ⟺  A=O\operatorname{rank}(A) = 0 \iff A = O
The only matrix of rank zero.
Unconditional

The only matrix of rank zero. Any nonzero entry gives at least one independent row, so rank zero and the zero matrix are the same condition stated two ways.

iv
Transpose invariance§ 2rank⁡(AT)=rank⁡(A)\operatorname{rank}(A^{\mathsf{T}}) = \operatorname{rank}(A)
A restatement of row rank equalling column rank.
Unconditional
Requires
any AA

A restatement of row rank equalling column rank. It is the reason rank can be defined without saying which of the two is meant, and why a wide matrix and its tall transpose describe the same amount of structure.

Conditional5
iii
Scalar multiple§ 7rank⁡(cA)=rank⁡(A)\operatorname{rank}(cA) = \operatorname{rank}(A)
Scaling neither creates nor destroys independence.
Conditional
Holds when
c≠0c \neq 0

Scaling neither creates nor destroys independence. At c=0c = 0 the statement collapses — every rank drops to zero at once — which is why the condition is not decoration.

v
Rank of a product§ 7rank⁡(AB)≤min⁡(rank⁡(A),rank⁡(B))\operatorname{rank}(AB) \leq \min\bigl(\operatorname{rank}(A), \operatorname{rank}(B)\bigr)
Multiplication can collapse directions but never create independent ones — the image of AB sits…
Upper bound only
Holds when
product defined

Multiplication can collapse directions but never create independent ones — the image of ABAB sits inside the image of AA, and its rank is capped by whatever BB passes through first. Equality is common but not guaranteed, so this bounds rather than determines.

Strict inequalityA = [[1, 0], [0, 0]], B = [[0, 0], [0, 1]]
rank(A) = rank(B) = 1, but AB = O with rank 0
vi
Sylvester’s inequality§ 7rank⁡(A)+rank⁡(B)−n≤rank⁡(AB)\operatorname{rank}(A) + \operatorname{rank}(B) - n \leq \operatorname{rank}(AB)
The companion to the bound above: rank cannot drop arbitrarily far.
Lower bound
Holds when
AA is m×nm \times n and BB is n×pn \times p

The companion to the bound above: rank cannot drop arbitrarily far. If both factors have full rank nn, the inequality forces rank⁡(AB)≥n\operatorname{rank}(AB) \geq n, so the product has full rank too — which is how the invertibility of a product of invertible matrices follows.

vii
Rank of a sum§ 7rank⁡(A+B)≤rank⁡(A)+rank⁡(B)\operatorname{rank}(A + B) \leq \operatorname{rank}(A) + \operatorname{rank}(B)
Adding matrices cannot produce more independent directions than the two contribute between…
Upper bound only
Holds when
A,BA, B same shape
Common error
reading it as an equality — the sum can have lower rank than either factor

Adding matrices cannot produce more independent directions than the two contribute between them, but it can produce fewer. Unlike the determinant, which has no sum rule at all, rank has a bound — just not an identity.

WitnessA = I₂, B = −I₂, both rank 2
A + B = O with rank 0, far below either
viii
Multiplication by an invertible matrix§ 7rank⁡(PAQ)=rank⁡(A)\operatorname{rank}(PAQ) = \operatorname{rank}(A)
An invertible matrix loses nothing, so it cannot change the rank of what it multiplies.
Conditional
Holds when
PP and QQ invertible

An invertible matrix loses nothing, so it cannot change the rank of what it multiplies. This is why row reduction computes rank correctly — every elementary operation is multiplication by an invertible matrix, and the echelon form has the same rank as the original.

Unconditional
Conditional
Rank bounds§ 1Unconditional
0≤rank⁡(A)≤min⁡(m,n)0 \leq \operatorname{rank}(A) \leq \min(m, n)
Requires
AA is m×nm \times n
Rank cannot exceed either dimension, because it counts independent rows and independent columns simultaneously and those counts agree. A matrix reaching this bound has full rank; anything less is rank-deficient, meaning some row or column is a linear combination of the others.
Read the full section
Zero matrix§ 7Unconditional
rank⁡(A)=0  ⟺  A=O\operatorname{rank}(A) = 0 \iff A = O
The only matrix of rank zero. Any nonzero entry gives at least one independent row, so rank zero and the zero matrix are the same condition stated two ways.
Read the full section
rank⁡(cA)=rank⁡(A)\operatorname{rank}(cA) = \operatorname{rank}(A)
Holds when
c≠0c \neq 0
Scaling neither creates nor destroys independence. At c=0c = 0 the statement collapses — every rank drops to zero at once — which is why the condition is not decoration.
Read the full section
rank⁡(AT)=rank⁡(A)\operatorname{rank}(A^{\mathsf{T}}) = \operatorname{rank}(A)
Requires
any AA
A restatement of row rank equalling column rank. It is the reason rank can be defined without saying which of the two is meant, and why a wide matrix and its tall transpose describe the same amount of structure.
Read the full section
Rank of a product§ 7Upper bound only
rank⁡(AB)≤min⁡(rank⁡(A),rank⁡(B))\operatorname{rank}(AB) \leq \min\bigl(\operatorname{rank}(A), \operatorname{rank}(B)\bigr)
Holds when
product defined
Multiplication can collapse directions but never create independent ones — the image of ABAB sits inside the image of AA, and its rank is capped by whatever BB passes through first. Equality is common but not guaranteed, so this bounds rather than determines.
Strict inequalityA = [[1, 0], [0, 0]], B = [[0, 0], [0, 1]]
rank(A) = rank(B) = 1, but AB = O with rank 0
Read the full section
rank⁡(A)+rank⁡(B)−n≤rank⁡(AB)\operatorname{rank}(A) + \operatorname{rank}(B) - n \leq \operatorname{rank}(AB)
Holds when
AA is m×nm \times n and BB is n×pn \times p
The companion to the bound above: rank cannot drop arbitrarily far. If both factors have full rank nn, the inequality forces rank⁡(AB)≥n\operatorname{rank}(AB) \geq n, so the product has full rank too — which is how the invertibility of a product of invertible matrices follows.
Read the full section
Rank of a sum§ 7Upper bound only
rank⁡(A+B)≤rank⁡(A)+rank⁡(B)\operatorname{rank}(A + B) \leq \operatorname{rank}(A) + \operatorname{rank}(B)
Holds when
A,BA, B same shape
Common error
reading it as an equality — the sum can have lower rank than either factor
Adding matrices cannot produce more independent directions than the two contribute between them, but it can produce fewer. Unlike the determinant, which has no sum rule at all, rank has a bound — just not an identity.
WitnessA = I₂, B = −I₂, both rank 2
A + B = O with rank 0, far below either
Read the full section
rank⁡(PAQ)=rank⁡(A)\operatorname{rank}(PAQ) = \operatorname{rank}(A)
Holds when
PP and QQ invertible
An invertible matrix loses nothing, so it cannot change the rank of what it multiplies. This is why row reduction computes rank correctly — every elementary operation is multiplication by an invertible matrix, and the echelon form has the same rank as the original.
Read the full section
The one-directional pattern runs through every entry. Multiplication can only lose rank, addition can only be bounded above, and the sole exact identities are the ones where nothing is lost at all — transposition, scaling, and multiplication by an invertible matrix.
Properties of rank·/linear-algebra/matrix/rankLearn Math Class

Rank of Special Matrices

Several matrix types have rank that can be read off directly from their structure.

The identity matrix InI_n has rank nn — all columns are standard basis vectors, which are linearly independent. Every invertible matrix has full rank — an n×nn \times n matrix is invertible exactly when its rank is nn.

A diagonal matrix has rank equal to the number of nonzero diagonal entries. The zero entries correspond to collapsed coordinate directions.

A rank-11 matrix has the form of an outer product of two nonzero vectors:

Rank-One Outer Product
A=uvT,rank(A)=1A = \mathbf{u}\mathbf{v}^T, \quad \text{rank}(A) = 1

Every column of AA is a scalar multiple of u\mathbf{u}, so the column space is the one-dimensional line through u\mathbf{u}. Equivalently, every row is a scalar multiple of vT\mathbf{v}^T. Rank-11 matrices are the building blocks of the outer product decomposition of matrix multiplication.

A symmetric positive definite matrix always has full rank — all its eigenvalues are strictly positive, so no dimension is collapsed. A nilpotent matrix of order n>1n > 1 always has rank strictly less than nn, since its determinant is zero.

The rank of ATAA^T A equals the rank of AA:

Gram Rank Identity
rank(ATA)=rank(A)\text{rank}(A^T A) = \text{rank}(A)

Fact: Complex entries break this identity
For A=(1i)A = \begin{pmatrix} 1 \\ i \end{pmatrix}, ATA=1+i2=0A^T A = 1 + i^2 = 0, so the rank drops from 11 to 00. The step xTATAx=∥Ax∥2\mathbf{x}^T A^T A \mathbf{x} = \|A\mathbf{x}\|^2 needs real entries; complex matrices use the conjugate transpose instead, with rank(A∗A)=rank(A)\text{rank}(A^* A) = \text{rank}(A).

This follows from the fact that the null spaces of AA and ATAA^T A are identical: Ax=0A\mathbf{x} = \mathbf{0} implies ATAx=0A^T A \mathbf{x} = \mathbf{0}, and conversely ATAx=0A^T A \mathbf{x} = \mathbf{0} implies xTATAx=∥Ax∥2=0\mathbf{x}^T A^T A \mathbf{x} = \|A\mathbf{x}\|^2 = 0, so Ax=0A\mathbf{x} = \mathbf{0}. By the rank-nullity theorem, equal nullities with the same nn give equal ranks.

The identity is what makes the least squares normal equations ATAx=ATbA^T A \mathbf{x} = A^T \mathbf{b} dependable. When the columns of AA are independent, ATAA^T A is an invertible n×nn \times n matrix, so the best-fit x\mathbf{x} exists and is unique, even when the original system Ax=bA\mathbf{x} = \mathbf{b} has no solution at all.
DownloadPNG2×PDF
Matrix · rank

Ranks readable from structure

For these types the rank follows from the defining condition, so no reduction is needed. Grouped by whether the structure pins the rank exactly or only bounds it.

5types
Full rank, guaranteed2
Identity§ 8InI_n
ranknn
whycolumns are the standard basis
nullity00
The columns are independent by construction. Trivially the maximum, and the case every other row is measured against.
Symmetric positive definite§ 8xTAx>0\mathbf{x}^{\mathsf{T}}A\mathbf{x} > 0 for x≠0\mathbf{x} \neq \mathbf{0}
ranknn
whyno nonzero vector maps to zero
nullity00
If Ax=0A\mathbf{x} = \mathbf{0} then xTAx=0\mathbf{x}^{\mathsf{T}}A\mathbf{x} = 0, which the condition forbids unless x=0\mathbf{x} = \mathbf{0}. So the null space is trivial and the rank is full — an argument that never mentions rows or columns.
Rank fixed by a count2
Diagonal§ 8diag⁡(d1,…,dn)\operatorname{diag}(d_1, \ldots, d_n)
rankcount of di≠0d_i \neq 0
whyeach nonzero entry is one pivot
nullitycount of di=0d_i = 0
Already in echelon form, so the pivots are the nonzero diagonal entries and no reduction happens. Rank and nullity are read off the same list.
Rank-one outer product§ 8A=uvTA = \mathbf{u}\mathbf{v}^{\mathsf{T}}, both nonzero
rank11
whyevery column is a multiple of u\mathbf{u}
nullityn−1n - 1
Column jj is vjuv_j\mathbf{u}, so the column space is the single line through u\mathbf{u} however large the matrix is. These are the building blocks the SVD sums, and truncating that sum is low-rank approximation.
Only a bound1
Nilpotent§ 8Ak=OA^k = O, A≠OA \neq O
rank<n< n — strictly deficient
whya full-rank matrix has a full-rank power
nullity≥1\geq 1
The condition forces deficiency but does not say by how much: a 3×33 \times 3 nilpotent matrix may have rank 11 or 22. This is the row where structure narrows the answer without determining it, and the reduction still has to be done.
What the reducible cases have in common is a definition that already says how many independent directions there are. A rank-one outer product has one because every column is a multiple of u\mathbf{u}; a diagonal matrix has as many as it has nonzero entries. Where the definition is silent about independence — as with nilpotence — only a bound survives.
Ranks readable from structure·/linear-algebra/matrix/rankLearn Math Class
The last row is the instructive one because it does not behave like the others. Nilpotence forces the rank below nn and stops there — a 3×33 \times 3 nilpotent matrix may have rank one or rank two, and nothing in the definition distinguishes them. Every other row here has a definition that already counts the independent directions; nilpotence only says that some direction collapses, which is a bound rather than a value.

Rank and the Four Fundamental Subspaces

Every m×nm \times n matrix AA gives rise to four subspaces, and the rank governs all of their dimensions.

The column space of AA is the span of the columns, a subspace of Rm\mathbb{R}^m with dimension equal to rank(A)\text{rank}(A). The row space of AA is the span of the rows, a subspace of Rn\mathbb{R}^n also with dimension rank(A)\text{rank}(A). The null space of AA consists of all solutions to Ax=0A\mathbf{x} = \mathbf{0}, a subspace of Rn\mathbb{R}^n with dimension n−rank(A)n - \text{rank}(A). The left null space consists of all solutions to ATy=0A^T\mathbf{y} = \mathbf{0}, a subspace of Rm\mathbb{R}^m with dimension m−rank(A)m - \text{rank}(A).

These four subspaces split into two pairs of orthogonal complements.

THEOREM
In Rn\mathbb{R}^n, the row space and the null space are orthogonal complements: every vector in Rn\mathbb{R}^n can be uniquely decomposed into a row-space component and a null-space component, and the two are perpendicular.

In Rm\mathbb{R}^m, the column space and the left null space form the analogous pair.

The four dimensions add up correctly on both sides: rank(A)+(n−rank(A))=n\text{rank}(A) + (n - \text{rank}(A)) = n in Rn\mathbb{R}^n, and rank(A)+(m−rank(A))=m\text{rank}(A) + (m - \text{rank}(A)) = m in Rm\mathbb{R}^m. The rank is the single number that controls the entire structural decomposition.
Subspace Lives in Description Dimension
Column space of A ℝᵐ span of the columns of A rank(A)
Row space of A ℝⁿ span of the rows of A rank(A)
Null space of A ℝⁿ {x : Ax = 0}; orthogonal complement of the row space n − rank(A)
Left null space of A ℝᵐ {y : Aᵀy = 0}; orthogonal complement of the column space m − rank(A)
A3×3121243364→R = rref(A)3×3120001000
The reduced form all four spaces are read from

Pivot columns and free columns are both visible here, and between them they fix every one of the four spaces: the pivots give the dimensions of the row and column spaces, the free columns give the dimensions of the null spaces. One number, the rank, is doing all of that work at once. See each space extracted in turn on the four fundamental subspaces visualizer.

Rank is best thought of as the single number the four spaces are all sized against.

What Rank Governs

The rank shows up in nearly every structural fact about a matrix — solvability of systems, invertibility, the dimensions of the four fundamental subspaces, the image of the associated linear transformation. The table below collects these roles in one place: each row pairs an aspect of the matrix with what the single integer r=rank(A)r = \text{rank}(A) pins down.
Aspect of A What rank(A) = r determines Reference
Effective dimensionality r truly independent rows (= r independent columns); min(m, n) − r redundant directions column rank = row rank
Column & row space dimension dim(col(A)) = dim(row(A)) = r four fundamental subspaces
Null space dimension nullity(A) = n − r rank-nullity theorem
Solvability of Ax = b consistent iff rank(A) = rank([A | b]); unique iff r = n; infinite iff r < n three outcomes
Invertibility (square A) A invertible iff r = n; equivalently det(A) ≠ 0 full rank condition
Linear transformation T(x) = Ax dim(image(T)) = r; dim(kernel(T)) = n − r dimension theorem

Common Pitfalls

Five mistakes account for many wrong answers about rank. Four are marked with a box where they happen in the sections above, and the fifth, reading the bound on the rank of a sum as an equality, is flagged in the properties card. Here each is worked through in full, with the wrong and the right working side by side.

Checking rows only in pairs

To decide whether the rows of a matrix are independent, they are compared two at a time. If no row is a multiple of another, the matrix is declared to have full rank.

Wrong working: in
A=(123456789)A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}

no row is a multiple of another row, so rank(A)=3\text{rank}(A) = 3.

Right working: reduce. Subtract 44 times row 11 from row 22 and 77 times row 11 from row 33, then subtract 22 times the new row 22 from the new row 33:
(1230−3−60−6−12)→(1230−3−6000)\begin{pmatrix} 1 & 2 & 3 \\ 0 & -3 & -6 \\ 0 & -6 & -12 \end{pmatrix} \to \begin{pmatrix} 1 & 2 & 3 \\ 0 & -3 & -6 \\ 0 & 0 & 0 \end{pmatrix}

There are two pivots, so rank(A)=2\text{rank}(A) = 2. The dependence involves all three rows: (7,8,9)=2(4,5,6)−(1,2,3)(7, 8, 9) = 2(4, 5, 6) - (1, 2, 3).

Why it happens: for two vectors, dependence does mean that one is a multiple of the other. The pairwise test is carried over to three or more rows, where a row can be a combination of several others without being a multiple of any one of them.

How to check: for a square matrix, compute the determinant. Here det⁡(A)=0\det(A) = 0, so the rank is below 33. In general, reduce to echelon form and count the pivots.

Counting rows too early

Elimination is stopped while two rows still start in the same column, and the nonzero rows are counted as if the matrix were already in echelon form.

Wrong working:
(121013026)\begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & 3 \\ 0 & 2 & 6 \end{pmatrix}

has three nonzero rows, so its rank is 33.

Right working: rows 22 and 33 both have their first nonzero entry in column 22. Subtracting 22 times row 22 from row 33 gives
(121013000)\begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & 3 \\ 0 & 0 & 0 \end{pmatrix}

with pivots in columns 11 and 22 only, so the rank is 22.

Why it happens: the zeros at the start of the lower rows look like a finished staircase, and counting nonzero rows is the correct rule once the matrix really is in echelon form.

How to check: before counting, confirm that each nonzero row starts strictly to the right of the row above it. If two rows start in the same column, the reduction is not finished.

Skipping the consistency check

A system with fewer pivots than unknowns is declared to have infinitely many solutions, judging from rank(A)\text{rank}(A) alone.

Wrong working: for the system x+y=1x + y = 1, x+y=2x + y = 2, the coefficient matrix A=(1111)A = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix} has rank 1<21 < 2. That leaves one free variable, so the system has infinitely many solutions.

Right working: subtracting row 11 from row 22 of the augmented matrix [A∣b][A \mid \mathbf{b}] gives the row (0,0,1)(0, 0, 1), which reads 0=10 = 1. So rank([A∣b])=2>rank(A)=1\text{rank}([A \mid \mathbf{b}]) = 2 > \text{rank}(A) = 1, and the system has no solution at all.

Why it happens: the count of free variables, n−rank(A)n - \text{rank}(A), decides between one solution and infinitely many, and it is applied before the test that decides whether there is any solution.

How to check: compare rank(A)\text{rank}(A) with rank([A∣b])\text{rank}([A \mid \mathbf{b}]) first. A reduced row with zeros in every coefficient position and a nonzero last entry means there is no solution.

Subtracting the rank from the rows

In the rank-nullity theorem, the rank is subtracted from the number of rows mm instead of the number of columns nn.

Wrong working: A=(10210113)A = \begin{pmatrix} 1 & 0 & 2 & 1 \\ 0 & 1 & 1 & 3 \end{pmatrix} is 2×42 \times 4 with rank 22, so nullity(A)=2−2=0\text{nullity}(A) = 2 - 2 = 0, and only x=0\mathbf{x} = \mathbf{0} solves Ax=0A\mathbf{x} = \mathbf{0}.

Right working: Ax=0A\mathbf{x} = \mathbf{0} has 44 unknowns, so nullity(A)=4−2=2\text{nullity}(A) = 4 - 2 = 2. The free variables x3x_3 and x4x_4 give the null space basis (−2,−1,1,0)(-2, -1, 1, 0) and (−1,−3,0,1)(-1, -3, 0, 1), and both vectors satisfy Ax=0A\mathbf{x} = \mathbf{0}.

Why it happens: mm comes first in "m×nm \times n", and the left null space really does have dimension m−rank(A)m - \text{rank}(A), so the two counts get swapped.

How to check: the null space lives in Rn\mathbb{R}^n, the space of inputs x\mathbf{x}. A matrix with more columns than rows always has nullity at least n−m>0n - m > 0, so a nullity of 00 for a wide matrix is impossible.

Treating the sum bound as an equality

The inequality rank(A+B)≤rank(A)+rank(B)\text{rank}(A + B) \leq \text{rank}(A) + \text{rank}(B) is used as if its two sides were equal.

Wrong working: with A=I2A = I_2 and B=(0110)B = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, both of rank 22, rank(A+B)=2+2=4\text{rank}(A + B) = 2 + 2 = 4.

Right working: A+B=(1111)A + B = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}, whose two rows are equal, so rank(A+B)=1\text{rank}(A + B) = 1.

Why it happens: many matrix quantities, such as the trace, add over sums, and rank is expected to behave the same way. Rank counts independent directions, and the directions of AA and BB can overlap or cancel when the matrices are added.

How to check: the rank can never exceed min⁡(m,n)\min(m, n). A rank of 44 for a 2×22 \times 2 matrix is impossible on its face.

Matrix Rank FAQ

Does "full rank" mean the matrix is square?

+
No. Full rank means the rank has reached its ceiling of min⁡(m,n)\min(m, n), the shorter side of the matrix, so a 5×35 \times 3 matrix of rank 33 is at full rank while being nowhere near square. Falling short of that ceiling is called rank-deficient. The term measures attainment, not shape.Read more →

Why can you say "the rank" without specifying row or column rank?

+
Because a theorem licenses it. The columns live in Rm\mathbb{R}^m and the rows in Rn\mathbb{R}^n, genuinely different spaces, yet the two counts always coincide. Only that equality makes the unqualified word safe. It is a result rather than a definition, and something had to be proved before the bare term could exist.Read more →

What does ρ(A)\rho(A) mean when you meet it?

+
It depends entirely on the source, so read the surrounding claim. Older and some engineering texts use ρ(A)\rho(A) for rank, but numerical analysis uses it for the spectral radius and statistics for correlation, and those are unrelated numbers. The unambiguous spellings are rank⁡(A)\operatorname{rank}(A) and its short form rk⁡(A)\operatorname{rk}(A).Read more →

Can a very large matrix have a small rank?

+
Yes, and its size says nothing about it. The 1000×10001000 \times 1000 matrix holding 1,2,…,1,000,0001, 2, \ldots, 1{,}000{,}000 in reading order has rank 22: every row is the first row plus a multiple of the all-ones row, so a million entries are spanned by just two independent rows. Rank counts independent directions, never rows or entries.Read more →

Is rank⁡(A+B)\operatorname{rank}(A + B) equal to rank⁡(A)+rank⁡(B)\operatorname{rank}(A) + \operatorname{rank}(B)?

+
No, the sum of the ranks is only an upper bound: rank⁡(A+B)≤rank⁡(A)+rank⁡(B)\operatorname{rank}(A + B) \le \operatorname{rank}(A) + \operatorname{rank}(B). With A=I2A = I_2 and BB the swap matrix with rows (0,1)(0, 1) and (1,0)(1, 0), both of rank 22, the sum has two equal rows (1,1)(1, 1) and rank 11. The directions of AA and BB can overlap or cancel; A=IA = I and B=−IB = -I even give A+B=OA + B = O, of rank 00.Read more →

Does rank⁡(ATA)=rank⁡(A)\operatorname{rank}(A^{T}A) = \operatorname{rank}(A) hold for complex matrices?

+
Not with the plain transpose. For the column AA with entries 11 and ii, ATA=1+i2=0A^{T}A = 1 + i^2 = 0, so the rank drops from 11 to 00. The proof for real matrices uses xTATAx=∥Ax∥2\mathbf{x}^{T}A^{T}A\mathbf{x} = \|A\mathbf{x}\|^2, which needs real entries. Complex matrices use the conjugate transpose instead, and rank⁡(A∗A)=rank⁡(A)\operatorname{rank}(A^{*}A) = \operatorname{rank}(A) holds for every complex AA.Read more →