linear algebra calculators

Matrix Rank Calculator

Determine the rank of any matrix up to 3×4 using Gaussian elimination. Use it when solving linear systems, checking linear independence, or verifying that a matrix has full rank.

About this calculator

The rank of a matrix is the number of linearly independent rows (or columns) it contains. It equals the number of non-zero rows in the matrix's row echelon form. To find the rank, Gaussian elimination is applied: pivot columns are identified, rows are swapped to bring a non-zero pivot to the top, each pivot row is scaled so the leading entry equals 1, and all rows below are cleared using row subtraction. The process continues column by column, incrementing the rank counter each time a valid pivot is found. Formally, rank(A) = dim(col(A)) = dim(row(A)). The rank determines whether a linear system Ax = b has a unique solution, infinitely many solutions, or none at all.

How to use

Consider the 2×3 matrix A = [[1, 2, 3], [2, 4, 6]]. Enter rows = 2, cols = 3, and fill in the elements. Gaussian elimination: divide row 1 by 1 (pivot = 1); subtract 2 × row 1 from row 2 → row 2 becomes [0, 0, 0]. Only one pivot was found, so rank(A) = 1. This tells you the two rows are linearly dependent — the second is simply twice the first.

Frequently asked questions

What does the rank of a matrix tell you about a system of linear equations?

The rank tells you how many independent constraints the system imposes. If rank(A) equals the number of unknowns, the system has a unique solution. If rank(A) is less than the number of unknowns, the system is underdetermined and has infinitely many solutions (or none, if rank(A) ≠ rank of the augmented matrix). It is one of the most fundamental properties used in linear algebra.

What is the difference between row rank and column rank of a matrix?

The row rank is the number of linearly independent rows, and the column rank is the number of linearly independent columns. A foundational theorem in linear algebra states that row rank always equals column rank for any matrix — this common value is simply called the rank. This equivalence means you can compute rank by reducing either rows or columns, and the result will be the same.

When is a matrix said to have full rank?

A matrix has full rank when its rank equals the smaller of its number of rows and columns, i.e., rank(A) = min(m, n). For a square n×n matrix, full rank means rank = n, which implies the matrix is invertible and its determinant is non-zero. For a rectangular matrix, full row rank means every row is independent, while full column rank means every column is independent.