Matrix Calculator
Free Matrix Calculator to add, subtract, and multiply 2×2 and 3×3 matrices online with step-by-step solutions.
What does this Matrix Calculator do?
This tool performs the three most common matrix operations — addition, subtraction, and multiplication — on 2×2 or 3×3 square matrices, showing the resulting matrix instantly.
The rules
Matrix addition and subtraction work element-by-element: each entry in the result is the sum (or difference) of the corresponding entries in matrix A and matrix B. Matrix multiplication is different — each entry in the result is the sum of the products of a row in A and a column in B (the "dot product" of that row and column).
Step-by-step example
For 2×2 addition: if A = [[1,2],[3,4]] and B = [[5,6],[7,8]], then A + B = [[1+5, 2+6],[3+7, 4+8]] = [[6,8],[10,12]]. For multiplication, the top-left entry of A×B is (1×5 + 2×7) = 19, not simply 1×5 — this is the part that trips people up when they first learn matrix multiplication.
Tips & common mistakes
- Matrix multiplication is not commutative — A×B usually does not equal B×A, unlike regular number multiplication.
- Don't multiply matrices element-by-element like you would add them — this is the most common matrix mistake for students first learning linear algebra.
- Both matrices must be the same size for addition/subtraction, and for multiplication here (2×2 or 3×3 square matrices only).
Frequently asked questions
This tool multiplies square matrices of matching size (2×2 or 3×3). For matrix multiplication in general, the number of columns in A must equal the number of rows in B.