Matrix Rank Calculator
Calculate the rank of any matrix using Gaussian elimination (row echelon form). Get step-by-step row reduction, pivot analysis, column space and null space dimensions, and visual heatmap. Supports matrices up to 10×10.
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (ad‑free + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (ad‑free)
About Matrix Rank Calculator
Welcome to the Matrix Rank Calculator, a comprehensive linear algebra tool that determines the rank of any matrix using Gaussian elimination. The rank of a matrix is the maximum number of linearly independent row or column vectors — a fundamental concept that governs whether systems of equations have solutions, whether transformations are invertible, and how data can be compressed. This calculator provides step-by-step row reduction, pivot analysis, null space computation, visual heatmaps, and verification via the Rank-Nullity Theorem.
What is Matrix Rank?
The rank of a matrix A is defined as:
Equivalently, the rank is:
- The number of pivot positions in the row echelon form of A
- The dimension of the column space (image) of A
- The dimension of the row space of A
- The number of nonzero singular values of A
- The size of the largest nonzero minor (square submatrix determinant)
For an m×n matrix, the rank satisfies \(0 \leq \text{rank}(A) \leq \min(m, n)\).
How Gaussian Elimination Determines Rank
Gaussian elimination (also called row reduction) transforms a matrix into row echelon form (REF) using three elementary row operations:
- Row swapping: Exchange two rows (\(R_i \leftrightarrow R_j\))
- Row scaling: Multiply a row by a nonzero scalar (\(R_i \leftarrow c \cdot R_i\))
- Row addition: Add a multiple of one row to another (\(R_i \leftarrow R_i + c \cdot R_j\))
In row echelon form:
- All zero rows are at the bottom
- The leading entry (pivot) of each nonzero row is to the right of the pivot above it
- The rank equals the number of nonzero rows (pivots) in the REF
This calculator uses partial pivoting — selecting the largest absolute value in each column as the pivot — for improved numerical stability.
The Rank-Nullity Theorem
Where n is the number of columns of A. The nullity is the dimension of the null space (kernel) — the set of all solutions to Ax = 0. This theorem means that columns are either pivot columns (contributing to rank) or free columns (contributing to nullity), and every column is one or the other.
Rank and Systems of Linear Equations
The rank of a matrix directly determines the solvability of a linear system Ax = b:
Special Cases and Properties
Full Rank
A matrix is full rank when rank(A) = min(m, n):
- For square n×n matrices: full rank means invertible (det ≠ 0), trivial null space
- For tall matrices (m > n): full column rank means injective (one-to-one)
- For wide matrices (m < n): full row rank means surjective (onto)
Rank-Deficient Matrices
If rank(A) < min(m, n), the matrix is rank-deficient (singular for square matrices). This occurs when rows or columns are linearly dependent — some rows can be expressed as combinations of others.
Key Rank Identities
- rank(A) = rank(AT) — row rank equals column rank
- rank(AB) ≤ min(rank(A), rank(B)) — product rank bound
- rank(A + B) ≤ rank(A) + rank(B) — subadditivity
- rank(ATA) = rank(AAT) = rank(A)
Matrix Rank in Different Fields
| Field | Application of Rank |
|---|---|
| Linear Algebra | Solving systems, invertibility, change of basis |
| Statistics | Multicollinearity detection, design matrix analysis |
| Control Theory | Controllability and observability rank conditions |
| Signal Processing | Low-rank approximation, noise filtering |
| Machine Learning | Feature selection, PCA, matrix factorization |
| Structural Engineering | Kinematic determinacy, degrees of freedom |
Frequently Asked Questions
What is the rank of a matrix?
The rank of a matrix is the maximum number of linearly independent row vectors (or equivalently, column vectors) in the matrix. It tells you the dimension of the column space (or row space). For an m×n matrix, the rank is at most min(m, n). A matrix with rank equal to min(m, n) is called full rank.
How is matrix rank calculated using Gaussian elimination?
Gaussian elimination transforms a matrix into row echelon form (REF) by performing elementary row operations: swapping rows, multiplying a row by a nonzero scalar, and adding a multiple of one row to another. The rank equals the number of nonzero rows (equivalently, the number of pivot positions) in the REF. This method is the standard algorithmic approach taught in linear algebra courses.
What is the Rank-Nullity Theorem?
The Rank-Nullity Theorem states that for any m×n matrix A, rank(A) + nullity(A) = n, where n is the number of columns. The nullity is the dimension of the null space (the set of all vectors x such that Ax = 0). This fundamental theorem connects the dimensions of the column space and the null space.
When is a matrix full rank?
A matrix is full rank when its rank equals min(m, n), the smaller of its row and column counts. For a square n×n matrix, full rank means rank = n, which implies the matrix is invertible (nonsingular) with a nonzero determinant. Full-rank matrices have trivial null spaces (only the zero vector) and their columns are linearly independent.
What is the difference between row rank and column rank?
A fundamental theorem in linear algebra proves that the row rank (dimension of the row space) always equals the column rank (dimension of the column space) for any matrix. This common value is simply called the rank of the matrix. Gaussian elimination reveals the row rank directly by counting pivot rows, but the same number also gives the column rank.
How does matrix rank relate to systems of linear equations?
For a system Ax = b, the rank determines solvability: if rank(A) = rank([A|b]), the system is consistent (has solutions). If additionally rank(A) = n (number of unknowns), the solution is unique. If rank(A) < n, there are infinitely many solutions parameterized by n - rank(A) free variables. The Rouché-Capelli theorem formalizes these conditions.
Additional Resources
Reference this content, page, or tool as:
"Matrix Rank Calculator" at https://MiniWebtool.com// from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: Feb 20, 2026
You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.