AP PRECALCULUS — UNIT 4B · FUNCTIONS INVOLVING PARAMETERS, VECTORS, AND MATRICES
4.10 — Matrices
Notes — Rectangular Arrays of Numbers
💡 Learning Objectives (4.10.A)
By the end of this lesson you will be able to:
- Describe a matrix by its dimensions and access individual entries
- Add, subtract, and scale matrices
- Multiply two matrices using the row-column rule
- Recognize matrix multiplication is NOT commutative
1. What Is a Matrix?
A MATRIX is a rectangular arrangement of numbers in rows and columns. We describe its size by ‘rows × columns,’ written m × n. Examples:
- A 2 × 3 matrix has 2 rows and 3 columns
- A 3 × 1 matrix is a column vector
- A 1 × n matrix is a row vector
- A SQUARE MATRIX has the same number of rows and columns (e.g. 2 × 2 or 3 × 3)
The (i, j) ENTRY of matrix A, written a_(ij), is the number in row i and column j (1-indexed).
2. Equality of Matrices
Two matrices are EQUAL if and only if they have the same dimensions AND every corresponding entry matches.
3. Addition and Subtraction
To add (or subtract) matrices, ADD (or subtract) corresponding entries. The matrices must have the same dimensions for this to work.
📘 Example — Add 2 × 2 matrices
- [[1, 2], [3, 4]] + [[5, 6], [7, 8]] = [[6, 8], [10, 12]]
- [[2, 0], [−1, 3]] − [[1, 4], [5, 2]] = [[1, −4], [−6, 1]]
4. Scalar Multiplication
To multiply a matrix by a scalar k, multiply EVERY entry by k:
📘 Example — Scalar multiplication
- 3 · [[1, 2], [4, −1]] = [[3, 6], [12, −3]]
- (1/2) · [[10, −4], [6, 8]] = [[5, −2], [3, 4]]
5. Matrix Multiplication
This is the trickiest operation. To multiply A · B:
- A must have the same number of COLUMNS as B has ROWS
- If A is m × n and B is n × p, then AB is m × p
- The (i, j) entry of AB is computed by taking ROW i of A, COLUMN j of B, multiplying corresponding entries, and adding
📘 Example — Multiply 2 × 2 matrices
Let A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]].
- (AB)_(1,1) = (1)(5) + (2)(7) = 5 + 14 = 19
- (AB)_(1,2) = (1)(6) + (2)(8) = 6 + 16 = 22
- (AB)_(2,1) = (3)(5) + (4)(7) = 15 + 28 = 43
- (AB)_(2,2) = (3)(6) + (4)(8) = 24 + 32 = 56
- AB = [[19, 22], [43, 56]]
6. Why Matrix Multiplication Is NOT Commutative
In general, AB ≠ BA. Sometimes one product is even defined while the other is not (if dimensions don't match). When both are defined, the entries can be entirely different.
📘 Example — Non-commutativity
Let A = [[1, 2], [0, 1]] and B = [[1, 0], [3, 1]].
- AB = [[7, 2], [3, 1]]
- BA = [[1, 2], [3, 7]]
- AB ≠ BA — completely different matrices!
⚠️ Common mistake
When solving an equation like AX = B, you cannot just ‘divide’ by A. You also cannot freely swap the order of multiplication. The order matters everywhere matrix multiplication appears.
7. The Identity Matrix
The IDENTITY MATRIX I_n is the n × n matrix with 1s along the diagonal and 0s elsewhere:
- I₂ = [[1, 0], [0, 1]]
- I₃ = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
It plays the role of ‘1’ in matrix arithmetic: A · I = I · A = A whenever the dimensions allow.
8. Properties That Hold
💡 Matrix Algebra — What Works
- Addition is commutative: A + B = B + A
- Addition is associative: (A + B) + C = A + (B + C)
- Scalar distributivity: k(A + B) = kA + kB
- Multiplication is associative: (AB)C = A(BC) when defined
- Distributive over addition: A(B + C) = AB + AC
- Identity rule: A · I = I · A = A
- BUT NOT: AB = BA in general
9. Summary
- A matrix is a rectangular array m × n with entries a_(ij)
- Add and subtract componentwise; multiply by a scalar componentwise
- Matrix multiplication uses row-by-column dot products; AB is m × p when A is m × n and B is n × p
- Multiplication is NOT commutative: AB ≠ BA in general
- The identity matrix I plays the role of 1; AI = IA = A