Multiply and invert small matrices

2×2 and 3×3 matrices cover most homework and graphics math — add, multiply, invert, or take the determinant without a CAS.

Tools used in this guide

The job

Rotation matrices, linear systems, transformation checks — most practical matrix work is 2×2 or 3×3. Typing it into a calculator keeps the arithmetic honest.

Operate

Pick the size and operation, fill the grid(s), and read the result. Addition/subtraction/multiplication take two matrices; scalar multiply takes a number; determinant, transpose, and inverse take one.

  • Multiplication is A×B in that order — matrices do not commute.
  • A zero determinant means no inverse exists; the tool says so instead of producing NaN.

Worked example

Rotating by 90°: [[0,−1],[1,0]] times the point [[2],[3]] gives [[−3],[2]] — the point moved counter-clockwise as expected.

Where it stops

Sizes are fixed at 2×2 and 3×3 — no arbitrary n, no symbolic entries, no eigenvalues. Each entry must be within ±1e12; results round to 4 decimal places; singular matrices report an error rather than a near-inverse.