Matrices and Determinants
Matrix Multiplication and Matrix Algebra
Row into column, why the inner dimensions must agree, and the two familiar laws that fail.
What this page covers
- Decide whether two matrices can be multiplied and in which order
- Compute a matrix product entry by entry
- State which algebraic laws hold and which fail
- Use the identity matrix
Conformability
AB exists only when the number of columns of A equals the number of rows of B. The product then has as many rows as A and as many columns as B.
The source arrives at the rule by experiment. It tries multiplying a 1 × 2 row by a 3 × 1 column and notes does not work — we need the right number of elements, before stating the general condition.
| First | Second | Product exists? | Order |
|---|---|---|---|
| 2 × 3 | 3 × 3 | Yes | 2 × 3 |
| 2 × 2 | 2 × 1 | Yes | 2 × 1 |
| 2 × 3 | 3 × 1 | Yes | 2 × 1 |
| 1 × 2 | 3 × 1 | No | 2 ≠ 3 |
| 2 × 3 | 2 × 3 | No | 3 ≠ 2 |
Write the two orders side by side. If the inner pair matches the product exists, and the outer pair gives its order. (2 × 3)(3 × 3): inner 3 = 3 ✓, outer gives 2 × 3.
How the entries are computed
The entry (AB)ij is obtained by taking row i of A and column j of B, multiplying corresponding entries, and adding.
The typed notes phrase it as multiply each element of the row by the corresponding element of the column, then add them all up to give a single value. It is exactly a dot product of a row with a column.
A single entry — the source's example
A full product — the source's case
Multiply
| 1 | -3 |
| 2 | 1 |
by
| -2 | -1 |
| 4 | 1 |
| Entry | Row × column | Value |
|---|---|---|
| (1,1) | (1)(-2) + (-3)(4) | -2 - 12 = -10 |
| (1,2) | (1)(-1) + (-3)(1) | -1 - 3 = -4 |
| (2,1) | (2)(-2) + (1)(4) | -4 + 4 = 0 |
| (2,2) | (2)(-1) + (1)(1) | -2 + 1 = -1 |
| -10 | -4 |
| 0 | -1 |
The source records this product as [[-10, -4], [8, -1]] on page 12, where the (2,1) entry is given as 8. Recomputing that entry from row 2 of A and column 1 of B gives (2)(-2) + (1)(4) = 0. The value 8 appears elsewhere on the same page in a different product, so the two have most likely been transcribed across.
Why systems can be written Ax = b
Matrix multiplication was defined the way it was precisely so that a linear system becomes a single matrix equation. The source shows the equivalence directly.
The product
| 1 | -3 |
| 2 | 1 |
gives the column with entries x - 3y and 2x + y. Setting that equal to the column (7, 2) reproduces the system x - 3y = 7, 2x + y = 2.
The source's phrasing is worth keeping: solving the system of equations is solving the matrix equation. That reformulation is what makes the inverse method possible.
The identity matrix
The square matrix with 1s on the main diagonal and 0s elsewhere, written I. It satisfies AI = IA = A.
| 1 | 0 |
| 0 | 1 |
The source's demonstration
Multiplying [[2, 3], [1, -2]] by I on either side returns the same matrix. The source computes both orders, noting the result for an identity matrix, AI = IA = A.
For a non-square matrix the two identities differ in size. The source multiplies a 2 × 3 matrix by the 2 × 2 identity on the left and the 3 × 3 identity on the right, and both give the original back.
The identity plays the role that 1 plays for numbers, and it is what defines the inverse: A-1 is the matrix with AA-1 = A-1A = I.
Which laws hold and which fail
| Law | Real numbers | Matrices | Source note |
|---|---|---|---|
| Commutative | Holds | Fails | AB ≠ BA usually |
| Associative | Holds | Holds | A(BC) = (AB)C |
| Distributive over + | Holds | Holds | A(B + C) = AB + AC |
| Identity | 1 | I | AI = IA = A |
| Inverse | All except 0 | Only sometimes | Square matrices with non-zero determinant |
| Zero product | ab = 0 forces a or b zero | Fails | Non-zero matrices can multiply to zero |
The source computes both orders for the same pair. With A = [[0, 1], [1, 1]] and B = [[-1, 2], [1, 2]] it obtains AB = [[1, 2], [0, 4]] and BA = [[2, 1], [2, 3]]. Different matrices. Its conclusion: AB ≠ BA usually.
Worse, one of the two products may not exist at all. A 2 × 3 times a 3 × 4 is defined; the reverse order is not. The source flags this too.
The zero-product failure is a genuine consequence. [[1, 0], [0, 0]] · [[0, 0], [0, 1]] = O with neither factor zero. The proof of the zero-product property for real numbers used the multiplicative inverse, and matrices need not have one — which is exactly where the argument breaks.
Common mistakes
| Mistake | Correct | Check |
|---|---|---|
| Multiplying entry by entry | Row into column | Entry-wise would need equal orders |
| Assuming AB = BA | It generally does not | Compute both and compare |
| Multiplying non-conformable matrices | Inner dimensions must match | Write the orders side by side |
| Getting the product's order wrong | It is the outer dimensions | (2×3)(3×3) = 2×3 |
| Cancelling a matrix from both sides | Only valid if it is invertible | AB = AC does not force B = C |
| Column into row | Row of the first, column of the second | Order matters throughout |
Frequently asked questions
When can two matrices be multiplied?
When the number of columns in the first equals the number of rows in the second. The source states the rule directly: the number of columns equals the number of rows.
What order is the product?
The outer dimensions. An m × n times an n × p gives an m × p matrix.
Is AB = BA?
Generally no. The source's conclusion is blunt: AB ≠ BA usually. Often one of the two products does not even exist.
What is the identity matrix?
The square matrix with 1s down the main diagonal and 0s elsewhere. It satisfies AI = IA = A, playing the role that 1 plays for numbers.
Source. Handwritten teaching notes, Week 11 pages 11-12 and Week 12 pages 1-3, with the typed supplementary notes on matrix multiplication.
This page is an original exposition prepared for the KEVOS® knowledge library. It restates, reorganises and verifies the mathematics of the supplied teaching notes; it is not a reproduction of them. Numerical values taken from the notes are identified as source examples and are not presented as engineering standards.
