Add, multiply and invert matrices

Rows are lines, columns are spaces. Everything from A + B to the inverse is plain arithmetic on your own numbers, so nothing is sent anywhere.

How Matrix Calculator works

This is a calculation, not a lookup: the expression is evaluated in the page and the steps are shown so the answer can be checked by hand. Because nothing is looked up remotely, the tool keeps working with the network off and cannot quietly change its answer between visits.

That is the whole architecture: static files, one script, no upload endpoint to leak or log. Close the tab and the work is gone.

The dimension rules people trip over

Addition and subtraction need identical shapes: a 2×3 matrix can only be added to another 2×3. Multiplication is looser and stricter at once — the number of columns in the first matrix must equal the number of rows in the second, so a 2×3 times a 3×4 gives a 2×4. The tool refuses the operation and says which dimension is wrong instead of printing a shape that looks plausible.

The transpose swaps rows for columns, which is why it turns a 3×2 into a 2×3 and is the standard first step when a product has the wrong orientation.

Determinant, inverse and when they fail

The determinant is a single number summarising how the matrix scales area or volume; when it is zero the matrix collapses space onto a lower dimension and cannot be undone. That is exactly why the inverse fails at the same moment: dividing by zero is what a singular matrix asks you to do.

Both are computed here by direct elimination rather than approximation, in double precision, so the answer is exact up to floating-point error. The cost grows quickly — a 10×10 determinant is already a million operations — which is why the tool is comfortable up to about 7×7 and honest about slowing down beyond that.

Good to know

  • Works offline once loaded, including on flights and in locked-down networks.
  • No file size limit beyond your device's own memory.
  • Free to use, with no account and no usage counter.
  • Results are produced locally, so they are not logged or shared with anyone.

Questions

How do I type a matrix?

One row per line, values separated by spaces or commas. A 2×3 matrix is two lines of three numbers.

Why does the inverse sometimes fail?

A matrix with a determinant of zero has no inverse. The tool says so instead of printing infinities.

How precise is the result?

Values are computed in double precision and displayed to six decimals, with anything smaller than 1e-10 shown as zero.

Can it handle large matrices?

Determinants and inverses are computed directly rather than iteratively, so beyond about 7×7 the browser gets slow. For bigger systems use a numerical library.

Keep going

More math tools