Inverse Matrix Calculator

Integers, decimals or fractions such as 2/3. Tab moves to the next cell.

Result
Invertible
A⁻¹ =
Determinant
—
Check A·A⁻¹
—
Row operations
—
Copy answer
—
Heat Map of A and A⁻¹

Blue cells are positive, pink cells are negative, and brighter means larger. Hover a cell to read its exact value.

Gauss-Jordan Step Player

Watch [A | I] turn into [I | A⁻¹] one row operation at a time. Changed rows are highlighted.

—

The inverse matrix calculator finds A⁻¹ for any square matrix from 2×2 up to 6×6. Enter integers, decimals, or fractions, and the calculator runs Gauss-Jordan elimination with exact rational arithmetic, so answers such as 3/5 or −7/10 come out precisely instead of as rounded decimals. It reports the determinant, flags singular matrices that have no inverse, lists every row operation, and verifies the answer by checking that A·A⁻¹ equals the identity matrix.

What is an Inverse Matrix?

The inverse of a square matrix A is the matrix A⁻¹ that satisfies A·A⁻¹ = A⁻¹·A = I, where I is the identity matrix. It plays the same role for matrices that 1/a plays for numbers.

Geometrically, a 2×2 matrix moves every point of the plane: it can stretch, rotate, shear, or reflect. The inverse matrix is the transformation that moves every point back to where it started.

  1. Square only: A must have the same number of rows and columns.
  2. Non-zero determinant: det(A) ≠ 0, otherwise the transformation flattens space and cannot be reversed.
  3. Unique: if an inverse exists, there is exactly one.
  4. Determinants multiply: det(A⁻¹) = 1/det(A), so areas scaled by A are unscaled by A⁻¹.
Interactive: Transform and Undo

Set the four entries of A. The grey square is mapped to the blue shape by A, and A⁻¹ maps the blue shape back.

How to Calculate the Inverse of a 2×2 Matrix?

For A = [[a, b], [c, d]], the inverse is A⁻¹ = (1/(ad − bc))·[[d, −b], [−c, a]].

  1. Find the determinant ad − bc. If it is 0, stop: there is no inverse.
  2. Swap the two entries on the main diagonal, a and d.
  3. Negate the two off-diagonal entries, b and c.
  4. Divide every entry by the determinant.

Example: for [[4, 7], [2, 6]], det = 24 − 14 = 10, so A⁻¹ = (1/10)·[[6, −7], [−2, 4]] = [[0.6, −0.7], [−0.2, 0.4]].

Interactive: Swap, Negate, Divide

Type any 2×2 matrix. The three moves of the formula are applied live, with exact fractions.

How to Use This Inverse Matrix Calculator?

Pick a size, fill in the entries of A, and press "Calculate A⁻¹."

1
Choose the size

2×2 up to 6×6. Existing entries are kept when you change the size, and new cells start at 0.

2
Enter the entries

Use whole numbers, decimals like 0.25, or fractions like −3/4. Every value is converted to an exact fraction before elimination.

3
Read and check

Switch between fractions and decimals, step through the row operations, and confirm the A·A⁻¹ = I check.

If the determinant is 0 the calculator stops at the column where no pivot can be found and explains why the matrix is singular.

Adjugate Method for a 3×3 Inverse

A⁻¹ = (1/det A)·adj(A), where adj(A) is the transpose of the cofactor matrix. This is the 3×3 version of the swap-and-negate rule.

  1. Minors: for each entry, delete its row and column and take the determinant of the 2×2 that is left.
  2. Cofactors: apply the checkerboard of signs + − + / − + − / + − + to the minors.
  3. Adjugate: transpose the cofactor matrix (rows become columns).
  4. Divide: multiply the adjugate by 1/det A.

The adjugate method needs 9 small determinants for a 3×3 but grows quickly for larger matrices, which is why calculators and computers use Gauss-Jordan elimination for 4×4 and up.

Interactive: Click a Cell to See Its Cofactor

The row and column that get crossed out are dimmed. The leftover 2×2 gives the minor.

A
Cofactors C

When Is a Matrix Not Invertible?

A matrix is not invertible (singular) exactly when its determinant is 0. All of these statements are equivalent for a square matrix:

  • det(A) = 0.
  • Some row is a combination of the other rows (the rows are linearly dependent).
  • Ax = 0 has a solution other than x = 0.
  • Gauss-Jordan elimination produces a row of zeros on the left side.
  • A flattens the plane onto a line (or space onto a plane), so information is lost.

Nearly singular matrices are also a problem in practice: when det(A) is tiny, small rounding errors in the entries cause huge errors in A⁻¹.

Interactive: Squash the Matrix

Slide t toward 1. Row 2 moves toward 2 × row 1, the determinant shrinks to zero, and the square collapses to a line.

Properties of the Inverse Matrix

