Matrix Inverse Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

How to use the matrix inverse calculator

  1. Enter your matrix entries in the grid (a₁₁ through a₃₃).
  2. For a 2×2 inverse, fill only the top-left 2×2 block (a₁₁, a₁₂, a₂₁, a₂₂) and set the remaining cells to 0 so the matrix stays well-defined.
  3. Click Compute Inverse.
  4. If the determinant is 0, the matrix is singular and has no inverse.
  5. If the determinant is very close to 0, results may be numerically unstable (see limitations below).

Understanding matrix inverses

Matrices are a compact way to represent linear relationships. They show up whenever you want to transform vectors, solve multiple linear equations at once, or describe systems in physics, engineering, statistics, and computer graphics. A square matrix A is said to have an inverse (written A−1) if there exists another matrix such that:

A · A−1 = I and A−1 · A = I,

where I is the identity matrix (1s on the diagonal and 0s elsewhere). Conceptually, multiplying by A applies a linear transformation, and multiplying by A−1 “undoes” it. This is the matrix analogue of multiplying by 1/x to undo multiplication by x.

Not every matrix has an inverse. The key test is the determinant. If det(A) ≠ 0, then A is invertible (also called nonsingular). If det(A) = 0, then A is singular and no inverse exists.

Formulas

2×2 inverse (closed form)

For

A = [[a, b], [c, d]], the determinant is det(A) = ad − bc. If ad − bc ≠ 0, then:

A1=1adbc[[d,b],[c,a]]

3×3 inverse (adjugate / cofactor method)

For a 3×3 matrix, a standard symbolic expression is:

A−1 = adj(A) / det(A),

where adj(A) is the adjugate (transpose of the cofactor matrix). Practically, you compute:

  • det(A)
  • each cofactor Cij = (−1)i+j det(minor of A removing row i, column j)
  • adj(A) = CT

This calculator automates those steps for you.

Interpreting the results

  • Determinant (det A): If it is exactly 0 (or rounds to 0), the inverse does not exist.
  • Inverse matrix: The entries are the numbers which, when multiplied by your original matrix, produce the identity matrix (up to rounding).
  • Sanity check: If you multiply A · A−1, you should get something very close to the identity matrix. Small rounding differences are normal.
  • Very large values: If the determinant is very small in magnitude, inverse entries can become huge. That usually indicates an ill-conditioned (nearly singular) matrix where small input changes produce large output changes.

Worked example

Suppose:

A = [[1, 2], [3, 4]].

Compute the determinant:

det(A) = (1)(4) − (2)(3) = 4 − 6 = −2 ≠ 0, so the inverse exists.

Then:

A−1 = (1/−2) [[4, −2], [−3, 1]] = [[−2, 1], [1.5, −0.5]].

You can verify:

[[1, 2], [3, 4]] · [[−2, 1], [1.5, −0.5]] = [[1, 0], [0, 1]].

Which method should you use? (comparison)

ApproachBest forProsCons
Closed-form 2×2 formulaHand calculations for 2×2 matricesFast, simple, minimal stepsOnly applies to 2×2
Adjugate/cofactor method (3×3)Small matrices; learning linear algebraExact symbolic structure; educationalError-prone by hand; many intermediate determinants
Gaussian elimination (row reduction)General manual procedure; sanity checkingWorks beyond 3×3; reveals singularity via pivotsLonger by hand; needs careful arithmetic
Numerical methods (pivoting/SVD)Near-singular or larger matrices in applicationsMore stable in floating-point arithmeticMore complex; typically needs a library/tooling

Limitations and assumptions

  • Square matrices only: Inverses are defined for square matrices. This page targets up to 3×3 input.
  • Singular matrices: If det(A) = 0, there is no inverse. In that case, consider solving systems with row-reduction and checking for consistency, or using a pseudo-inverse (not provided here).
  • Near-singular (ill-conditioned) matrices: When |det(A)| is very small, rounding can dominate and the computed inverse may be unreliable for real-world numeric work.
  • Floating-point rounding: Browser calculations use floating-point numbers. Results may display rounding; multiplying back may yield values like 1.0000000002 instead of exactly 1.
  • 2×2 via the grid: If you intend a 2×2 matrix, keep unused cells at 0; otherwise you are computing a full 3×3 inverse of whatever values are present.

FAQ

When does a matrix inverse exist?

An inverse exists exactly when det(A) ≠ 0.

What does “singular” mean?

Singular means det(A) = 0, so the matrix collapses space in some direction and cannot be undone by any inverse transformation.

How do I use the inverse to solve A x = b?

If A is invertible, then x = A−1b (matrix-vector multiplication).

Why are my inverse values so large?

That usually means the determinant is close to 0 and the matrix is ill-conditioned. Small input errors can cause large output changes.

Is the result exact?

It is numerical (floating-point). For integers and “nice” matrices you may see exact-looking decimals, but the underlying computation is approximate.

Matrix entries
Fill in the matrix values above.

Embed this calculator

Copy and paste the HTML below to add the Matrix Inverse Calculator - Solve Linear Systems Fast to your website.