Matrices are rectangular arrays. Before any sum or product, ask whether the shapes allow the operation. Addition needs matching sizes. Multiplication needs the first matrix’s column count equal to the second’s row count, and each result cell is a row·column dot product, not an entry-wise times. This guide owns that shape gate, a verified add-versus-multiply twin, and a non-commutativity check. Open the Matrix Calculator for the live dual grids, result board, and multiply cell work peel.
What this guide owns
- Shape rules for add/subtract vs multiply.
- Same-number twin: element-wise add versus linear-algebra multiply.
- Multiply cell peel and AB versus BA.
- Honest handoffs when you need larger sizes or symbolic work.
It is not a marginal-vs-effective tax bracket stack and not a portfolio drift rebalance.
Shape gate before arithmetic
| Operation | Shape rule | Result shape |
|---|---|---|
| Add / subtract | Same rows and columns | Same as A (and B) |
| Multiply (A×B) | A’s columns = B’s rows | A’s rows × B’s columns |
On a fixed 2×2 homework board both add and multiply are allowed. The gate still matters as literacy: change the story to 2×3 times 2×2 and multiply is blocked even if every entry looks “ready.”
Element-wise (Hadamard) products are a different operation. This page’s multiply is the linear-algebra product used in transformations and systems: each cell depends on a whole row and column.
Worked twin: same A and B, two operations
Use the calculator’s Add 2×2 numbers:
A = | 1 2 | B = | 5 6 |
| 3 4 | | 7 8 |Path 1: add (element-wise)
A + B = | 1+5 2+6 | = | 6 8 |
| 3+7 4+8 | | 10 12 |Each entry is independent. No row·column mixing.
Path 2: multiply (row·column)
cᵢⱼ = (row i of A) · (column j of B)
Peel two corners:
c₀₀ = 1·5 + 2·7 = 5 + 14 = 19 c₁₁ = 3·6 + 4·8 = 18 + 32 = 50
Full product:
A B = | 19 22 |
| 43 50 |Same entries as the add path. Completely different board. If your “multiply” equals the add twin entry-by-entry, you accidentally did Hadamard (or added). Flip Add → Multiply on the Matrix Calculator and open the c00 / c11 peels to see the products written out.
Order matters: AB versus BA
Keep the same A and B. Compute B A:
B A = | 5·1+6·3 5·2+6·4 | = | 23 34 |
| 7·1+8·3 7·2+8·4 | | 31 46 |A B = | 19 22 | B A = | 23 34 |
| 43 50 | | 31 46 |The boards differ. Matrix multiplication is rarely commutative. Swapping factors is not a free rewrite rule the way it is for ordinary numbers.
Identity sanity check
Right-multiply by the 2×2 identity:
I = | 1 0 |
| 0 1 |For any compatible A, A I = A. The calculator’s × Identity preset is that check: if the result board drifts, the multiply path is wrong. Left identity I A = A holds as well for square cases of this size.
Classic multiply preset (compact peel)
Another board on the tool:
A = | 1 2 | B = | 2 0 |
| 3 4 | | 1 2 |
A B = | 4 4 |
| 10 8 |c₀₀ = 1·2 + 2·1 = 4 c₀₁ = 1·0 + 2·2 = 4 c₁₀ = 3·2 + 4·1 = 10 c₁₁ = 3·0 + 4·2 = 8
Use this when you want a smaller product while practicing the peel.
What this 2×2 board does not do
Determinants, inverses, eigenvalues, SVD, and large sparse solves belong in a CAS, notebook, or course tool. The shape and multiply literacy here still transfer: you cannot invert a singular matrix, and eigenproblems need a different engine than a sticky homework panel.
For rational arithmetic outside arrays, hand off to the Fraction Calculator. For general numeric expressions, use the Scientific Calculator.
Common failure modes
- Adding matrices of different shapes without noticing.
- Treating multiply as entry-wise times.
- Assuming AB = BA.
- Reporting only one corner cell instead of the full result board.
- Expecting inverses or eigenvalues from a 2×2 add/multiply board.
FAQ
What does the shape gate mean?
Operations only run when dimensions allow them. Addition and subtraction need matching shapes. Multiplication needs A’s columns equal to B’s rows.
Is matrix multiplication the same as multiplying matching entries?
No. Entry-wise (Hadamard) multiplication is different. This guide’s multiply is the row·column product.
Why open a multiply cell peel?
Each result cell is a short sum of products. The peel shows those terms so the board is not a black box.
Does AB always equal BA?
No. Order usually matters. The twin above is a concrete counterexample.
Can this calculator find eigenvalues?
No. It is educational numeric literacy for small add, subtract, and multiply boards, not a symbolic or eigen solver.
Bottom line
Gate on shape first. Add entry-wise when shapes match. Multiply with row·column peels, and never assume order is free. Run the dual grids on the Matrix Calculator, then hand off when the problem outgrows a 2×2 homework board.