Matrix Inverse Calculator
Invert a square matrix up to 8×8 by Gauss-Jordan elimination, with the determinant, and a check that the result multiplies back to the identity.
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the Matrix Inverse Calculator does
This matrix inverse calculator will invert a square matrix up to 8×8 by Gauss-Jordan elimination, with the determinant, and a check that the result multiplies back to the identity. Paste your text in, pick the options you need, and copy the result straight back out. It is most often used for checking a matrix inverse worked by hand. You may also want the money counter.
How to use it
- Type or paste the matrix, one row per line, values separated by spaces, commas or tabs.
- The inverse appears alongside the determinant.
- Read the identity check at the bottom — it tells you whether the answer is trustworthy.
How it works
The inverse of a square matrix M is the matrix that undoes it: multiply the two together in either order and you get the identity. Not every matrix has one. A matrix has an inverse exactly when its determinant is not zero, and the geometric reason is worth holding onto — a matrix with determinant zero collapses space onto a lower dimension, flattening a volume to a plane or a plane to a line, and no transformation can un-flatten that. Which direction a point came from has genuinely been lost.
The method used here is Gauss-Jordan elimination with partial pivoting. The matrix is written next to an identity matrix of the same size, and then row operations are applied until the left-hand side becomes the identity; whatever the right-hand side has become is the inverse. Partial pivoting means swapping rows at each step so the largest available value sits on the diagonal, which keeps the arithmetic numerically stable. Without it, a small pivot divides through the rest of the row and amplifies rounding error badly.
The identity check at the bottom of the result is the most useful part, and most calculators leave it out. The inverse is multiplied back by the original matrix and the worst deviation from the identity is reported. If that number is around 1e-16 the answer is exact to machine precision. If it is 1e-6 or larger, the matrix is close to singular — its rows are nearly dependent — and the inverse contains very large numbers with correspondingly large errors. The arithmetic has not failed; the problem itself is ill-conditioned, and a result that looks like a clean answer is not one.
One practical note on when not to use an inverse at all. If you are inverting a matrix only in order to solve a system of equations, don’t: solving directly by elimination is both faster and more accurate than computing the inverse and multiplying. The inverse is the right thing when you genuinely need the transformation itself — for repeated solves with the same matrix, for a covariance calculation, or because the inverse is what the problem asks for.
When to use it
- Checking a matrix inverse worked by hand.
- Finding the determinant to see whether a system has a unique solution.
- Inverting a transformation matrix in graphics or robotics work.
- Teaching Gauss-Jordan elimination with a worked result.
- Testing whether a matrix is close to singular before relying on it.
Common mistakes to avoid
- Expecting a non-square matrix to have an inverse. Only square matrices do; rectangular ones have pseudo-inverses, which are a different thing.
- Trusting an inverse with a poor identity check. A nearly singular matrix produces large, unreliable numbers.
- Inverting a matrix in order to solve a system. Direct elimination is faster and more accurate.
- Assuming a determinant that displays as zero is exactly zero. It may be a tiny value rounded for display, which is itself a warning.
Frequently asked questions
What is the multiplicative inverse of a matrix?
The matrix that, multiplied by the original in either order, gives the identity matrix. It is the matrix equivalent of a reciprocal, and like division by zero it does not exist when the determinant is zero.
Why does my matrix have no inverse?
Its determinant is zero, which means the rows (or columns) are linearly dependent — one is a combination of the others. The transformation collapses space onto a lower dimension, and that cannot be reversed.
How large a matrix can this handle?
Up to 8×8. Beyond that, numerical conditioning matters more than the arithmetic and a dedicated numerical package with proper diagnostics is the right tool.
What does the identity check at the bottom mean?
The inverse is multiplied back by the original matrix; the result should be the identity. The number reported is the worst deviation. Around 1e-16 means exact to machine precision. Above 1e-6 means the matrix is nearly singular and the inverse is unreliable.
Should I invert a matrix to solve a system of equations?
No. Solving by elimination directly is faster and numerically better. Compute the inverse when you need the transformation itself, not as a step towards a solution.