Math July 13, 2026 · 8 Min Read

Matrix Rank Calculator – Guide & Formulas

Calculate the rank of any matrix using Gaussian elimination. Step-by-step row reduction showing pivots, row echelon form, and rank determination.

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).

Key Takeaway

Use the free Matrix Rank Calculator to calculate the rank of any matrix using gaussian elimination. step-by-step row reduction showing pivots, row echelon form, and rank determination. Get instant results with step-by-step explanations.

How to Use the Matrix Rank Calculator

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

The Formula

rank(A) = number of pivot positions in the row echelon form of A = number of linearly independent rows = number of linearly independent columns.

Variable Definitions

  • 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

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.

Frequently Asked 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.