Matrix Calculator
Add, subtract and multiply 2×2 and 3×3 matrices, or find the determinant and inverse of a matrix — results as proper matrix grids.
Matrix A
Matrix B
Result
A × B
Note: In 2×2 mode the third row and column fields are ignored (they are pre-filled to extend cleanly to 3×3). A matrix with determinant zero has no inverse.
Matrix Arithmetic, Done Entry by Entry
Choose 2×2 or 3×3, enter matrices A and B, and add, subtract or multiply them — or take the determinant or inverse of A alone. Addition and subtraction are entry-by-entry. Multiplication is the row-by-column rule: each entry of the product is a dot product of a row of A with a column of B, which is why the order matters and A × B almost never equals B × A. The result is rendered as a proper matrix grid so the structure stays visible.
Worked Example
With A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]]: the product is [[1×5 + 2×7, 1×6 + 2×8], [3×5 + 4×7, 3×6 + 4×8]] = [[19, 22], [43, 50]]. The determinant of A is 1×4 − 2×3 = −2, and because it is not zero the inverse exists: (1/−2) × [[4, −2], [−3, 1]] = [[−2, 1], [1.5, −0.5]]. A determinant of exactly zero means the matrix flattens space into a line or point, no inverse exists, and the calculator says so.
Why Matrices Run the Modern World
A matrix is a machine for transforming space: rotations, scalings and shears in graphics are 3×3 matrices multiplied millions of times a second; a system of equations is one matrix equation Ax = b whose solution is A−1b; and neural networks are, at heart, very large matrix multiplications with additions. Learning the 2×2 case by hand — determinant as area scale factor, inverse as undo — is the honest foundation for all of it.
Frequently Asked Questions
How does matrix multiplication work?
Each entry of the product is a row of the first matrix dotted with a column of the second. For the worked example, the top-left entry is 1x5 + 2x7 = 19.
Does A x B equal B x A?
Almost never. Matrix multiplication is not commutative — the two products usually differ, and sometimes one of them does not even exist for rectangular matrices.
What does a determinant of zero mean?
The matrix flattens space into a lower dimension and cannot be undone — it has no inverse, and a system using it has no unique solution.
How is the inverse used?
It solves matrix equations: if Ax = b then x = A inverse b. It is the matrix analogue of dividing both sides by a number.