Matrix Inverse Calculator

Find the inverse of a square matrix up to 6 × 6 in exact fractions, with Gauss–Jordan or adjugate steps and a built-in check.

One row per line; separate entries with spaces or commas. Fractions like 1/3 and decimals stay exact.
Method for the steps
Size
3 × 3
det(A)
−1
det(A⁻¹)
−1= 1 / det(A)
Entries
All integers
A⁻¹
001
−213
3−1−5

Show the work

  1. Write the augmented matrix [A | I]:
    211100
    132010
    100001
  2. Divide R1 by 2 so the pivot becomes 1 (R1 → (0.5)·R1):
    10.50.50.500
    132010
    100001
  3. Make the rest of column 1 zero (R2 → R2 − R1, R3 → R3 − R1):
    10.50.50.500
    02.51.5−0.510
    0−0.5−0.5−0.501
  4. Divide R2 by 2.5 so the pivot becomes 1 (R2 → (0.4)·R2):
    10.50.50.500
    010.6−0.20.40
    0−0.5−0.5−0.501
  5. Make the rest of column 2 zero (R1 → R1 − 0.5·R2, R3 → R3 + 0.5·R2):
    100.20.6−0.20
    010.6−0.20.40
    00−0.2−0.60.21
  6. Divide R3 by −0.2 so the pivot becomes 1 (R3 → −5·R3):
    100.20.6−0.20
    010.6−0.20.40
    0013−1−5
  7. Make the rest of column 3 zero (R1 → R1 − 0.2·R3, R2 → R2 − 0.6·R3):
    100001
    010−213
    0013−1−5
  8. The left block is now the identity matrix, so the right block is A−1.
  9. Check: A × A−1 =
    100
    010
    001
    = I ✓

Inverse

211
132
100
−1 =
001
−213
3−1−5

The inverse of a square matrix A is the matrix A⁻¹ that undoes it: A × A⁻¹ = A⁻¹ × A = I, the identity. This calculator finds that inverse exactly, as fractions, for matrices up to 6 × 6, and shows the work either as Gauss–Jordan row operations or through the adjugate (classical adjoint) formula.

How to use the matrix inverse calculator

  1. Type the square matrix, one row per line, with entries separated by spaces or commas. Fractions such as 1/3 are accepted.
  2. Choose the method for the steps: Gauss–Jordan (row-reduce [A | I]) or Adjugate ÷ determinant.
  3. Read A⁻¹ on the tape. Below it you’ll find the full result, decimal approximations when fractions appear, and the A × A⁻¹ = I check.

If the matrix is singular, the tape says so and the steps show the column where no pivot can be found.

Inverse formulas

The 2 × 2 shortcut

[[a, b], [c, d]]−1 = (1 ÷ (ad − bc)) × [[d, −b], [−c, a]]

Gauss–Jordan elimination

Write the augmented matrix [A | I] and apply row operations — swap rows, divide a row by its pivot, subtract multiples of the pivot row — until the left half becomes I. Whatever those operations turned I into is A⁻¹. Each row operation is itself a matrix multiplication, so performing them all amounts to multiplying by A⁻¹.

Adjugate method

A−1 = adj(A) ÷ det(A), where adj(A) is the transpose of the cofactor matrix

Each cofactor is Cij = (−1)i+j det(Mij). This formula is elegant for 2 × 2 and 3 × 3 matrices but becomes slow beyond that, because it needs many smaller determinants.

Worked example

Invert the matrix with rows (4, 7) and (2, 6).

Determinant: 4 × 6 − 7 × 2 = 24 − 14 = 10, which is not zero, so the inverse exists.

Adjugate: swap 4 and 6, negate 7 and 2 → rows (6, −7) and (−2, 4).

Divide by 10: A⁻¹ has rows (0.6, −0.7) and (−0.2, 0.4).

Check: row 1 of A times column 1 of A⁻¹ is 4(0.6) + 7(−0.2) = 2.4 − 1.4 = 1, and row 1 times column 2 is 4(−0.7) + 7(0.4) = 0. ✓

The calculator’s default 3 × 3 example, with rows (2, 1, 1), (1, 3, 2) and (1, 0, 0), has determinant −1, so its inverse contains only integers: rows (0, 0, 1), (−2, 1, 3) and (3, −1, −5).

Properties of the inverse

  • Uniqueness. An invertible matrix has exactly one inverse.
  • Product rule. (AB)⁻¹ = B⁻¹A⁻¹ — the order reverses, like taking off shoes and socks.
  • Transpose. (Aᵀ)⁻¹ = (A⁻¹)ᵀ.
  • Determinant. det(A⁻¹) = 1 / det(A), so a matrix that scales volume by 10 has an inverse that scales it by 1/10.
  • Identity and diagonal matrices. The identity is its own inverse; a diagonal matrix inverts entry by entry, as long as no diagonal entry is 0.

When there is no inverse

A singular matrix collapses some direction completely — for example, it might map an entire line of vectors to zero. Information is lost, so nothing can reverse it. Practical signs of a singular matrix are a row that is a multiple of another row, a row of zeros, or a determinant of zero from the matrix determinant calculator.

Nearly singular matrices are a related hazard in real data: the inverse exists but contains huge entries, so tiny measurement errors get amplified. Exact fractions sidestep rounding here, but if your entries come from measurements, treat very large inverse entries with caution.

For multiplying the inverse by other matrices, use the matrix calculator; for a single system of two or three equations, the system of linear equations calculator is the quicker route.

Frequently asked questions

When does a matrix have an inverse?

Exactly when it is square and its determinant is not zero. Such a matrix is called invertible or non-singular. If the determinant is 0, the calculator explains where Gauss–Jordan elimination breaks down.

What is the quick rule for a 2 × 2 inverse?

Swap the two diagonal entries, change the signs of the other two, and divide everything by the determinant ad − bc. For rows (4, 7) and (2, 6), the determinant is 10 and the inverse has rows (0.6, −0.7) and (−0.2, 0.4).

Why are the answers fractions?

Inverting divides by the determinant, so fractions appear naturally. The calculator keeps them exact and also lists decimal approximations, which avoids the rounding drift you get from working with decimals by hand.

How can I check an inverse?

Multiply the original matrix by the inverse. The product must be the identity matrix, with 1s on the diagonal and 0s elsewhere. The calculator performs this check on every result.

Should I use the inverse to solve a system of equations?

It works, since x = A⁻¹b, but elimination is faster and more accurate for a single system. The inverse pays off when you must solve many systems with the same coefficient matrix.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.