A matrix is just a labelled grid of numbers: Picture a delivery company storing how many parcels each of 2 vans carries to 3 zones. You write the numbers in a grid — that grid is a matrix.
Its order is written rows × columns (rows first, always). A grid with 2 rows and 3 columns is a 2 × 3 matrix.
Why bother? A matrix lets you handle a whole table of numbers in one step — add two months' data, scale everything up by 10%, or combine tables — instead of touching each entry by hand.
Adding and scaling — entry by entry: Add / subtract: only matrices of the same order can be added — you add matching entries.
Scalar multiply: multiply every entry by the number. Scaling a sales table by 1.1 raises every figure by 10% at once.
These behave exactly like ordinary arithmetic, just done to a whole grid at once.
IB-style question — combine two weeks of orders
A bakery records loaves sold at two shops over two days as W1 and W2 (rows = shops, columns = days):
W1 = ((12, 9), (7, 15)), W2 = ((10, 11), (8, 13)).
Find the total W1 + W2, and find 2·W1 (a forecast of double demand).
Step by step
- Add matching entries (both are 2×2, so this is allowed).
- Scalar multiply: double every entry of W1.
Final answer
Total = ((22, 20), (15, 28)). Doubled W1 = ((24, 18), (14, 30)). In context: shop 1 sold 22 loaves on day 1 across both weeks.
Multiply row by column — match the inner numbers: Matrix multiplication is not entry-by-entry. To get an entry of AB, you slide along a row of A and down a column of B, multiply pair-by-pair, and add.
The rule for whether you even can: an (m × n) times an (n × p) works only when the inner numbers match (A's columns = B's rows). The answer is (m × p) — the outer numbers.
Real use: if A holds 'parcels per route' and B holds 'cost per route', then AB gives total cost — multiplication chains two tables together. Order matters: AB is usually not BA.
IB-style question — chain two 2×2 matrices
Let A = ((2, 1), (0, 3)) and B = ((1, 4), (2, 5)).
Find the product AB.
Step by step
- Check the orders: (2×2)(2×2) — inner 2's match, so the product is 2×2.
- Top-left = (row 1 of A)·(col 1 of B) = 2·1 + 1·2.
- Top-right = 2·4 + 1·5; bottom-left = 0·1 + 3·2; bottom-right = 0·4 + 3·5.
Final answer
AB = ((4, 13), (6, 15)). (Check BA — you get a different matrix, so order matters.)
The identity matrix I — the 'multiply by 1' of matrices: The identity has 1's down the diagonal and 0's elsewhere. For 2×2:
I = ((1, 0), (0, 1)).
Multiplying by it changes nothing: AI = IA = A, just like ×1 for ordinary numbers. It's the matrix that 'does nothing', which is exactly what an inverse must undo back to (next section).
IB-style question — multiplying by the identity
Show that for A = ((7, −2), (3, 5)), the product AI equals A, where I = ((1, 0), (0, 1)).
Step by step
- Each entry: row of A times a column of I (which just 'picks out' one entry).
- Simplify.
Final answer
AI = A — the identity leaves A unchanged, confirming I acts like the number 1.