Linear Systems Solvers
Choose a solver below
Solving Systems
Decompositions
Vector Spaces
Need Help?
Check the educational content below each solver for detailed explanations.
View all tutorials โMatrix Rank Calculator: Find Rank of a Matrix Step by Step
Compute the rank of a matrix: the number of linearly independent rows or columns. The rank equals the number of pivots in the Reduced Row Echelon Form (RREF).
Calculator
Enter your matrix below and click "Calculate" to see the step-by-step solution.
Enter a matrix to compute its rank.
The rank equals the number of pivots in RREF.
Learn About Rank
Understanding the concepts behind the calculations.
๐ Quick Navigation
What is Matrix Rank?
The rank of a matrix is the maximum number of linearly independent rows (or columns). It measures the "true dimension" of the information contained in the matrix.
For an m ร n matrix:
- Row rank = maximum number of linearly independent rows
- Column rank = maximum number of linearly independent columns
- Key fact: Row rank ALWAYS equals column rank! This common value is simply called the rank.
๐ก Intuition: Rank tells you how many dimensions the matrix "covers" when it transforms space. A rank 1 matrix crushes everything onto a line. A rank 2 matrix maps onto a plane.
How to Compute Rank
The RREF Method (Exact)
The most reliable way to find rank:
- Compute the Reduced Row Echelon Form (RREF) of the matrix
- Count the number of pivots (leading 1's in non-zero rows)
- That count is the rank!
Alternative Methods
- Gaussian Elimination: Count pivots directly (same result)
- Determinants: Find the largest square submatrix with non-zero determinant
- SVD: Count non-zero singular values (most numerically stable)
Pro Tip: Use our Gauss-Jordan Elimination Calculator to find RREF and rank automatically!
The Rank-Nullity Theorem โญ
This is one of the most important theorems in linear algebra:
Where:
- rank(A) = dimension of column space (number of independent columns)
- nullity(A) = dimension of null space (number of free variables)
- n = number of columns
Example: For a 3ร5 matrix with rank 2:
- rank = 2
- nullity = n - rank = 5 - 2 = 3
- This means the null space is 3-dimensional (3 free variables)
Rank & Invertibility
For a square nรn matrix, rank tells you if the matrix is invertible:
โ Full Rank = Invertible
rank(A) = n โ A is invertible
- det(A) โ 0
- All rows/columns independent
- Null space = {0}
โ Rank Deficient = Singular
rank(A) < n โ A is singular
- det(A) = 0
- Some rows/columns dependent
- Non-trivial null space exists
๐ก Use our tools: Inverse Calculator โข Determinant Calculator
Examples
Example 1: Full Rank 3ร3 Matrix
RREF has 3 pivots โ rank = 3 (invertible)
Example 2: Rank Deficient Matrix
Second row = 2 ร first row, third row = 3 ร first row โ rank = 1
Only 1 independent row. Nullity = 3 - 1 = 2 (two free variables).
Example 3: Rectangular Matrix
3ร4 matrix. After elimination, 2 pivots โ rank = 2
Max possible rank for 3ร4 is min(3,4) = 3. This matrix has rank 2 (rank deficient by 1).
Example 4: Zero Matrix
rank = 0 (no independent rows/columns)
Example 5: Identity Matrix
rank = n (full rank, invertible)
Equivalent Definitions of Rank
The rank can be defined in several equivalent ways. All give the same number:
- โ Number of pivots in RREF
- โ Dimension of the column space (Col(A))
- โ Dimension of the row space (Row(A))
- โ Maximum number of linearly independent columns
- โ Maximum number of linearly independent rows
- โ
rank(A) = rank(Aแต)(rank equals rank of transpose) - โ Size of the largest non-zero minor (determinant)
- โ Number of non-zero singular values
๐ Check it out: Use our Linear Independence Checker to test if rows/columns are independent!
Geometric Interpretation
A matrix represents a linear transformation from โโฟ โ โแต. The rank tells you the dimension of the image (output space).
2ร2 Matrix Examples
- rank = 0: Maps everything to zero
- rank = 1: Maps plane onto a line
- rank = 2: Maps plane onto entire plane
3ร3 Matrix Examples
- rank = 0: Maps to origin
- rank = 1: Maps to a line
- rank = 2: Maps to a plane
- rank = 3: Maps to all of โยณ
Key Insight: rank = dimension of the transformation's image. It tells you how many dimensions the matrix "covers" or "reaches".
Real-World Applications
๐ธ Data Compression
Low-rank approximations (SVD) compress images by keeping only important information.
๐ Machine Learning (PCA)
Principal Component Analysis uses rank to determine intrinsic data dimension.
๐ง Control Theory
Rank determines controllability and observability of systems.
๐ Statistics
Degrees of freedom in regression = rank of design matrix.
๐งฌ Bioinformatics
Rank reveals the number of independent gene expression patterns.
๐ก Signal Processing
Rank helps separate signals from noise.
๐ Explore further: Least Squares โข SVD Calculator โข Null Space
Frequently Asked Questions
Q: Can rank be greater than number of rows or columns?
A: No! Always 0 โค rank(A) โค min(m, n). You can't have more independent rows than total rows.
Q: What does rank 1 tell us?
A: All rows are multiples of each other. The matrix collapses everything onto a single line.
Q: Is rank(A) = rank(Aแต) always true?
A: Yes! Row rank always equals column rank. This is a fundamental theorem of linear algebra.
Q: How does rank help solve Ax = b?
A: A solution exists iff rank(A) = rank([A|b]). If rank(A) = n, the solution is unique.
Q: What's the rank of a zero matrix?
A: Zero. No independent rows or columns.
Q: Can a non-square matrix have full rank?
A: Yes! Full rank = rank = min(m, n). For a 3ร5 matrix, full rank = 3 (all rows independent).
Practice Problems
Beginner
- What is the rank of a 4ร4 identity matrix?
- A 3ร3 matrix has two identical rows. What can you say about its rank?
- Find the rank of
[[1, 0], [0, 0]]
Intermediate
- A 3ร5 matrix has rank 2. What is its nullity?
- If A is 4ร4 with det(A) = 0, what is the maximum possible rank?
- Find conditions for a 2ร2 matrix to have rank 1.
Advanced
- Prove: rank(AB) โค min(rank(A), rank(B))
- If A is mรn and rank(A) = m, what does that imply about solutions to Ax = b?
Click to reveal solutions
1. rank = 4 (full rank)
2. rank โค 2 (maximum 2, could be 1 or 2)
3. rank = 1
4. nullity = 5 - 2 = 3
5. Maximum rank = 3 (cannot be 4 if singular)
6. ad - bc = 0 but not all entries zero
7. Image of AB is subset of image of B and A
8. System Ax = b always has a solution (columns span all of โแต), unique if n = m
Summary
Key Takeaways
- Rank = number of linearly independent rows/columns
- 0 โค rank โค min(m, n)
- rank = 0 โบ A is zero matrix
- rank = n (square) โบ A is invertible
- Rank + Nullity = n (Rank-Nullity Theorem)
- rank(A) = rank(Aแต) always
- Rank reveals the true dimension of a matrix's information
๐ฌ Still have questions? Try our Gauss-Jordan Elimination calculator to see rank in action, or explore related tools above!