Inverses follow a small set of rules that make algebra with matrices possible. For invertible n×n matrices A and B and a non-zero number k:

  • (A⁻¹)⁻¹ = A: undoing the undo gives the original.
  • (AB)⁻¹ = B⁻¹A⁻¹: the order reverses.
  • (Aᵀ)⁻¹ = (A⁻¹)ᵀ: transpose and inverse can be swapped.
  • (kA)⁻¹ = (1/k)·A⁻¹: scalars come out as reciprocals.
  • det(A⁻¹) = 1/det(A).

Note that (A + B)⁻¹ is generally not A⁻¹ + B⁻¹. There is no simple sum rule.

Interactive: Property Checker

Pick a rule and roll new random matrices. Both sides are computed exactly and compared.

Common Matrices and Their Inverses

Click any row to load the matrix into the calculator.

Matrix AA⁻¹det AType
[[4, 7], [2, 6]][[3/5, −7/10], [−1/5, 2/5]]10textbook 2×2
[[2, 1], [5, 3]][[3, −1], [−5, 2]]1integer inverse
[[0, 1], [1, 0]][[0, 1], [1, 0]]−1reflection, self-inverse
[[0, −1], [1, 0]][[0, 1], [−1, 0]]190° rotation
[[1, 2], [0, 1]][[1, −2], [0, 1]]1shear
diag(2, 4, 5)diag(1/2, 1/4, 1/5)40diagonal
[[1, 2, 3], [0, 1, 4], [5, 6, 0]][[−24, 18, 5], [20, −15, −4], [−5, 4, 1]]1classic 3×3
[[2, −1, 0], [−1, 2, −1], [0, −1, 2]](1/4)·[[3, 2, 1], [2, 4, 2], [1, 2, 3]]4tridiagonal
[[1, 1, 1], [0, 1, 1], [0, 0, 1]][[1, −1, 0], [0, 1, −1], [0, 0, 1]]1upper triangular
Hilbert 3×3[[9, −36, 30], [−36, 192, −180], [30, −180, 180]]1/2160ill-conditioned
[[1, 2], [2, 4]]none0singular

Solving Linear Systems with the Inverse Matrix

If Ax = b and A is invertible, the unique solution is x = A⁻¹b. Multiply both sides on the left by A⁻¹ and use A⁻¹A = I.

Each equation of a 2×2 system is a line in the plane, and the solution is the point where the two lines cross. If det A = 0 the lines are parallel (no solution) or identical (infinitely many solutions), which is exactly when A⁻¹ does not exist.

Computing A⁻¹ once is useful when you must solve Ax = b for many different right-hand sides b, as in circuit analysis, input-output economic models, and 3D graphics, where the same camera matrix is inverted once and applied to millions of points.

Interactive: Two Lines, One Solution

The system is 2x + y = b₁ and x + 3y = b₂. Move b₁ and b₂ and watch x = A⁻¹b follow the crossing point.

Other Inverse Calculators

Related tools that solve problems in reverse.

Frequently Asked Questions

Answers to common questions about matrix inverses, determinants and singular matrices

The inverse is [[0.6, −0.7], [−0.2, 0.4]]. The determinant is 4·6 − 7·2 = 10. Swap the diagonal entries to get 6 and 4, negate the off-diagonal entries to get −7 and −2, then divide every entry by 10.

A square matrix has no inverse when its determinant is 0. This happens when one row (or column) is a combination of the others, for example [[1, 2], [2, 4]], whose second row is twice the first. Such a matrix is called singular, and it squashes space into a lower dimension that cannot be undone.

No. Only square matrices can have a two-sided inverse. A 2×3 matrix can have a right inverse or a left inverse, and the Moore-Penrose pseudoinverse generalises the idea, but A·A⁻¹ = A⁻¹·A = I is only possible for n×n matrices.

Multiply the matrix by your answer. If A·A⁻¹ equals the identity matrix I, the inverse is correct. The calculator does this check for you with exact fractions, so a correct result shows exactly 1s on the diagonal and 0s everywhere else.

The identity matrix is its own inverse, because I·I = I. Other self-inverse matrices include reflections such as [[0, 1], [1, 0]] and [[1, 0], [0, −1]], since applying a reflection twice returns every point to where it started.

(AB)⁻¹ = B⁻¹A⁻¹, with the order reversed. To undo "first B, then A" you must undo A first and B second, just as you take off shoes before socks. The rule extends to any number of factors: (ABC)⁻¹ = C⁻¹B⁻¹A⁻¹.

A system Ax = b has the solution x = A⁻¹b when A is invertible. For 2x + y = 5 and x + 3y = 10, A⁻¹ = (1/5)[[3, −1], [−1, 2]], so x = (1/5)(15 − 10) = 1 and y = (1/5)(−5 + 20) = 3.