# Matrix Rank Calculator

Find the rank of a 2x2, 3x3, or 4x4 matrix using row reduction. See the row echelon form, nullity, and determinant. Free matrix rank calculator.

## What this calculates

Find the rank of any 2x2, 3x3, or 4x4 matrix using Gaussian elimination. This calculator performs row reduction to echelon form and counts the non-zero rows to determine the rank.

## Inputs

- **Matrix Size** — options: 2x2 Matrix, 3x3 Matrix, 4x4 Matrix — Select the size of the matrix.
- **Row 1, Col 1**
- **Row 1, Col 2**
- **Row 1, Col 3**
- **Row 1, Col 4**
- **Row 2, Col 1**
- **Row 2, Col 2**
- **Row 2, Col 3**
- **Row 2, Col 4**
- **Row 3, Col 1**
- **Row 3, Col 2**
- **Row 3, Col 3**
- **Row 3, Col 4**
- **Row 4, Col 1**
- **Row 4, Col 2**
- **Row 4, Col 3**
- **Row 4, Col 4**

## Outputs

- **Rank** — The number of linearly independent rows (or columns).
- **Row Echelon Form** — formatted as text — The matrix after row reduction.
- **Determinant (square matrices)** — formatted as text — The determinant, if the matrix is square.
- **Full Rank?** — formatted as text — Whether the matrix has full rank.
- **Nullity** — The dimension of the null space (columns minus rank).

## Details

The rank of a matrix is the number of linearly independent rows (or equivalently, columns). It tells you the dimension of the vector space spanned by the matrix's rows.

**How to Find the Rank:**

1. Write the matrix.
2. Use row operations (swap rows, multiply a row by a scalar, add a multiple of one row to another) to reduce it to row echelon form (REF).
3. Count the non-zero rows. That count is the rank.

**Worked Example:**

Matrix: [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

Row reduce:
- R2 = R2 - 4R1: [0, -3, -6]
- R3 = R3 - 7R1: [0, -6, -12]
- R3 = R3 - 2R2: [0, 0, 0]

REF: [[1, 2, 3], [0, -3, -6], [0, 0, 0]]

Two non-zero rows, so rank = 2. This means the three rows are not all independent; the third row is a linear combination of the first two.

**Key Concepts:**

- **Full rank:** A square n x n matrix has full rank if rank = n. This means it is invertible and its determinant is non-zero.
- **Nullity:** The dimension of the null space = number of columns minus rank. Rank + nullity = number of columns (rank-nullity theorem).
- **Rank and systems of equations:** A system Ax = b has a solution only if rank(A) = rank([A|b]).

## Frequently Asked Questions

**Q: What does matrix rank tell you?**

A: The rank tells you how many linearly independent rows (or columns) the matrix has. It reveals the dimension of the image (column space) of the corresponding linear transformation. A 3x3 matrix with rank 2 maps 3D space onto a 2D plane.

**Q: What is row echelon form?**

A: A matrix is in row echelon form (REF) when: (1) all zero rows are at the bottom, (2) each leading entry (pivot) is to the right of the pivot in the row above, and (3) all entries below each pivot are zero. You reach REF through Gaussian elimination using row operations.

**Q: What is the rank-nullity theorem?**

A: The rank-nullity theorem states that for an m x n matrix, rank + nullity = n (number of columns). If a 4x4 matrix has rank 3, its nullity is 1, meaning the null space is 1-dimensional. This connects the dimension of the image to the dimension of the kernel.

**Q: When is a matrix full rank?**

A: A square n x n matrix has full rank when its rank equals n. This is equivalent to having a non-zero determinant, being invertible, and having only the trivial solution to Ax = 0. For a non-square m x n matrix, full rank means rank = min(m, n).

**Q: Can the rank ever be zero?**

A: Only the zero matrix (all entries are 0) has rank 0. Any matrix with at least one non-zero entry has rank at least 1, because that row alone is linearly independent. A single non-zero row vector has rank 1.

---

Source: https://vastcalc.com/calculators/math/matrix-rank
Category: Math
Last updated: 2026-04-08
