Math Last updated: July 2026

Matrix Rank Calculator

The Matrix Rank Calculator determines the rank of any matrix using Gaussian elimination to reduce it to row echelon form. Enter your matrix and the calculator performs step-by-step row operations, identifies pivot positions, and determines the rank (number of linearly independent rows).

How to Use the Matrix Rank Calculator

Interactive calculator available after JavaScript loads.

Loading calculator...

Written by Calculator Archive Team

Math & Finance Experts — Verified Formulas, Peer-Reviewed Sources, Expert Analysis

Looking for a deeper explanation?

Read our comprehensive, peer-reviewed educational article in our Blog to learn the underlying math, formulas, and step-by-step examples.

Read Blog Guide ›

Mathematical Formula & Logic

rank(A) = number of pivot positions in the row echelon form of A = number of linearly independent rows = number of linearly independent columns.
Variable Glossary
A The input matrix of size m × n
rank(A) The rank of matrix A — the dimension of the column/row space
pivot The first nonzero entry in a row during Gaussian elimination
REF Row Echelon Form — the triangular form after elimination

Step-by-Step Worked Calculation

Scenario: Example: Rank of a 3×3 Matrix

Find the rank of A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]].

1

Step 1: Write the matrix: [[1, 2, 3], [4, 5, 6], [7, 8, 9]].

2

Step 2: R2 — R2 — 4×R1: [[1, 2, 3], [0, —3, —6], [7, 8, 9]].

3

Step 3: R3 — R3 — 7×R1: [[1, 2, 3], [0, —3, —6], [0, —6, —12]].

4

Step 4: R3 — R3 — 2×R2: [[1, 2, 3], [0, —3, —6], [0, 0, 0]].

5

Step 5: Count pivots: 2 pivot positions (in rows 1 and 2).

6

Step 6: Rank = 2. The third row is a linear combination of the first two.

How to Use the Matrix Rank Calculator

  1. 1. Select the matrix dimensions (rows and columns).
  2. 2. Enter the values for each element in the matrix.
  3. 3. Click "Calculate" to perform Gaussian elimination.
  4. 4. Review the row echelon form, pivot positions, and rank.
  5. 5. Check the step-by-step row operations used in the reduction.

What Is a Matrix Rank Calculator?

Matrix Rank Calculator is a mathematical computation tool that helps you calculate the rank of any matrix using Gaussian elimination. Step-by-step row reduction showing pivots, row echelon form, and rank determination. It applies established mathematical principles to deliver accurate results, often showing the underlying formula and step-by-step working so you can understand the computation process.

Why This Calculation Matters

Mathematical calculations form the foundation of science, engineering, finance, and everyday problem-solving. Matrix Rank Calculator helps you work through calculations accurately and efficiently, reducing the risk of manual arithmetic errors. Whether you are a student learning concepts, a professional verifying work, or anyone needing quick and reliable math results, this tool ensures precision and saves time.

Historical Background

Mathematics has evolved over thousands of years, from ancient Babylonian clay tablets and Egyptian papyri to Greek formal proofs by Euclid and Archimedes. The development of algebra by Persian mathematician al-Khwarizmi in the 9th century and the invention of calculus by Newton and Leibniz in the 17th century laid the groundwork for modern computation. Matrix Rank Calculator continues this tradition by making mathematical operations accessible through digital technology.

Frequently Asked Questions

Complete indexable directory of answers (23 questions)

What is the rank of a matrix?

The rank of a matrix is the maximum number of linearly independent rows (or columns) in the matrix. It equals the number of pivot positions in the row echelon form and represents the dimension of the column space (or row space).

How do I find the rank of a matrix?

The most common method is Gaussian elimination: reduce the matrix to row echelon form and count the number of nonzero rows (pivots). Each pivot corresponds to a linearly independent row.

What is the maximum rank of a matrix?

The maximum rank of an m × n matrix is min(m, n). A matrix achieves full rank when its rank equals this maximum, meaning all rows (or columns) are linearly independent.

