UtilityBase logoUtilityBase

Calculators

Matrix Calculator

Add, multiply, invert, transpose, and take determinants — up to 4×4.

Updated July 10, 2026

How to use the matrix calculator

  1. 1Set each matrix's size — up to 4×4.
  2. 2Fill in the entries; blanks count as 0.
  3. 3Pick the operation — dimension problems explain themselves.
  4. 4Read the result grid, cleaned to 4 decimals.

Common uses

  • Linear algebra homework: products, inverses, determinants
  • Solving small systems of equations via A⁻¹b
  • Checking hand-computed cofactor expansions
  • 2D/3D transformation math for graphics and game code

Frequently asked questions

Why can't I multiply my two matrices?

Matrix multiplication is row-times-column dot products, so A's columns must equal B's rows: a 2×3 times a 3×4 works (giving 2×4), but a 2×3 times a 2×3 doesn't — there's nothing for the third element of each row to pair with. The result's shape is always (A's rows) × (B's columns). And even when both orders are legal, A×B ≠ B×A in general — matrix multiplication doesn't commute, which is the first genuinely surprising fact of linear algebra.

What does the determinant tell me?

Two big things. Geometrically, |det| is the scaling factor of the transformation — a determinant of 6 means the matrix stretches areas (2×2) or volumes (3×3) by 6×; a negative sign means orientation flips. Algebraically, det = 0 is the failure flag: the matrix squashes space into a lower dimension, has no inverse, and as a system of equations Ax = b either has no solution or infinitely many — never exactly one.

Why does my inverse have entries like 0.3333 instead of 1/3?

The calculator computes in decimals (to 4 places) rather than exact fractions — 0.3333 is 1/3, 0.1667 is 1/6. For homework requiring fraction form, recognize the common ones or multiply the whole inverse by the determinant to see the integer cofactor structure. Also worth knowing: an entry shown as 0 that 'should' be something tiny like 1e-15 has been cleaned — that's floating-point residue from elimination, not information.

How do I use the inverse to solve a system of equations?

Write the system as Ax = b (coefficients in A, constants in b); then x = A⁻¹b. Practically: compute A⁻¹ here, then multiply A⁻¹ × b using the multiplication mode with b as an n×1 matrix. If the inverse doesn't exist (det = 0), the system has no unique solution — dependent or contradictory equations. For large systems, elimination beats inversion, but at homework sizes the inverse route is transparent and checkable.

About this tool

The matrix calculator handles the six operations linear algebra homework runs on: addition, subtraction, multiplication, determinant, inverse, and transpose, for matrices up to 4×4 with per-matrix size controls. Dimension rules are enforced with error messages that teach — A×B demands A's columns equal B's rows, and the message says so with your actual sizes. Determinants and inverses use Gaussian elimination with partial pivoting (the numerically stable method), singular matrices are called out as such, and results round cleanly so floating-point dust doesn't masquerade as real entries.

Like most tools on UtilityBase, the matrix calculator runs entirely in your browser — nothing you enter is uploaded or stored on a server. It's free to use with no account required. Browse more calculators here.

Was this tool helpful?

Related tools