Matrix Calculator
2×2 times 2×2 with all four row-by-column dot products shown, the order-swap product BA printed beside AB, and the identity product as the sanity check.
Matrix Calculator
Results recalculate instantly on every keystroke. Nothing you type is transmitted.
What this result does not account for
- 2×2 × 2×2 only — the law is general, the page is not
- No addition/subtraction or scalar mode
In short: A = [1 2; 3 4] times B = [5 6; 7 8]: each cell is a row of A meeting a column of B — c₁₁ = 1×5 + 2×7 = 19, c₁₂ = 1×6 + 2×8 = 22, c₂₁ = 3×5 + 4×7 = 43, c₂₂ = 3×6 + 4×8 = 50. AB = [19 22; 43 50]. And BA = [23 34; 31 46] — a different matrix, because matrix multiplication does not commute: order is part of the sentence.
Formula
c[i][j] = row i of A · column j of B
(m×n)·(n×p) — inner dimensions must agree
matrix multiplication is four small dot products wearing one symbol.
Worked Example
- Read the grids. rows separated by semicolons — [1 2; 3 4] is row one (1, 2) over row two (3, 4).
- Row meets column. cell (i, j) pairs row i of A against column j of B and sums the products — four small dot products for a 2×2.
- Swap and compare. compute BA the same way and look: AB ≠ BA here, and the difference is the lesson, not a bug.
The identity check is built in: multiply by [1 0; 0 1] and nothing moves — that is what “identity” means. The commutator is the star: AB = [19 22; 43 50] but BA = [23 34; 31 46], so the ORDER of a product is part of its meaning — rotate-then-translate is not translate-then-rotate.
Strengths & Limits Of This Model
Where this engine is strong
- All four dot products printed — every cell has a visible pedigree
- BA printed beside AB, so non-commutativity is seen, not asserted
Where it stops
- No 3×3 products
- No transpose or powers
Practical Use Cases
Graphics and games
transform compositions — where order changes the outcome visibly
Linear maps
see a product as “do B, then do A”
Homework checks
every dot product printed, not just the result grid
Methodology & Editorial Standards
Both matrices parsed from semicolon-row text and validated 2×2. AB computed as four row-by-column dot products, each printed in full; BA computed identically for the order comparison. The identity product A·I is checked to equal A. All entries in double precision, printed with six-place honesty.
Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.
This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.
Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.
Matrix Calculator — 9 Expert FAQs
9 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.
How does matrix multiplication actually work?
Cell by cell: the entry at row i, column j of the product is row i of the left matrix dotted with column j of the right matrix. For the default, c₁₁ pairs A’s row (1, 2) with B’s column (5, 7): 1×5 + 2×7 = 19. Four such pairings fill the 2×2 answer — the page prints all four so nothing is a black box.
Why is AB not equal to BA?
Because the row-meets-column pairing changes when the order does. Here AB = [19 22; 43 50] while BA = [23 34; 31 46] — every cell differs. Multiplication of NUMBERS commutes; multiplication of TRANSFORMATIONS does not: rotating then translating lands you somewhere else than translating then rotating. Order is grammar in this subject.
What does the dimension law require?
(m×n) · (n×p): the INNER dimensions must match, because each row of A needs exactly as many entries as each column of B to pair off. The result is m×p. Two 2×2 matrices always multiply (and give 2×2); a 2×3 against a 2×2 does not even exist as a product.
What is the identity matrix doing on the chips?
It is the number 1 of matrix land: multiplying by [1 0; 0 1] leaves every matrix exactly as it was, because each row dot products into just its own diagonal entry. That is also the test the Inverse Matrix page uses for its proof — an inverse is the matrix that multiplies back to I.
Why show all four dot products separately?
Because transcription errors live in exactly one cell. Printing c₁₁ = 1×5 + 2×7 = 19 lets you see WHICH pairing produced WHICH entry — swap two coefficients by hand and the working shows where the number went wrong, not just that the grid disagrees with your guess.
What are diagonal and shear matrices?
Two shapes worth knowing. A diagonal matrix (non-zeros only on the main diagonal) just scales each axis — [2 0; 0 3] stretches x by 2 and y by 3. A shear like [1 1; 0 1] slides the top edge sideways: area is kept, shape is not. Both multiply by the same row-meets-column law — the shapes just make the geometry visible.
Does this page multiply bigger matrices?
No — 2×2 by 2×2, honestly scoped. The row-meets-column law is identical at every size, but the printout grows quadratically and the interesting 2×2 phenomena (order matters, the identity, the inverse) are already fully visible here. The Determinant page extends to 3×3 where the geometry demands it.
What does a product mean geometrically?
Composition: AB means “apply B first, then A” — reading right to left, like function notation. That is exactly why AB ≠ BA: the two orders perform the two actions in different sequences, and transformations care about sequence. The BA card exists so you can SEE the two futures side by side.
Can I use decimals or negatives?
Any real entries work — the dot products never assume integers. Negatives flip directions (watch a swap matrix [0 1; 1 0] reverse a grid), decimals ride through in double precision, and every printed cell carries the same six-place honesty as the rest of the site.