Matrix Calculator
Add and multiply 2×2 and 3×3 matrices and compute determinants instantly. Enter matrices A and B and see every operation with the full step-by-step working, inverses (2×2 shortcut or 3×3 adjugate), and an A+B vs A×B comparison. Results update instantly. Free, no sign-up.
Matrix A
Matrix B
Advanced options
How Matrix Math Works
Addition is entry-by-entry: add a₁₁ to b₁₁, a₁₂ to b₁₂, and so on. Multiplication is row-times-column: each entry of A×B is the dot product of a row of A with a column of B — (AB)₁₁ = a₁₁b₁₁ + a₁₂b₂₁. Order matters: A×B usually differs from B×A.
The determinant measures how the matrix scales area (2×2) or volume (3×3). For 2×2: det = a₁₁a₂₂ − a₁₂a₂₁. For 3×3, cofactor expansion along the first row gives det = a₁₁(a₂₂a₃₃−a₂₃a₃₂) − a₁₂(a₂₁a₃₃−a₂₃a₃₁) + a₁₃(a₂₁a₃₂−a₂₂a₃₁). If det = 0 the matrix is singular — it squashes space flat and has no inverse. Otherwise the inverse comes from the adjugate: A⁻¹ = (1/det) × adj(A), where adj(A) is the transpose of the cofactor matrix.
Where Matrices Are Used
Matrices rotate and scale 3D graphics, encode Google's PageRank, solve systems of equations, and power machine-learning models. The 2×2 case is the perfect training ground: every idea — determinants, inverses, non-commutativity — works exactly the same in higher dimensions.
Frequently Asked Questions
How do you multiply two 2×2 matrices?
Entry (i,j) of the product = row i of A dot column j of B. E.g. (AB)₁₁ = a₁₁×b₁₁ + a₁₂×b₂₁.
What is the determinant of [[1,2],[3,4]]?
1×4 − 2×3 = −2. The negative sign means the transformation also flips orientation.
When does a matrix have no inverse?
Exactly when its determinant is zero — the matrix is then "singular" and squashes space flat.
Is matrix multiplication commutative?
No — A×B ≠ B×A in general. Try swapping the inputs above to see.
What is a scalar multiple?
Multiplying every entry by one number k: 2×[[1,2],[3,4]] = [[2,4],[6,8]]. It scales the whole transformation.
How do you invert a 3×3 matrix?
Build the cofactor matrix (each entry = ± the determinant of its 2×2 minor), transpose it to get the adjugate, then divide every entry by det(A). The calculator above shows each stage.
NumberTally