Matrix Calculator

Add, subtract, multiply, transpose, or find the determinant of matrices up to 5×5.

Matrix A
2×2rowscols
Matrix B
2×2rowscols
Equations used
(AB)_ij = Σ_k A_ik B_kj
detbeginpmatrix a & b c & d endpmatrix = ad - bc; larger matrices via cofactor expansion
Transpose: (A^T)_ij = A_ji

Frequently Asked Questions

Why do A and B need matching dimensions to add or subtract?

Matrix addition and subtraction work entry by entry, so A and B must have exactly the same number of rows and columns — there's no defined way to add entries that don't line up.

Why does multiplication need A's columns to equal B's rows?

Each entry of A × B is a sum of products pairing a row of A with a column of B, so A's row length (its column count) must match B's column length (its row count) for every pairing to have a partner.

Why can't I compute a determinant for a non-square matrix?

The determinant is only defined for square matrices (equal rows and columns) — it's a single number describing how that matrix scales area or volume, which only makes sense when rows and columns match up.