# Rank (linear algebra)

The **rank** of a matrix is the dimension of the vector space spanned by its columns, equivalently the dimension of the space spanned by its rows; these two dimensions are always equal. Rank measures how much independent information a matrix carries: an \( m \times n \) matrix of rank \( r \) maps \( n \)-dimensional inputs onto an \( r \)-dimensional set of outputs, and \( r \le \min(m, n) \).<sup>[1](https://www.cfm.brown.edu/people/dobrush/am34/sage/rank.html)</sup> The concept was introduced by [Ferdinand Georg Frobenius](https://www.edgepedia.org/ferdinand-georg-frobenius) in his 1878 work on linear substitutions and bilinear forms, where he used it in his study of canonical forms.<sup>[2](https://mathshistory.st-andrews.ac.uk/HistTopics/Matrices_and_determinants/)</sup>

| Key fact | Detail |
|---|---|
| Definition | The common dimension of the row space and the column space of a matrix \( A \), denoted rank(\( A \)); the dimension of the null space is the nullity.<sup>[1](https://www.cfm.brown.edu/people/dobrush/am34/sage/rank.html)</sup> |
| Bounds | \( 0 \le \operatorname{rank}(A) \le \min(m, n) \) for an \( m \times n \) matrix; a matrix with rank equal to this maximum is full rank.<sup>[1](https://www.cfm.brown.edu/people/dobrush/am34/sage/rank.html)</sup> |
| Rank–nullity | For a linear map \( T: V \to W \), \( \dim \operatorname{Im}(T) + \dim \operatorname{Ker}(T) = \dim V \); for a matrix with \( n \) columns, rank + nullity = \( n \).<sup>[3](https://www.math.hkust.edu.hk/~ivanip/teaching/LinearAlgebraB/LectureNotes.pdf)</sup> |
| Minor characterization | The rank is the size of the largest nonzero minor, that is, the largest \( k \times k \) submatrix with nonzero determinant.<sup>[4](https://nhigham.com/2021/02/23/matrix-rank-relations/)</sup> |
| Numerical computation | Software computes rank as the number of singular values above a tolerance; MATLAB's default tolerance is \( \max(\operatorname{size}(A)) \cdot \varepsilon(\|A\|) \).<sup>[5](https://www.mathworks.com/help/matlab/ref/rank.html)</sup> |
| History | Frobenius defined rank in 1878; Sylvester defined the nullity of a square matrix in 1884.<sup>[2](https://mathshistory.st-andrews.ac.uk/HistTopics/Matrices_and_determinants/)</sup> |
| Optimization hardness | Minimizing the rank of a matrix over a convex set is computationally NP-hard.<sup>[6](https://authors.library.caltech.edu/records/9cq09-1zw04)</sup> |

## Equivalent definitions

Several characterizations of rank are used interchangeably, and their equivalence is itself a theorem of linear algebra.

**Column and row spaces.** The column space of \( A \) is the set of all linear combinations of its columns, which is exactly the set of outputs \( A\mathbf{x} \); its dimension is the column rank. The row space is defined analogously from the rows. The row space of \( A \) is the column space of \( A^T \), and the theorem that column rank equals row rank follows from rank(\( A \)) = rank(\( A^T \)).<sup>[3](https://www.math.hkust.edu.hk/~ivanip/teaching/LinearAlgebraB/LectureNotes.pdf)</sup><sup> • </sup><sup>[1](https://www.cfm.brown.edu/people/dobrush/am34/sage/rank.html)</sup> Because of this equality, no qualifier is needed: "the rank" is unambiguous.

**Pivots.** Row reduction to echelon form gives a practical count: the rank is the number of pivots, that is, the number of leading variables in the general solution of \( A\mathbf{x} = \mathbf{0} \), while the nullity is the number of free parameters in that solution.<sup>[1](https://www.cfm.brown.edu/people/dobrush/am34/sage/rank.html)</sup> The pivot rows of the echelon form form a basis of the row space, and the pivot columns of the original matrix form a basis of its column space.<sup>[7](https://www.math.brown.edu/streil/papers/LADW/HTML_2026_08-31/Ch3.html)</sup>

**Minors.** [A minor](https://www.edgepedia.org/a-minor) of order \( k \) is the determinant of a \( k \times k \) submatrix formed by choosing \( k \) rows and \( k \) columns. The rank equals the largest order \( k \) for which some minor is nonzero; for a square \( n \times n \) matrix, rank \( n \) is the same statement as \( \det(A) \ne 0 \).<sup>[4](https://nhigham.com/2021/02/23/matrix-rank-relations/)</sup><sup> • </sup><sup>[7](https://www.math.brown.edu/streil/papers/LADW/HTML_2026_08-31/Ch3.html)</sup> This characterization is mainly of theoretical value, since checking all minors is far more expensive than row reduction, but it underlies results such as the fact that the rank of a polynomial matrix \( A(x) \) is constant except at finitely many points where it drops.<sup>[7](https://www.math.brown.edu/streil/papers/LADW/HTML_2026_08-31/Ch3.html)</sup>

## The rank–nullity theorem and the four subspaces

The rank–nullity theorem, sometimes called the fundamental theorem of linear algebra, states that for a linear map \( T: V \to W \) with \( V \) finite-dimensional,

\[ \dim \operatorname{Im}(T) + \dim \operatorname{Ker}(T) = \dim V. \]

In matrix terms, for an \( m \times n \) matrix \( A \), rank(\( A \)) + nullity(\( A \)) = \( n \).<sup>[3](https://www.math.hkust.edu.hk/~ivanip/teaching/LinearAlgebraB/LectureNotes.pdf)</sup><sup> • </sup><sup>[1](https://www.cfm.brown.edu/people/dobrush/am34/sage/rank.html)</sup> The theorem connects the two central objects of the theory: the null space, which is the solution set of \( A\mathbf{x} = \mathbf{0} \), and the column space, which is the set of right-hand sides \( \mathbf{b} \) for which \( A\mathbf{x} = \mathbf{b} \) is consistent.<sup>[8](https://math.libretexts.org/Courses/University_of_California_Irvine/Linear_Algebra_%28Math_3A_UCI%29/01%3A_Systems_of_Linear_Equations/1.07%3A_Basis_and_Dimension/1.7.03%3A_Rank_and_Nullity)</sup>

[Gilbert Strang](https://www.edgepedia.org/gilbert-strang), Professor Emeritus of Mathematics at MIT, organized the subject around the four fundamental subspaces of a rank-\( r \) matrix \( A \): the column space \( C(A) \) and row space \( C(A^T) \), both of dimension \( r \), and the nullspace \( N(A) \) and left nullspace \( N(A^T) \), of dimensions \( n - r \) and \( m - r \).<sup>[9](https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_3-5.pdf)</sup> The rank therefore fixes the dimensions of all four at once. Within \( \mathbb{R}^n \), the row space and nullspace are orthogonal complements whose dimensions sum to \( n \); within \( \mathbb{R}^m \), the column space and left nullspace do the same.<sup>[9](https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_3-5.pdf)</sup>

## Algebraic properties

Rank behaves predictably under the standard matrix operations:

- Transposition leaves it unchanged: rank(\( A \)) = rank(\( A^T \)).<sup>[1](https://www.cfm.brown.edu/people/dobrush/am34/sage/rank.html)</sup>
- [Multiplication](https://www.edgepedia.org/multiplication) cannot increase rank: rank(\( AB \)) \( \le \) min(rank \( A \), rank \( B \)), because the columns of \( AB \) are combinations of the columns of \( A \) and its rows are combinations of the rows of \( B \).<sup>[9](https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_3-5.pdf)</sup>
- Multiplication by an invertible matrix preserves rank exactly.<sup>[9](https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_3-5.pdf)</sup>
- For an \( n \times n \) matrix, the Invertible Matrix Theorem collects the equivalent conditions: \( A \) is invertible if and only if its columns form a basis of \( \mathbb{R}^n \), its rank is \( n \), and its nullity is 0.<sup>[3](https://www.math.hkust.edu.hk/~ivanip/teaching/LinearAlgebraB/LectureNotes.pdf)</sup>
- Every rank-1 matrix factors as \( A = \mathbf{u}\mathbf{v}^T \), a column times a row; more generally a rank-\( r \) matrix admits a rank factorization \( A = CF \) with \( C \in \mathbb{R}^{m \times r} \) and \( F \in \mathbb{R}^{r \times n} \).<sup>[1](https://www.cfm.brown.edu/people/dobrush/am34/sage/rank.html)</sup>

## History

Many standard results of matrix theory appeared before matrices themselves were objects of study. [James Joseph Sylvester](https://www.edgepedia.org/james-joseph-sylvester)'s 1851 paper and [Arthur Cayley](https://www.edgepedia.org/arthur-cayley)'s 1858 *Memoir on the theory of matrices*, which gave the first abstract definition of a matrix, are commonly taken as the starting point of the field's history.<sup>[10](https://epubs.siam.org/doi/10.1137/1.9781611977233.ch1)</sup> Frobenius's 1878 paper *On linear substitutions and bilinear forms* contains the definition of the rank of a matrix, used in his work on canonical forms, along with the definition of orthogonal matrices and the general proof that a matrix satisfies its own characteristic equation.<sup>[2](https://mathshistory.st-andrews.ac.uk/HistTopics/Matrices_and_determinants/)</sup> Sylvester, working on invariants of matrices, defined the nullity \( n(A) \) of a square matrix in 1884 as the largest \( i \) such that every minor of \( A \) of order \( n - i + 1 \) is zero, and proved the bounds \( \max\{n(A), n(B)\} \le n(AB) \le n(A) + n(B) \).<sup>[2](https://mathshistory.st-andrews.ac.uk/HistTopics/Matrices_and_determinants/)</sup>

## Computation and numerical rank

In exact arithmetic, row reduction or minor counting determines the rank. Floating-point computation is different: rounding makes exact zero rare, so software reports a numerical rank, the number of singular values above a tolerance. MATLAB's `rank` function uses the singular value decomposition, counting singular values larger than \( \max(\operatorname{size}(A)) \cdot \varepsilon(\|A\|) \), where \( \varepsilon \) is machine precision; the SVD method costs more than alternatives but is described as the most reliable.<sup>[5](https://www.mathworks.com/help/matlab/ref/rank.html)</sup> The tolerance matters: a 4-by-4 diagonal matrix with entries 10, 25, 34, and \( 10^{-15} \) has numerical rank 3 under the default tolerance but rank 4 when the tolerance is set to \( 10^{-16} \).<sup>[5](https://www.mathworks.com/help/matlab/ref/rank.html)</sup> Rank-revealing QR factorizations offer a cheaper alternative for estimating singular values and identifying rank.<sup>[11](https://www.sciencedirect.com/science/article/pii/S0024379525004707)</sup> For finding a set of \( r \) linearly independent columns of a matrix with \( r = \operatorname{rank}(A) \), randomized algorithms achieve roughly \( O(|A| + r^{\omega}) \) field operations, where \( |A| \) is the number of nonzero entries and \( \omega < 2.38 \) is the matrix multiplication exponent.<sup>[12](https://arxiv.org/abs/1203.6705)</sup>

## Applications

**Low-rank approximation.** The singular value decomposition writes a matrix as \( A = \sum_{i=1}^{r} \sigma_i \mathbf{u}_i \mathbf{v}_i^T \) with singular values \( \sigma_1 \ge \cdots \ge \sigma_r > 0 \). The Eckart–Young theorem states that truncating this sum after \( k \) terms gives the best rank-\( k \) approximation to \( A \) in both the spectral norm and the [Frobenius norm](https://www.edgepedia.org/frobenius-norm), with errors

\[ \min_{\operatorname{rank}(B) \le k} \|A - B\|_2 = \sigma_{k+1}, \qquad \min_{\operatorname{rank}(B) \le k} \|A - B\|_F = \sqrt{\sum_{j > k} \sigma_j^2}. \]

<sup>[13](https://mathworld.wolfram.com/Eckart-YoungTheorem.html)</sup> Mirsky extended the optimality to every unitarily invariant norm.<sup>[14](https://www.andrew.cmu.edu/course/18-661/readings/math4ml.pdf)</sup> [Low-rank approximation](https://www.edgepedia.org/low-rank-approximation) reduces the data needed to store a matrix while retaining most of its information, and randomized algorithms for computing such approximations are now standard tools in data analysis and scientific computing.<sup>[14](https://www.andrew.cmu.edu/course/18-661/readings/math4ml.pdf)</sup><sup> • </sup><sup>[15](https://epubs.siam.org/doi/abs/10.1137/090771806)</sup>

**Control theory.** In state-space control, a linear system \( \dot{x} = Ax + Bu \) is controllable if and only if its controllability matrix \( [B \; AB \; \cdots \; A^{n-1}B] \) has full rank, and observability is tested by the rank of the corresponding observability matrix built from \( A \) and \( C \).<sup>[16](https://eceweb1.rutgers.edu/~gajic/psfiles/chap5.pdf)</sup> These rank tests, introduced by [Rudolf E. Kálmán](https://www.edgepedia.org/rudolf-e-kalman) in 1960, determine what state feedback and estimation can fundamentally achieve.<sup>[17](https://www.cambridge.org/core/books/principles-of-linear-systems/controllability-and-observability-of-linear-systems/24893287CA89B87AB1DB0B4E385089C0)</sup>

**Rank minimization.** Finding a matrix of smallest rank subject to constraints, the rank minimization problem, arises in control, system identification, statistics, and signal processing, and is known to be computationally NP-hard; convex optimization provides heuristic solution methods.<sup>[6](https://authors.library.caltech.edu/records/9cq09-1zw04)</sup>

## References

1. [Rank (Sage Tutorial, Brown University)](https://www.cfm.brown.edu/people/dobrush/am34/sage/rank.html)
2. [Matrices and determinants, MacTutor History of Mathematics, University of St Andrews](https://mathshistory.st-andrews.ac.uk/HistTopics/Matrices_and_determinants/)
3. [Linear Algebra B Lecture Notes, HKUST](https://www.math.hkust.edu.hk/~ivanip/teaching/LinearAlgebraB/LectureNotes.pdf)
4. [Matrix Rank Relations, Nick Higham](https://nhigham.com/2021/02/23/matrix-rank-relations/)
5. [rank – Rank of matrix, MATLAB documentation, MathWorks](https://www.mathworks.com/help/matlab/ref/rank.html)
6. [Rank minimization and applications in system theory, Fazel, Hindi, and Boyd, CaltechAUTHORS](https://authors.library.caltech.edu/records/9cq09-1zw04)
7. [Linear Algebra Done Wrong, Chapter 3: Determinants, Sergei Treil, Brown University](https://www.math.brown.edu/streil/papers/LADW/HTML_2026_08-31/Ch3.html)
8. [Rank and Nullity, Mathematics LibreTexts](https://math.libretexts.org/Courses/University_of_California_Irvine/Linear_Algebra_%28Math_3A_UCI%29/01%3A_Systems_of_Linear_Equations/1.07%3A_Basis_and_Dimension/1.7.03%3A_Rank_and_Nullity)
9. [Introduction to Linear Algebra, 5th edition, Section 3.5, Gilbert Strang, MIT](https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_3-5.pdf)
10. [A Journey through the History of Numerical Linear Algebra, Chapter 1, SIAM](https://epubs.siam.org/doi/10.1137/1.9781611977233.ch1)
11. [Estimating a matrix's singular values with interpolative decompositions, Linear Algebra and its Applications](https://www.sciencedirect.com/science/article/pii/S0024379525004707)
12. [Fast Matrix Rank Algorithms and Applications, arXiv](https://arxiv.org/abs/1203.6705)
13. [Eckart-Young Theorem, Wolfram MathWorld](https://mathworld.wolfram.com/Eckart-YoungTheorem.html)
14. [Low-rank approximation, Math for ML, Carnegie Mellon University](https://www.andrew.cmu.edu/course/18-661/readings/math4ml.pdf)
15. [Finding Structure with Randomness: Probabilistic Algorithms for Constructing Approximate Matrix Decompositions, SIAM Review](https://epubs.siam.org/doi/abs/10.1137/090771806)
16. [Controllability and Observability, Rutgers ECE lecture notes](https://eceweb1.rutgers.edu/~gajic/psfiles/chap5.pdf)
17. [Controllability and observability of linear systems, Principles of Linear Systems, Cambridge University Press](https://www.cambridge.org/core/books/principles-of-linear-systems/controllability-and-observability-of-linear-systems/24893287CA89B87AB1DB0B4E385089C0)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Numbers and algebra › Linear and multilinear algebra › Matrix theory › Matrix operations and matrix algebra*

*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
