Enter your matrix, open the Advanced tab and press A⁻¹. If the matrix is singular you get a clear message instead of a wrong answer. The step-by-step panel shows the intermediate values as exact fractions — 3/5 rather than 0.6000000001 — because it runs on rational arithmetic rather than floating point.
When an inverse exists
The inverse A⁻¹ is the matrix that undoes the original: A·A⁻¹ = A⁻¹·A = I. It exists only for square matrices, and only when the determinant is non-zero. A matrix with zero determinant is called singular, and it has no inverse at all — not a large one, not an approximate one, none. Information was destroyed by the transformation and no matrix can recover it.
The 2×2 shortcut
Swap the diagonal, negate the off-diagonal, divide by the determinant:
| a | b |
| c | d |
| d | −b |
| −c | a |
The division by ad − bc is where singularity announces itself: if the determinant is zero there is nothing to divide by, and the formula breaks down exactly when the inverse fails to exist.
Gauss-Jordan on the augmented matrix
This is the general method and the one the calculator shows step by step. Write A next to the identity matrix, then run row operations until the left half becomes the identity. Whatever the right half turned into is A⁻¹:
| 4 | 7 | 1 | 0 |
| 2 | 6 | 0 | 1 |
| 1 | 0 | 3/5 | −7/10 |
| 0 | 1 | −1/5 | 2/5 |
If at some point a row on the left becomes all zeros, stop: the matrix is singular and the inverse does not exist. Always verify the result by multiplying — A·A⁻¹ should give exactly the identity, and the A × B button does that check for you in two clicks.
The 3×3 loaded above works out to integers, because its determinant is exactly −1:
| 2 | 1 | 1 |
| 1 | 3 | 2 |
| 1 | 0 | 0 |
| 0 | 0 | 1 |
| −2 | 1 | 3 |
| 3 | −1 | −5 |
Read the last row of the original: it picks out the first coordinate and discards the other two. The inverse has to put that information back, which is why its entries are large compared with the matrix it inverts. That is the general pattern — the closer the determinant sits to zero, the bigger the inverse becomes, since det(A⁻¹) = 1/det(A).
Nearly singular is its own problem
A matrix does not have to be singular to be troublesome. If the determinant is merely small relative to the size of the entries, the matrix is ill-conditioned: a tiny change in the input produces a huge change in the inverse, and in floating point that change can be pure rounding error. Solving a system through such an inverse can return an answer with no correct digits in it while looking perfectly plausible.
This is the practical reason the advice below matters. The step-by-step panel here sidesteps the issue entirely by working in exact fractions, so what you read is the true inverse rather than a floating-point approximation of it.
Why you rarely want the inverse itself
Most of the time the inverse is not the goal — solving Ax = b is, and the inverse is just the route people remember from class. It is the expensive route. Computing A⁻¹ and then multiplying costs roughly three times the arithmetic of row-reducing [A | b] directly, and it loses accuracy at both stages instead of one.
Where the inverse genuinely earns its place is when you need the matrix itself rather than one solution: reading off how each input influences each output, composing it with other transformations, or feeding it into a formula that is stated in terms of A⁻¹. If you only want x, use elimination; if you need many solutions for the same A, use LU decomposition, which is cheaper still.
The adjugate (cofactor) formula
A⁻¹ = adj(A) / det(A), where the adjugate is the transpose of the cofactor matrix. Build the matrix of cofactors C(i,j) = (−1)^(i+j)·M(i,j), transpose it, divide by the determinant.
It is elegant and it is what proofs use, because it expresses the inverse in closed form rather than as the outcome of an algorithm. It is also impractical: it needs n² determinants of size n−1. Beyond 3×3, use Gauss-Jordan.
Useful checks and properties
- Always verify: multiply your answer by the original and confirm you get the identity.
(A·B)⁻¹ = B⁻¹·A⁻¹— the order reverses.(Aᵀ)⁻¹ = (A⁻¹)ᵀdet(A⁻¹) = 1 / det(A), so a nearly-singular matrix has a huge inverse.- An orthogonal matrix satisfies
A⁻¹ = Aᵀ, which makes inversion free. - To solve
Ax = b, do not computeA⁻¹and multiply. Row-reduce[A | b]in the RREF calculator instead — fewer operations and better numerical accuracy.
Common mistakes
- Inverting the entries one by one. The inverse is not the matrix of reciprocals —
1/a(i,j)has nothing to do with it. - Getting the order wrong.
(A·B)⁻¹ = B⁻¹·A⁻¹, notA⁻¹·B⁻¹. - Solving systems through the inverse. For
Ax = b, row-reducing[A | b]is fewer operations and numerically more accurate. - Using the adjugate on big matrices. It needs
n²determinants of sizen−1. Past 3×3 it is far slower than elimination. - Confusing the inverse with the transpose. They coincide only for orthogonal matrices. In general the two have nothing to do with each other.