HOME / TOOLS / MATHEMATICS / MATRIX CALCULATOR
MATHEMATICS — MATRIX CALCULATOR

Matrices, worked entry by entry.

Set two shapes, fill the grids, pick an operation — the result arrives as a bracketed matrix with every row-times-column product written out. Flip to ANALYZE and a single matrix opens up completely: determinant by cofactor expansion, inverse by adjugate, transpose, trace and rank. Exact fractions, live steps, nothing rounded, nothing sent anywhere.

EXACT FRACTION OUTPUT DET · INVERSE · RANK LIVE SHAPE CHECKS WORKS OFFLINE
UPDATED · 2025 · CALC v1
01

The instrument

Two matrices in — or one, taken apart. Sums, differences, products, determinants, inverses: everything exact, everything live, everything shown.

SWM-02 · MATRIX
A ROWS 2 COLS 3
B ROWS 3 COLS 2
MATRIX A — 2×3
MATRIX B — 3×2
ENTRIES — EMPTY COUNTS AS 0 · NEGATIVES & DECIMALS WELCOME · SOLVES AS YOU TYPE
TRY:
THE WORK — ENTRY BY ENTRYLIVE
THE ANATOMY — Aᵀ · det · A⁻¹ · rankLIVE
INTEGER-EXACT CORE · FRACTION OUTPUT · 1×1 → 4×4 · NOTHING LEAVES THE PAGE
02

How to use it

Sixty seconds to mastery. The calculator is live from the first keystroke — here is how to read everything it shows you.

STEP 01

Set the shapes

Steppers set the rows and columns of A (1 to 4 each). B's shape follows the operation automatically — equal for + and −, cols(A) = rows(B) for ×.

2×3 · 3×2 → 2×2
STEP 02

Fill the entries

Type into the grid cells. Empty counts as 0; negatives and decimals are welcome. Integer entries keep every downstream fraction exact.

c₁₁ = 1·2 + 2·0 + 0·1
STEP 03

Pick the operation

+, − or × between the matrices. The dimension rule is enforced live, so an illegal shape can never sneak into a calculation.

cols(A) = rows(B) ✓
STEP 04

Read the result

The big bracketed matrix is the answer. The rows below carry the shapes and determinant checks — including det(AB) = det(A)·det(B).

det(AB) = det(A)·det(B) ✓
STEP 05

Flip to ANALYZE

One matrix, full anatomy: transpose, trace, determinant by cofactor expansion, inverse by adjugate, rank by elimination — all with steps.

A⁻¹ = adj(A)/det(A)
STEP 06

Learn from the chips

One tap loads the multiplication demo, an addition pair, a clean 2×2 inverse, and a singular matrix — the cautionary tale of det = 0.

det = 0 → singular
~/studywithstem/sessionsmatrix.txt
SESSION — multiply A(2×3) · B(3×2)
├── shapes2×3 · 3×2 → 2×2 ✓
├── c₁₁1·2 + 2·0 + 0·1 = 2
├── c₁₂1·1 + 2·3 + 0·0 = 7
├── c₂₁3·2 + 1·0 + 1·1 = 7
├── c₂₂3·1 + 1·3 + 1·0 = 6
├── resultC = [ 2 7 ; 7 6 ]
└── checkdet(C) = 2·6 − 7·7 = −37
PROOF COMPLETE — 0 ERRORS
03

Questions, answered

Shapes, determinants, inverses, rank — the matrix, from every angle.

Q.01How do I multiply two matrices?
Multiply rows of A into columns of B: cij is the dot product of row i of A with column j of B. Shapes must satisfy (m×n)·(n×p) = m×p. For example c₁₁ = a₁₁b₁₁ + a₁₂b₂₁ + a₁₃b₃₁. This calculator writes out each entry's full expansion beneath the result.
Q.02How do I add or subtract matrices?
Both matrices must have the same shape; combine entry by entry: cij = aij + bij. Addition is commutative (A + B = B + A) but subtraction is not (A − B ≠ B − A). The tool enforces matching dimensions automatically via the auto-fitting steppers.
Q.03How do I find the determinant of a matrix?
For 2×2: det = ad − bc. For 3×3 and larger: Laplace cofactor expansion along a row — det = a₁₁M₁₁ − a₁₂M₁₂ + a₁₃M₁₃…, where each M is the minor: the determinant of the matrix left after deleting that row and column. The ANALYZE tab shows every minor expanded, step by step.
Q.04How do I find the inverse of a matrix?
A⁻¹ = adj(A)/det(A), where the adjugate is the transpose of the cofactor matrix. For 2×2 there's a shortcut: swap the diagonal entries, negate the other two, divide by det. If det = 0 the matrix is singular and no inverse exists. Check any answer with A·A⁻¹ = I — the tool computes inverse entries as exact reduced fractions.
Q.05What is the transpose of a matrix?
The transpose flips rows and columns: the entry (Aᵀ)ij equals aji. A symmetric matrix equals its own transpose. Useful identity: (AB)ᵀ = BᵀAᵀ — when you transpose a product, the order flips.
Q.06What is the rank of a matrix?
The number of linearly independent rows, found by Gaussian elimination to row echelon form and counting the pivots (nonzero leading entries). For a square n×n matrix, rank < n means the rows are dependent, the determinant is 0, and the matrix is singular. The tool lists the row operations and the echelon form.
Q.07What matrix sizes does the calculator support?
Any shape from 1×1 up to 4×4, rectangular included. Addition, subtraction, multiplication, transpose and rank all work on rectangular matrices; the determinant, trace and inverse require a square matrix — the tool says so plainly when the shape is rectangular.
Q.08Is it free, exact and private?
Completely free, no sign-up. Integer entries are computed with exact fraction arithmetic — determinants are exact integers and inverse entries are reduced fractions, never rounded. Decimal entries are computed to 9 significant figures and marked with ≈. Everything runs locally in your browser, and the page keeps working offline once loaded.