Skip to content
🔳

Matrix Calculator

Determinant, inverse, addition, subtraction, and multiplication for 2×2 and 3×3 matrices.

Runs in your browser

Updated

Matrix A

Matrix B

Result

Two grids and a six-item list

A size select offers 2 by 2 and 3 by 3, opening on the larger, and an operation select offers det(A), the inverse, A + B, A − B, A × B and the transpose. Both grids arrive filled, A with 1 through 9 and B with 9 down to 1, and cells take any number. Matrix B is hidden for the three single-matrix operations, and every keystroke in any cell recalculates, so there is no run button.

A worked example

The shipped 3 by 3 grid is singular: 1 times (45 − 48) minus 2 times (36 − 42) plus 3 times (32 − 35) is −3 + 12 − 9 = 0, so det(A) prints 0 under the reminder a(ei − fh) − b(di − fg) + c(dh − eg). Switching to A⁻¹ leaves the result grid empty and prints Singular matrix (det = 0) — no inverse exists. Set the size to 2 by 2, where A is 1, 2, 3, 4 with determinant −2, and the inverse fills as −2, 1, 1.5, −0.5 beside Adjugate ÷ determinant (-2). A × B on the default grids returns 30, 24, 18 then 84, 69, 54 then 138, 114, 90.

How the answers are written

Each cell is scaled, rounded and scaled back, which keeps four decimals, so 0.10855 shows as 0.1086. Anything non-finite prints as — instead of Infinity. Singularity is judged on the absolute determinant against 1e-12, so a near-zero determinant is reported exactly like an exact one.

Where it stops

  • Square 2 by 2 and 3 by 3 only, so no rectangular products and no larger systems.
  • A blank cell halts the calculation with Fill every cell of A with a number. but leaves the previous result on screen.
  • No rank, trace, eigenvalues, row reduction or simultaneous-equation solver. With one unknown instead of a grid, use the quadratic equation solver.
  • Rounding happens only at display, so hand-checks against the fourth decimal can disagree.

Questions people ask

Why does the inverse mention another page?

Its closing note points at a dedicated transpose tool, because flipping a grid is a different question from inverting it; that is the matrix transpose calculator.

Can it verify my own multiplication?

Yes for these sizes: read A × B, then multiply that by the A⁻¹ grid and expect the identity back, subject to the display rounding.