What does rank tell me about a matrix?

Rank tells you the "information content" of a matrix. Full rank means no redundancy. Rank deficient (rank < min(m,n)) means some rows/columns are linear combinations of others, indicating redundancy.

How does rank relate to the determinant?

For a square n × n matrix, the matrix has full rank (rank = n) if and only if its determinant is nonzero. If det(A) = 0, the rank is less than n and the matrix is singular.

What is the rank of a zero matrix?

The rank of a zero matrix (all elements are 0) is 0, because there are no nonzero rows and thus no linearly independent rows.

What is the rank-nullity theorem?

The rank-nullity theorem states that for an m × n matrix A: rank(A) + nullity(A) = n, where nullity(A) is the dimension of the null space (kernel). This is a fundamental theorem in linear algebra.

What is row echelon form?

Row echelon form (REF) is a triangular form where: (1) all nonzero rows are above any zero rows, (2) the leading entry (pivot) of each row is to the right of the pivot in the row above, and (3) all entries below a pivot are zero.

What is reduced row echelon form?

Reduced row echelon form (RREF) is a stricter form of REF where: (1) each pivot is 1, (2) each pivot is the only nonzero entry in its column. RREF is unique for each matrix, while REF is not.

Can two different matrices have the same rank?

Yes, infinitely many matrices can share the same rank. For example, all 3×3 matrices with rank 2 form a large set. Rank is a property that groups matrices by their "dimensionality."

How does row operations affect rank?

Elementary row operations (swapping rows, scaling a row, adding a multiple of one row to another) do not change the rank of a matrix. This is why Gaussian elimination preserves rank.

What is the rank of a matrix times its transpose?

rank(AᵀA) = rank(A) = rank(Aᵀ). The product AᵀA has the same rank as A. This property is useful in proving that row rank equals column rank.

What is the rank of a product of matrices?

rank(AB) ≤ min(rank(A), rank(B)). The rank of a product cannot exceed the rank of either factor. Equality holds under certain conditions (e.g., when both matrices have full column/row rank.

How does rank relate to linear independence?

A set of vectors is linearly independent if and only if the rank of the matrix formed by those vectors equals the number of vectors. If rank < number of vectors, they are linearly dependent.

What is the rank of a diagonal matrix?

The rank of a diagonal matrix equals the number of nonzero diagonal entries. Zero diagonal entries do not contribute to the rank.

What is the rank of an identity matrix?

The rank of the n × n identity matrix is n (full rank), because all n rows are linearly independent.

How is rank used in solving linear systems?

For Ax = b, the system has a solution if and only if rank(A) = rank([A|b]). If rank(A) < rank([A|b]), the system is inconsistent. If rank(A) = rank([A|b]) < n, there are infinitely many solutions.

What is the computational complexity of finding rank?

Gaussian elimination to find rank requires O(m × n × min(m,n)) operations, which is O(n³) for square matrices. This is the standard algorithm for rank computation.

Can I find rank without row reduction?

Yes, alternative methods include computing determinants of submatrices, using the SVD (rank = number of nonzero singular values), or computing the eigenvalues of AᵀA. However, Gaussian elimination is the most efficient.

What is the rank of a random matrix?

A random m × n matrix with entries drawn from a continuous distribution has rank min(m, n) with probability 1. Rank deficiency is a measure-zero event for random matrices.

What mathematical formula does the Matrix Rank Calculator use?

The Matrix Rank Calculator uses standard mathematical formulas validated against authoritative references. The specific formula is displayed in the calculator interface with a detailed explanation of each variable.

How can I verify the Matrix Rank Calculator results manually?

Each calculator includes a step-by-step worked example showing exactly how the formula is applied. You can follow these steps with pen and paper to verify any result.

What types of inputs does the Matrix Rank Calculator accept?

The Matrix Rank Calculator accepts numeric inputs including integers and decimals. Invalid inputs (letters, special characters) are rejected with clear error messages.