Report

Help us improve this tool

Matrix Rank Calculator

Calculate the rank of any matrix using row reduction with detailed step-by-step computation and matrix properties.

O M T

Matrix Rank Calculator - Calculate Matrix Rank Online

Calculate the rank of any matrix using Gaussian elimination (row reduction) with our free online Matrix Rank Calculator. The rank of a matrix is the maximum number of linearly independent row or column vectors, a fundamental concept that determines whether systems of equations have solutions, whether transformations are invertible, and how data can be compressed.

Key Features

  • Gaussian Elimination: Computes rank using row reduction with partial pivoting
  • Step-by-Step Reduction: Watch each row operation as the matrix transforms to row echelon form
  • Rank-Nullity Theorem: Automatically computes nullity using rank(A) + nullity(A) = n
  • Multiple Separators: Input matrices using spaces, commas, semicolons, tabs, or pipes
  • Configurable Precision: Choose decimal precision from 2 to 10 decimal places
  • Matrix Properties: Shows dimensions, rank, nullity, pivot count, and full rank status
  • Quick Examples: Load singular, identity, rank-1, and dependent matrix examples
  • Real-time Results: Rank updates instantly as you modify the matrix
  • Row Echelon Form: View the final REF with copy functionality

How to Use the Matrix Rank Calculator

  1. Enter Matrix: Type your matrix with each row on a new line, values separated by spaces or chosen delimiter
  2. Choose Separator: Select the separator used in your input
  3. Set Precision: Choose decimal precision for the row echelon display
  4. View Results: The rank, nullity, and row echelon form appear instantly
  5. Explore Steps: Review the row reduction steps to understand the computation

What Is Matrix Rank?

The rank of a matrix A is defined as the dimension of its column space (or row space). Equivalently, it is the number of pivot positions in the row echelon form of A. For an m x n matrix, the rank satisfies:

$$0 \leq \text{rank}(A) \leq \min(m, n)$$

A fundamental theorem in linear algebra proves that the row rank always equals the column rank for any matrix. This common value is simply called the rank.

The Rank-Nullity Theorem

The Rank-Nullity Theorem is a cornerstone of linear algebra:

$$\text{rank}(A) + \text{nullity}(A) = n$$

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

Examples

Example 1: 3x3 Singular Matrix (Rank 2)

1 2 3
4 5 6
7 8 9

This well-known singular matrix has rank 2 because the third row is a linear combination of the first two rows (R3 = 2 x R2 - R1). The nullity is 3 - 2 = 1.

Example 2: 3x3 Identity Matrix (Rank 3)

1 0 0
0 1 0
0 0 1

The identity matrix is always full rank. With 3 pivots, the rank equals the dimension (3). The matrix is invertible with determinant 1.

Example 3: 3x2 Rank-1 Matrix

1 2
2 4
3 6

This matrix has rank 1 because the second column is exactly twice the first column. Only one linearly independent column exists.

Matrix Rank and Systems of Linear Equations

The rank of a matrix directly determines the solvability of a linear system Ax = b:

  • Unique Solution: rank(A) = rank([A|b]) = n (number of unknowns). The system is consistent and determined.
  • Infinitely Many Solutions: rank(A) = rank([A|b]) < n. The system has n - rank(A) free parameters.
  • No Solution: rank(A) < rank([A|b]). The system is inconsistent.

Applications of Matrix Rank

Linear Algebra

Rank is essential for solving systems, determining invertibility, and understanding change of basis. A square matrix is invertible if and only if it has full rank.

Statistics and Data Science

Multicollinearity detection in regression analysis uses matrix rank. A design matrix with reduced rank indicates dependent predictors. Principal Component Analysis (PCA) uses rank to determine the number of meaningful components.

Machine Learning

Low-rank matrix factorization is used in recommendation systems, dimensionality reduction, and feature selection. The rank of a data matrix determines the effective dimensionality of the data.

Special Cases

  • Full Rank: rank(A) = min(m, n). Square full-rank matrices are invertible.
  • Rank-Deficient: rank(A) < min(m, n). The matrix has linearly dependent rows or columns.
  • Zero Matrix: rank(0) = 0. The zero matrix has no linearly independent rows.
  • Rank 1: All rows (or columns) are scalar multiples of a single vector.

Frequently Asked Questions

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. For an m x 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.

What is the Rank-Nullity Theorem?

The Rank-Nullity Theorem states that for any m x 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.

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.

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 x n matrix, full rank means rank = n, which implies the matrix is invertible (nonsingular) with a nonzero determinant.

Can the rank be zero?

Yes, the rank of a zero matrix (all entries are zero) is 0, because there are no linearly independent rows or columns. This is the only type of matrix with rank 0.

Explore more matrix operations with the Matrix Determinant Calculator, Matrix Power Calculator, and Matrix Inverse Calculator.