Free online tool · Exact answers

Matrix Calculator Determinant, Inverse, RREF & More with Steps

Multiply, add or subtract matrices and find the determinant, inverse, transpose, rank and RREF in one place. This free matrix calculator works in exact fractions and shows every row operation, so you can check your homework step by step.

  • Exact fractions, no rounding
  • Step-by-step working
  • Up to 8×8, paste from Excel

Enter your matrices

Use whole numbers, decimals or fractions like 3/4. Enter moves to the next cell.

Matrix A

3 × 3
Rows3
Cols3

Matrix B

3 × 1
Rows3
Cols1
Two matrices
One matrix

Result

Pick an operation above to see the answer here.

Features

Why use this matrix calculator

Most online matrix tools round your answers or hide the working behind a paywall. This one keeps every number exact and shows each step for free.

Exact fraction arithmetic

Answers such as 7/12 stay exact instead of turning into 0.583333. Switch to decimals with one tap whenever you need them.

Every step shown

Row swaps, scaling and elimination appear in order, each with the matrix after that operation, so you can find exactly where your working went wrong.

13 operations, one page

Add, subtract, multiply both ways and solve AX = B, plus determinant, inverse, transpose, rank, RREF, trace, powers and scalar multiples.

Paste from spreadsheets

Copy a block from Excel, Google Sheets or a text file, paste it into any cell, and the matrix resizes to fit, up to 8×8.

Chain your calculations

Send any result back into A or B and keep going. For example, find (A×B)−1 in two clicks.

Fast and private

All the maths runs in your browser, so nothing is uploaded. Your matrices are also saved on this device for next time.

How to use

How to use the matrix calculator

Five quick steps take you from raw numbers to a fully worked answer.

  1. Set the sizes

    Use the + and − buttons to choose rows and columns for A and B, up to 8×8.

  2. Enter the numbers

    Type integers, decimals or fractions. Empty cells count as 0, and Enter jumps to the next cell.

  3. Pick an operation

    Choose a two-matrix operation, or select A or B first for single-matrix ones like the inverse.

  4. Read the answer

    Switch between fractions and decimals, copy the result, or send it back into A or B.

  5. Follow the steps

    Open Show steps to see each row operation and compare it with your own working.

Learn

Matrix operations explained

A quick guide to what each button does, with the rule behind it, so the answers make sense and not just match.

Matrix calculator inverse formula for a 2 by 2 matrix: swap a and d, negate b and c, divide by ad minus bc
The 2×2 inverse shortcutSwap a and d, change the signs of b and c, then divide by the determinant ad − bc. For bigger matrices the calculator uses Gauss-Jordan elimination instead and shows every step.

Addition and subtraction

Only possible for matrices of the same size. You simply add or subtract the matching entries.

(A + B)ij = aij + bij

Matrix multiplication

For an m×n matrix A and an n×p matrix B, each entry of AB is a row of A times a column of B. The result is m×p.

cij = Σ aikbkj

Determinant

A single number for a square matrix. For larger sizes, the calculator reduces to triangular form and multiplies the diagonal.

2×2: ad − bc

Inverse

A−1 undoes A. It exists only when det(A) is not 0, and it is found by reducing [A | I] to [I | A−1].

A · A−1 = I

Transpose

Rows become columns, so an m×n matrix becomes n×m. A matrix equal to its own transpose is called symmetric.

(AT)ij = aji

Rank and RREF

Gauss-Jordan elimination gives the reduced row echelon form. The number of pivots is the rank, the count of independent rows.

rank = number of pivots

Solving AX = B

Reduce [A | B]. One pivot per unknown gives a unique answer, a row such as 0 = 5 means no solution, and missing pivots mean infinitely many.

X = A−1B

Trace and powers

The trace adds up the main diagonal. An multiplies A by itself n times, and negative powers use the inverse.

tr(A) = a11 + a22 + …
Benefits

Who this matrix calculator helps

  • Students checking homework

    Compare each row operation with yours to find the exact line where an answer slipped.

  • Learners building intuition

    Seeing pivots and eliminations repeatedly makes linear algebra click far faster than reading rules.

  • Anyone who hates rounding errors

    Exact fractions mean an inverse times the original gives the identity, every time.

  • Engineers and analysts

    Quickly verify transforms, Markov chains, circuit equations or regression steps without opening a maths package.

  • Keyboard power users

    Arrow keys move between cells, Enter advances, and Ctrl + Enter repeats the last operation.

  • Phone and tablet users

    Large touch targets and a layout that stacks neatly make it comfortable on any screen.

FAQ

Matrix calculator FAQ

How do you multiply two matrices?

To multiply A by B, the number of columns in A must equal the number of rows in B. Each entry of the result is a row of A times a column of B: multiply the matching entries and add them up. For example, a 2×3 matrix times a 3×4 matrix gives a 2×4 matrix.

When does a matrix not have an inverse?

Only square matrices can have an inverse, and only when the determinant is not zero. A matrix with determinant 0 is called singular. Its rows depend on each other, so Gauss-Jordan elimination runs out of pivots and the calculator reports that no inverse exists.

Does this matrix calculator show steps?

Yes. Determinant, inverse, rank, RREF and Solve AX = B list every row operation with the matrix after each step. Multiplication, addition, scalar multiples and trace show how each entry is worked out.

Why is A × B different from B × A?

Matrix multiplication is not commutative. Rows of the first matrix meet columns of the second, so swapping the order changes which numbers are combined and often the size of the result. In many cases only one of the two orders is even defined.

What are the RREF and the rank of a matrix?

RREF, the reduced row echelon form, is the simplest form a matrix can be row-reduced to: every pivot is 1 and is the only non-zero entry in its column. The rank is the number of pivots, which equals the number of linearly independent rows.

Can I enter fractions and decimals?

Yes. Type whole numbers, decimals such as 2.5, or fractions such as -3/4. The calculator works with exact fractions internally, so there is no rounding error, and you can switch the answer between fractions and decimals.

What is the largest matrix I can use?

Up to 8×8 for both A and B. You can also paste a block of numbers copied from Excel, Google Sheets or a text file into any cell, and the matrix resizes to fit.

How do I solve a system of linear equations with matrices?

Write the coefficients as matrix A and the constants as a one-column matrix B, then press Solve AX = B. The calculator row-reduces [A | B] and tells you whether there is one solution, no solution or infinitely many.

Get the right answer, with the working

Use the matrix calculator to check a determinant, invert a matrix or solve a system in seconds. Then, for other maths and everyday problems, explore our free online tools.

Calculate now More maths tools
Scroll to Top