Matrix Calculator
2×2 or 3×3 matrix arithmetic. Click any i for detail.
Matrices
Operation
i
Op
Add, subtract, or multiply. |
|
|---|---|
Matrix A
i
A
One row per line, spaces between entries. |
|
Matrix B
i
B
Same format. For multiply, A columns must equal B rows. |
How to use this calculator
- Enter matrix A as one row per line, entries space-separated.
- Enter matrix B in the same format.
- Pick add, subtract, or multiply.
- Read the result grid or an error if shapes mismatch.
Results explained
Addition and subtraction are element-wise and need matching dimensions. Multiplication uses row-by-column dot products and needs A's columns to equal B's rows.
Quick reference: matrix shapes
2×3 times 3×2 is valid; 2×3 times 2×3 is not.
| Item | Detail |
|---|---|
| Add/subtract | same rows and columns |
| Multiply | A cols = B rows |
| 2×2 example | four entries, two rows |
| Max size | 3×3 on this page |
Determinants, inverses, and eigenvalues are out of scope.
How the estimate is built
(A+B)ᵢⱼ = Aᵢⱼ + Bᵢⱼ; (AB)ᵢⱼ = Σₖ Aᵢₖ Bₖⱼ.
Example scenario
[[1,2],[3,4]] + [[5,6],[7,8]] → [[6,8],[10,12]].
FAQ
Why did multiply fail?
Inner dimensions must match. A 2×2 cannot multiply a 2×2 unless both are square and compatible.
Can I use commas between entries?
Spaces separate entries; commas in numbers are not supported.
Is there an inverse button?
No. This page does elementary arithmetic only.