MATH

Matrix Calculator: Inverse, Determinant & More, With Steps

Type or paste a matrix and pick an operation. You get the answer in exact fractions, with the row operations or row-times-column sums written out.

  • Determinant & inverse
  • Transpose & powers
  • A × B, A ± B, kA
Open the calculator
Example · OpenStax 11.7
  • A, row 12 3 1
  • A, row 23 3 1
  • A, row 32 4 1
  • det A1
A⁻¹Inverse, row 36 −2 −3

A matrix has an inverse only if it's square and its determinant isn't 0. To find the inverse, write the matrix next to the identity matrix, [A | I], and use row operations until the left side is I; the right side is then A⁻¹. For OpenStax's 3 × 3 example with rows 2 3 1, 3 3 1 and 2 4 1, the determinant is 1 and the inverse has the rows −1 1 0, −1 0 1 and 6 −2 −3.

This matrix calculator finds determinants, inverses, transposes and powers for matrices up to 8 × 8, and also adds, subtracts and multiplies two matrices. It keeps fractions exact, shows decimals as well when an entry isn't a whole number, and writes out every row operation and every row-times-column sum (for a power, the sums for A²).

Last updated November 13, 2026  How we calculate

One row per line. Separate entries with spaces or commas. Whole numbers, decimals and fractions like 3/4 all work, and you can paste cells from a spreadsheet (without thousands separators: 1234, not 1,234). Up to 8 × 8.

Your result

A⁻¹ =
−110
−101
6−2−3

3 × 3 matrix

Matrix result details
Size of A3 × 3
Size of the result3 × 3
Determinant1
  1. Write [A | I] and use row operations to turn the left side into I. The right side then becomes A⁻¹. Notation: R2 − 3·R1 → R2 means replace row 2 with row 2 minus 3 times row 1.
  2. R1 ÷ 2 → R1
  3. R2 − 3·R1 → R2
  4. R3 − 2·R1 → R3
  5. R2 ÷ (−3/2) → R2
  6. R1 − (3/2)·R2 → R1
  7. R3 − R2 → R3
  8. R3 ÷ (−1/3) → R3
  9. R2 − (1/3)·R3 → R2

Check: A × A⁻¹ = I.

How to Find the Determinant

A determinant is a single number found from a square matrix. For a 2 × 2 matrix with rows a b and c d, it's ad − bc (OpenStax Algebra and Trigonometry 2e, 11.8). OpenStax's example:

52
−63

det = 5(3) − 2(−6) = 15 + 12 = 27

For a 3 × 3 matrix, OpenStax repeats the first two columns to the right of the matrix. You add the products down the three diagonals, then subtract the products up the three diagonals:

021
3−11
401

Down: 0(−1)(1) + 2(1)(4) + 1(3)(0) = 0 + 8 + 0 = 8
Up: 4(−1)(1) + 0(1)(0) + 1(3)(2) = −4 + 0 + 6 = 2
det = 8 − 2 = 6

For 4 × 4 and larger, the calculator uses elimination, which is how computers find large determinants (MIT 18.06SC, Properties of determinants). Subtracting a multiple of one row from another doesn't change the determinant, and swapping two rows flips its sign. Once the matrix is triangular, the determinant is the product of the pivots on the diagonal, times −1 for each row swap. A determinant of 0 means the matrix is singular and has no inverse.

Here's one worked by the calculator. Three row operations clear column 1, then two clear column 2 and one clears column 3. No swaps are needed, and the pivots are 1, −4, −6 and 3:

1234
5678
2648
3112

det = 1 × (−4) × (−6) × 3 = 72
Checked against cofactor expansion in our test suite.

How to Find the Inverse of a Matrix

The inverse A⁻¹ is the matrix with AA⁻¹ = A⁻¹A = I, the identity matrix. Only square matrices can have one, and not every square matrix does (OpenStax 11.7).

1−2
2−3

→

−32
−21

The calculator multiplies A by its answer to check that the product is I. One use of an inverse is solving a system of equations: write it as AX = B, and then X = A⁻¹B (OpenStax 11.7).

Adding, Subtracting, Scalars, Transposes and Powers

13
23
41

ᵀ →

124
331

Multiplying Two Matrices

"Finding the product of two matrices is only possible when the inner dimensions are the same" (OpenStax 11.5). If A is m × r and B is r × n, then AB is m × n, and each entry is a row of A times a column of B. AB and BA are usually different. The step-by-step matrix multiplication calculator covers products in more depth, with a table of which sizes can be multiplied.

Frequently Asked Questions

Why can't I multiply these two matrices?

AB needs the number of columns of A to equal the number of rows of B. A 2 × 3 matrix times a 2 × 3 matrix isn't defined. A 2 × 3 matrix times its transpose, which is 3 × 2, is defined.

Does every square matrix have an inverse?

No. A square matrix has an inverse exactly when its determinant isn't 0 (MIT 18.06SC). A matrix with a row of zeros, or with two equal rows, has a determinant of 0, so it has no inverse.

What does a determinant of 0 mean?

The matrix is singular: it has no inverse, and elimination leaves a row of zeros (MIT 18.06SC). For a system of equations, a determinant of 0 means there's either no solution or infinitely many (OpenStax 11.8).

Can I enter fractions or decimals?

Yes. Type 3/4, −2/3 or 0.25. The answer stays exact: 0.25 becomes 1/4, and a decimal version is shown next to any answer with fractions.

What size matrices does it handle?

Up to 8 × 8 for every operation. The steps list every entry of a sum, scalar multiple or product, and every row operation for a determinant or inverse. For a power, they show A² entry by entry.

More tools: the matrix multiplication calculator, the quadratic formula calculator, the exponent calculator, the decimal to fraction calculator and all the math calculators.

Sources