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.
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.
Read the guide
Whether an inverse exists at all is decided by the determinant, which the Determinant Calculator computes exactly.