Math calculator

Matrix Inverse Calculator

The transformation that undoes yours.

Undo the transformation

With the product shown, so you can see it is the identity.

Square only — a matrix that maps between different-sized spaces cannot be undone.

determinant −2

2 × 2 inverse

Every entry is exact, so multiplying the two together gives the identity rather than the identity plus rounding noise.

A

The original 2 by 2 matrix.
12
34

A⁻¹

Its inverse, with every entry exact.
−21
1.5−0.5

A × A⁻¹

The product, which is the identity exactly — this is the verification, not an illustration.
10
01

Determinant

−2

non-zero, so an inverse exists

Size

2 × 2

square, as an inverse requires

A × A⁻¹

identity

exactly, with no tolerance

The Gauss-Jordan steps

  1. 1Step 1Subtract 3 × row 1 from row 2 to clear column 1.
  2. 2Step 2Divide row 2 by −2 to make the pivot exactly 1.
  3. 3Step 3Subtract 2 × row 2 from row 1 to clear column 2.

Applied to the matrix with an identity attached: whatever reduces A to the identity turns that identity into the inverse.

  • Found by Gauss-Jordan elimination on the matrix with an identity attached: whatever row operations reduce A to the identity turn that identity into the inverse.
  • The adjugate formula — the adjoint divided by the determinant — gives the same answer and is how it is usually derived, but it needs n² cofactors and is far slower beyond 3×3.
  • Every entry is exact, so the product of the matrix with its inverse is exactly the identity rather than the identity plus rounding noise.

The verification above is a genuine check rather than a decoration, because exact arithmetic lets it demand the identity with no tolerance at all.

What this tool shows

An inverse exists exactly when the determinant is not zero. A singular matrix collapses a direction to nothing, and nothing undoes that — the information is gone rather than merely hard to recover.

  • The inverse of any invertible square matrix
  • The Gauss-Jordan steps that produce it
  • The product A × A⁻¹, as verification
  • Why a singular matrix has none
  • Why non-square matrices have none either
  • When to solve instead of inverting
Exact fractions Verified on the page Singularity refused Gauss-Jordan steps

The product is shown too, so the answer verifies itself.

Updated 7 September 2026 · Works in any browser, no installation

The inverse is the matrix that undoes the transformation. A times its inverse gives the identity, which is the transformation that changes nothing. It exists exactly when the determinant is non-zero — a singular matrix has flattened a direction, and flattening cannot be undone.

At a glance

Formula shown
A⁻¹ satisfies A·A⁻¹ = A⁻¹·A = I. For a 2×2 it is the swap-and-negate pattern divided by ad − bc. In general it is found by Gauss-Jordan elimination on [A | I], and it exists exactly when the determinant is non-zero.
Scenario support
Undoing a transformation; solving a system that will be reused with many right-hand sides; changing basis back again.
Educational estimate
Planning support from the values you enter — not professional advice.

What an inverse is

If A rotates and stretches, A⁻¹ unrotates and unstretches. Applying both leaves everything where it started, which is what the identity matrix means.

For matrices the two orders happen to agree: A⁻¹A and AA⁻¹ both give the identity, even though matrix multiplication is not commutative in general. That is a genuine theorem for square matrices rather than an obvious fact.

The main use is solving. Ax = b becomes x = A⁻¹b — and that is the cleanest way to write it, though as the section below argues, not the best way to compute it.

When there is no inverse

Two cases, and both are about information rather than difficulty.

The determinant is zero. The transformation squashes at least one direction to nothing. Two different starting points land on the same result, so there is no way to work backwards — you cannot tell which one you came from. The information is genuinely gone.

The matrix is not square. It maps between spaces of different sizes, so it either loses dimensions or cannot cover the ones it lands in. Either way there is no two-sided inverse.

Non-square matrices do have a pseudoinverse, which gives the least-squares best answer rather than an exact one. It is genuinely useful, and it is a different thing with a different promise — it is what a regression solver is doing underneath.

Singularity here is decided on an exact determinant. A floating-point implementation has to pick a threshold, and any threshold is wrong for some matrix.

