Matrix calculator

Find the determinant, inverse, reduced row echelon form, rank or transpose of a matrix, with exact fractions and every row operation shown.

Separate numbers with spaces or commas. Fractions (3/4), decimals and negatives are fine.

What each operation tells you

Determinant

The determinant is a single number for a square matrix. If it's zero, the matrix is singular: it has no inverse, and a system of equations with these coefficients has no unique solution. Its size also measures how much the matrix scales area (2 × 2) or volume (3 × 3). This calculator finds it by elimination: reduce to a triangle, multiply the diagonal, and flip the sign once for every row swap. That is much faster than cofactor expansion for anything bigger than 3 × 3.

Inverse

The inverse A⁻¹ undoes A, so A × A⁻¹ = I. It's found by writing A next to the identity matrix and reducing until the left side becomes I. Whatever is then on the right is the inverse. Only square matrices with a non-zero determinant have one.

RREF and rank

Reduced row echelon form is the simplest matrix you can reach with row operations: each leading entry is 1 and is the only non-zero entry in its column. The number of leading 1s is the rank, the number of independent rows. If your matrix is an augmented system, the RREF is the solved system. See how rank decides the type of solution.

Transpose

The transpose swaps rows and columns: row 1 becomes column 1. It appears in least-squares fitting, stiffness matrices and anywhere you need Aᵀ A.

Frequently asked questions

Why are my answers fractions?

The calculator uses exact arithmetic, so it never introduces rounding error. When a value isn't a whole number, the decimal approximation is shown next to it.

How big a matrix can I enter?

Any size, though the step list gets long beyond about 6 × 6. Everything is computed in your browser.

How do I solve a system of equations instead?

Use the linear equation solver, which accepts equations as you'd write them, or enter the augmented matrix here and choose RREF.