Tools

Matrix Calculator

Determinant, inverse, transpose, rank, RREF and products

Matrix A
Matrix B
Result

How to use the matrix calculator

  1. Choose the size of matrix A (and B if you need two matrices), up to 6 × 6.
  2. Type the entries. Decimals and fractions such as 1/3 are accepted.
  3. Click an operation: determinant, inverse, transpose, rank, reduced row echelon form, A + B, A − B, A × B or A².
  4. Results are shown as exact fractions when they are simple, or as decimals. Untick the box to always see decimals.

How the results are computed

The determinant, rank, inverse and RREF all use Gauss–Jordan elimination with partial pivoting: rows are swapped so the largest available pivot is used, which keeps rounding errors small. The determinant is the product of the pivots, with the sign flipped for each row swap. The inverse is found by reducing the augmented matrix [A | I] to [I | A⁻¹]. A matrix with determinant 0 is singular and has no inverse; its rank is less than its size.

Matrix multiplication A × B requires the number of columns of A to equal the number of rows of B, and the result has A's rows and B's columns. Unlike ordinary numbers, A × B is usually not equal to B × A. To compute B × A, swap the entries into the other matrix.

Everything is calculated in your browser, and your matrices are saved on this device for next time.

Why does my matrix have no inverse?

Its determinant is zero, which means one row (or column) is a combination of others. Such a matrix is called singular.

What is RREF used for?

Reduced row echelon form solves systems of linear equations: put the coefficients and the right-hand side in an augmented matrix, and the last column of the RREF gives the solution.

How accurate are the results?

Calculations use double-precision floating point. Values within 10⁻¹⁰ of zero are shown as 0, and results that match a fraction with a denominator up to 1000 are shown exactly.