Matrix Rank Calculator

Compute the rank of a matrix up to 5×5 via row echelon form with nullity, rank-nullity theorem verification, pivot visualization, and step-by-step row reduction.

Matrix A (3×3)
Rank
0
Number of pivot positions (max 3)
Nullity
3
Dimension of null space: 3 − 0 = 3
Rank + Nullity
0 + 3 = 3
Rank-Nullity Theorem: rank(A) + nullity(A) = n (columns)
Full Row Rank
No ✗
Rank 0 < 3 rows
Full Column Rank
No ✗
Rank 0 < 3 columns
Row Space Dim
0
Same as rank — # independent rows
Column Space Dim
0
Same as rank — # independent columns
Matrix Status
Zero Matrix
All entries are zero

Pivot Column Visualization

F
Col 1
Free
F
Col 2
Free
F
Col 3
Free

Rank Ratio

0 / 3

Row Reduction Steps (RREF)

StepOperationResult
0Original matrix[[0.000, 0.000, 0.000], [0.000, 0.000, 0.000], [0.000, 0.000, 0.000]]

Rank Properties Summary

PropertyValueExplanation
rank(A)0Number of linearly independent rows/columns
nullity(A)3Dimension of null space (solution freedom)
Pivot columnsColumns with leading 1s in RREF
Free columns1, 2, 3Columns without pivots (free variables)
Rank + Nullity0 + 3 = 3Equals number of columns (Rank-Nullity Theorem)
System typeInfinitely many or none3 free variable(s)
InvertibleNo ✗Rank deficient → singular
Planning notes, formulas, and examples

About the Matrix Rank Calculator

The rank of a matrix is the maximum number of linearly independent rows (or equivalently columns). It tells you the dimension of the image of the linear transformation represented by the matrix and is one of the most fundamental concepts in linear algebra.

Computing rank involves reducing the matrix to row echelon form (REF) or reduced row echelon form (RREF) and counting the number of non-zero rows, which equals the number of pivot positions. This calculator performs complete row reduction with partial pivoting and displays every step of the process.

The rank-nullity theorem states that for an m×n matrix A, rank(A) + nullity(A) = n, where nullity is the dimension of the null space (kernel). This means the number of pivot columns plus the number of free columns always equals the total number of columns. The tool verifies this identity and identifies which columns are pivot columns and which are free.

Rank determines key properties of the matrix: a square matrix is invertible if and only if it has full rank, a system Ax = b is consistent for every b only if A has full row rank, and the solution is unique only if A has full column rank. The calculator shows all these implications with clear visual indicators.

When This Page Helps

Determining rank requires row-reducing the matrix to echelon form and counting the pivots — a process with many row operations where a single mistake changes the pivot count. This calculator performs full row reduction, identifies pivot and free columns, computes both rank and nullity (via the rank-nullity theorem), and visualizes the pivot structure. It is the fastest way for students to check their row reduction work and for engineers to determine whether a system is solvable or a matrix is full rank.

How to Use the Inputs

  1. Set the matrix dimensions (rows and columns, 1–5)
  2. Enter matrix elements manually or click a preset button
  3. View the rank and nullity in the output cards
  4. Check the rank-nullity theorem verification
  5. Toggle row reduction steps to see the full RREF process
  6. Examine the pivot visualization to see which columns are pivot vs free
Formula used
rank(A) + nullity(A) = n, where n is the number of columns. Rank = number of pivots in RREF.

Example Calculation

Result: Rank = 2, Nullity = 1

Row reducing yields 2 pivot rows. The third row becomes all zeros, so rank = 2. By rank-nullity, nullity = 3 − 2 = 1.

Tips & Best Practices

  • A square n×n matrix has full rank n if and only if it is invertible (non-zero determinant)
  • If rank < number of rows, some rows are linearly dependent
  • The nullity tells you how many free variables exist in the system Ax = 0
  • Rank is always ≤ min(rows, columns)
  • Adding a row that is a linear combination of existing rows does not increase rank

Computing Rank via Row Reduction

The rank of a matrix equals the number of **pivot positions** (leading 1s) in its Row Echelon Form (REF) or Reduced Row Echelon Form (RREF). The algorithm applies elementary row operations — swap, scale, and add multiples — to create zeros below (and optionally above) each pivot. Columns containing pivots are **pivot columns** (linearly independent); columns without pivots are **free columns** (linearly dependent on pivot columns). The rank is also the dimension of the **column space** and the **row space**.

The Rank-Nullity Theorem

For an m×n matrix A, rank(A) + nullity(A) = n, where nullity is the dimension of the null space (kernel) — the set of solutions to Ax = 0. This theorem partitions the n columns into rank many independent directions and nullity many “lost” directions. A full-rank matrix (rank = min(m,n)) maps no non-zero vector to zero, while a rank-deficient matrix collapses some directions. For square matrices, full rank is equivalent to invertibility.

Applications of Matrix Rank

In **systems of equations**, rank determines solvability: rank(A) = rank([A|b]) is required for consistency, and rank = n (number of unknowns) guarantees a unique solution. In **data science**, the rank of a data matrix indicates how many independent features exist — low-rank approximations (via SVD) are the basis of dimensionality reduction and recommender systems. In **control theory**, the rank of the controllability matrix determines whether a system can be steered to any state. Rank is one of the most fundamental properties of any matrix.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • The rank is the maximum number of linearly independent rows or columns. It equals the number of pivot positions in row echelon form.