Two ways to compute it

The adjugate formula: the adjoint divided by the determinant. It is how the inverse is usually derived, and it gives the neat 2×2 rule — swap the diagonal, negate the off-diagonal, divide by ad − bc.

It does not scale. The adjugate needs n² cofactors, each of which is a determinant of an (n−1)×(n−1) matrix. Past 3×3 it becomes far more work than the alternative.

Gauss-Jordan elimination: write [A | I], reduce the left half to the identity, and the right half becomes the inverse. It is O(n³) and it is what this page does.

Why it works: every row operation is itself a matrix multiplication, so reducing A to I means finding a product of operations E with EA = I. That E is the inverse, and applying the same operations to I is exactly how you read it out.

Why solving beats inverting

x = A⁻¹b is the right way to write the answer. It is usually the wrong way to compute it.

Computing the inverse and then multiplying is about three times the work of solving directly, and it is numerically worse: forming the inverse introduces error that then propagates into every product you use it in.

Solving directly — by elimination, or by factoring once with LU and substituting — is faster and more accurate. Numerical libraries reflect this: their documentation tends to advise against inverting a matrix if what you actually want is a solution.

The inverse earns its place when you genuinely want the transformation itself, or when you want to see and understand it. That is what this page is for.

Where it gets used

Undoing transformations. In graphics, converting a point from world coordinates back into an object’s own coordinates is applying an inverse.

Change of basis. Moving between coordinate systems, and back again, is a pair of inverse matrices.

Statistics. The covariance matrix inverse — the precision matrix — appears throughout multivariate statistics, and the least-squares normal equations are written with one.

Control and robotics. Working out the joint angles that put an arm somewhere is an inverse problem, and the Jacobian inverse is how it is solved step by step.

Sources and methodology

The inverse and the algorithms for it are standard; these are the references.

Method. Found by Gauss-Jordan elimination on the matrix with an identity attached, on exact rationals throughout. The exactness makes the verification meaningful rather than decorative: the page multiplies A by the inverse it computed and requires the result to be the identity entry for entry, with no tolerance. In floating point that check would have to allow a margin, and a genuinely wrong answer could sit inside it. Singularity is decided on an exact determinant rather than on a threshold. That engine is verified on every change against 104 hand-written assertions, including that every one of four hundred generated inverses multiplies back to exactly the identity, checked entry by entry with no tolerance. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

DeterminantThe determinant of any square matrix up to 8×8, exact — by fraction-free elimination rather than the cofactor expansion that becomes unusable past 4×4.
MatrixAdd, multiply, transpose and power matrices with exact fractions — showing both AB and BA, because those are different matrices and often not even the same shape.
Row Echelon FormReduced row echelon form with every step shown, plus rank, nullity, pivot columns and a null space basis — all exact, because rank is a question about zeros.
System of EquationsSolve linear systems in up to six unknowns with exact fractions — row operations, the matrix form, Cramer’s rule, and the parametric family when there is no single answer.
Matrix DecompositionLU, QR and Cholesky — with LU exact and the other two decimal, because square roots are irrational, and the page labels which is which rather than presenting them alike.
EigenvalueEigenvalues and the characteristic polynomial up to 6×6 — the polynomial exact and the roots decimal, because roots of a polynomial are generally irrational.

More in Math, or browse all calculators.

Read the guide

Whether an inverse exists at all is decided by the determinant, which the Determinant Calculator computes exactly.

Educational use disclaimer

This is an educational tool. Entries are exact fractions, so the verification can demand the identity with no tolerance at all.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (3 updates)

Published 7 September 2026

  1. Published the matrix inverse page showing A × A⁻¹ alongside the answer, which is a genuine verification rather than a decoration: exact arithmetic lets it demand the identity entry by entry with no tolerance at all.
  2. Refuses a singular matrix with the reason — it collapses a direction to nothing, and the information is gone rather than merely hard to recover — and decides singularity on an exact determinant rather than a threshold.
  3. Argues that solving usually beats inverting: computing an inverse and multiplying is about three times the work of solving directly, and numerically worse.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.