Add, subtract, and multiply matrices — or transpose, invert, raise to a power, and find the determinant and trace of a square one. Every result updates live, with the working shown.
Updates as you type.
A matrix is a rectangular grid of numbers arranged in rows and columns. Its shape is written rows × columns — a matrix with 2 rows and 3 columns is a 2×3 matrix. Matrices package up systems of equations, transformations, and data, and the operations below are how you compute with them.
Multiplication is the operation people most often get wrong, so here it is in three steps.
Line up A (m×n) next to B (n×p). The two inner numbers must match, and the result will be m×p.
Take row i of A and column j of B, multiply the matching pairs, and add them. That sum is the single entry C(i, j).
Repeat for every row–column pairing until the whole product matrix is built.
The same matrices, run through the four operations students reach for most — every number below is computed, not typed in.
What each operation needs and the shape it returns. The tool above covers all of them.
| Operation | Symbol | Requires | Result |
|---|---|---|---|
| Addition | A + B | Same shape (m×n and m×n) | m × n |
| Subtraction | A − B | Same shape (m×n and m×n) | m × n |
| Scalar multiply | k · A | Any matrix | m × n |
| Multiplication | A × B | Inner dims match (m×n · n×p) | m × p |
| Transpose | Aᵀ | Any matrix | n × m |
| Power | Aⁿ | Square matrix | n × n |
| Determinant | det A | Square matrix | scalar |
| Inverse | A⁻¹ | Square, non-singular (det ≠ 0) | n × n |
| Trace | tr A | Square matrix | scalar |
Pick the shape of A down the side and B across the top. A shaded cell means the product is defined; it shows the shape of the result. Blank means the inner dimensions don't match, so A × B is undefined.
| A \ B | 1×1 | 1×2 | 1×3 | 1×4 | 2×1 | 2×2 | 2×3 | 2×4 | 3×1 | 3×2 | 3×3 | 3×4 | 4×1 | 4×2 | 4×3 | 4×4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1×1 | 1×1 | 1×2 | 1×3 | 1×4 | — | — | — | — | — | — | — | — | — | — | — | — |
| 1×2 | — | — | — | — | 1×1 | 1×2 | 1×3 | 1×4 | — | — | — | — | — | — | — | — |
| 1×3 | — | — | — | — | — | — | — | — | 1×1 | 1×2 | 1×3 | 1×4 | — | — | — | — |
| 1×4 | — | — | — | — | — | — | — | — | — | — | — | — | 1×1 | 1×2 | 1×3 | 1×4 |
| 2×1 | 2×1 | 2×2 | 2×3 | 2×4 | — | — | — | — | — | — | — | — | — | — | — | — |
| 2×2 | — | — | — | — | 2×1 | 2×2 | 2×3 | 2×4 | — | — | — | — | — | — | — | — |
| 2×3 | — | — | — | — | — | — | — | — | 2×1 | 2×2 | 2×3 | 2×4 | — | — | — | — |
| 2×4 | — | — | — | — | — | — | — | — | — | — | — | — | 2×1 | 2×2 | 2×3 | 2×4 |
| 3×1 | 3×1 | 3×2 | 3×3 | 3×4 | — | — | — | — | — | — | — | — | — | — | — | — |
| 3×2 | — | — | — | — | 3×1 | 3×2 | 3×3 | 3×4 | — | — | — | — | — | — | — | — |
| 3×3 | — | — | — | — | — | — | — | — | 3×1 | 3×2 | 3×3 | 3×4 | — | — | — | — |
| 3×4 | — | — | — | — | — | — | — | — | — | — | — | — | 3×1 | 3×2 | 3×3 | 3×4 |
| 4×1 | 4×1 | 4×2 | 4×3 | 4×4 | — | — | — | — | — | — | — | — | — | — | — | — |
| 4×2 | — | — | — | — | 4×1 | 4×2 | 4×3 | 4×4 | — | — | — | — | — | — | — | — |
| 4×3 | — | — | — | — | — | — | — | — | 4×1 | 4×2 | 4×3 | 4×4 | — | — | — | — |
| 4×4 | — | — | — | — | — | — | — | — | — | — | — | — | 4×1 | 4×2 | 4×3 | 4×4 |
Behind a grid of numbers sits most of modern computation and science.
A handful of identities — and one famous non-identity — make matrix algebra predictable.
The errors that cost the most marks on a linear algebra exam.

The determinant of a matrix is a single number that tells you whether the matrix is invertible and how it scales area or volume. This guide shows the 2×2 and 3×3 formulas with worked examples and the rules that save time.

Learn the dot product formula for 2D, 3D, and n-dimensional vectors, what the sign means, how to find an angle, and where projections come from.

Learn what an inner product is, the axioms it must satisfy, and how dot products, weighted products, complex vectors, and functions fit the definition.