Free Online Matrix Calculator With Inverse and Determinant
Add, subtract, multiply, transpose, invert and reduce matrices up to eight by eight. Integer matrices give integer answers rather than figures like 2.9999999999999996, the inverse is verified by multiplying it back against the original, and a matrix that cannot be inverted is named as singular rather than returning nonsense.
The sum runs in your browser. Nothing you type is sent anywhere.
🔲 The matrices
One row per line, numbers separated by spaces or commas. A pasted [[1,2],[3,4]] works too. Up to eight rows and eight columns.
What was checked, and how far off it came.
| When | Calculation | Actions |
|---|
Number formatting
Rounding only changes what you see. The sum itself always runs at full precision, so a rounded number never feeds into the next step.
Display
Full screen hides the page around the tool. Press Escape, or the button in the bar, to come back.
History
Your data
Settings, history and saved setups live in this browser and nowhere else. There is no account and no server, which also means clearing them here is final.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Use the Matrix Calculator
Three steps, and the third is worth a look.
What to Know About Matrix Arithmetic
Shapes, singular matrices and why the digits matter.
Key Features & Capabilities
What it does, and what it deliberately does not.
About Matrix Arithmetic
A matrix is a rectangle of numbers, and matrix arithmetic is the language of anything with several quantities changing together: systems of equations, rotations and scalings in graphics, transition probabilities, least squares fitting. The operations themselves are simple enough to do by hand on small examples, and tedious enough beyond three by three that a calculator is the sensible tool.
Addition and subtraction need the two matrices to be the same shape. Multiplication is the one that surprises people: the columns of the first have to match the rows of the second, the answer has the rows of the first and the columns of the second, and the order matters, so A times B and B times A are usually different and are often not even the same shape. Those rules are checked here before anything is computed, and when one is broken the page says which rule and what the shapes were.
The determinant is a single number that says whether the matrix can be undone. If it is zero the matrix squashes space flat, information is lost and there is no inverse. The practical difficulty is that the determinant is computed by elimination, which leaves rounding dust, so a determinant that should be exactly zero arrives as ten to the minus sixteen instead. Treating that as non zero produces an inverse full of enormous numbers that look like an answer. The threshold for calling it zero therefore has to scale with the size of the entries and the order of the matrix, which is what is done here.
There is a second accuracy decision worth stating. For two by two and three by three matrices the inverse is computed from the adjugate rather than by elimination. That means an integer matrix inverts to clean values: you get 0.6 rather than 0.6000000000000001. It is more accurate than the general purpose routine in numpy for these small sizes, and small sizes are what most people type in.
Finally, every inverse is checked by multiplying it back against the matrix you typed and comparing with the identity. The worst drift is shown. For a well behaved matrix it is zero or very nearly so. For a nearly singular one it is large, and seeing that is the only reliable warning that the inverse on screen, however plausible it looks, should not be used.
Frequently Asked Questions
Sizes, inverses, determinants and what goes wrong.