Chapter 4 — Front Matter
Purpose and Overview
This chapter introduces matrices as one of the most powerful organizational and computational tools in mathematics. A matrix is a rectangular array of numbers arranged in rows and columns, and at first glance it may look like nothing more than a table of data. But matrices are much more than that. They represent systems of equations, encode linear transformations, organize multidimensional data, describe networks, and provide a compact language for expressing the relationships among many quantities at once.
In Chapters 1 through 3, you worked with vectors as columns of numbers and learned to solve systems of linear equations by writing them as augmented matrices and performing row operations. This chapter steps back from solving systems and asks a deeper question: what can we do with matrices as mathematical objects? What does it mean to add two matrices? To multiply a matrix by a number? To multiply two matrices together? And what do those operations mean, beyond the arithmetic itself?
By the end of this chapter, you will not only be able to perform every standard matrix operation — you will understand why each operation is defined the way it is, how it connects to systems and transformations, and how it prepares you for the concepts of inverses, determinants, and linear transformations that follow in Part II.
Opening Question
A company operates three warehouses. Each warehouse stocks four products. A second company buys the first and merges the two inventories. How can you represent each inventory, combine them efficiently, and later apply a uniform restocking rule to every item in every warehouse at once?
This scenario — multiple quantities, multiple locations, organized relationships — is exactly the kind of problem matrices are built for. By the end of this chapter, you will see how matrix addition handles the merger and scalar multiplication handles the restocking rule. And when transformations like shipping costs, profit margins, or quantity-to-price conversions enter the picture, matrix multiplication will handle those too.
14Sections
11Objectives
18Key Terms
13+Worked Examples
Learning Objectives
- 1Define a matrix, identify its size, and name its entries using standard subscript notation.
- 2Determine when two matrices are equal.
- 3Add and subtract matrices of the same size.
- 4Multiply a matrix by a scalar.
- 5Multiply two matrices when the dimensions are compatible, and explain why matrix multiplication is defined by row-column products.
- 6Explain why matrix multiplication is not commutative and identify when commutativity does and does not hold.
- 7Recognize and use identity matrices and zero matrices.
- 8Compute the transpose of a matrix and use its basic properties.
- 9Write and interpret matrix equations of the form Ax = b.
- 10Connect matrix operations to their meaning in systems, data, and transformations.
- 11Identify and avoid the most common matrix operation mistakes.
Sections 4.1 – 4.5
What a Matrix Is: Structure, Equality, and Basic Operations
Definition · Size · Entries · Equality · Addition · Scalar Multiplication
Section 4.1
What a Matrix Is
A matrix is a rectangular array of numbers arranged in rows and columns, enclosed in brackets. Each number in the array is called an entry of the matrix. Matrices organize numbers into a structure that preserves their positions and relationships. Unlike a list or a set, a matrix keeps track of where each number sits — which row and which column it belongs to. That positional structure is what makes matrices useful.
You have already met matrices in Chapter 3, where you wrote the coefficients of a linear system as an augmented matrix and performed row operations. The augmented matrix organized the system into a compact form, with coefficient columns and a constants column. Matrices also arise naturally outside of systems.
| Context | Matrix Description | Example Size |
| Systems of equations | Rows are equations; columns are variables; entries are coefficients | 3 × 4 for 3 equations, 3 unknowns + constants |
| Spreadsheet data | Rows are students; columns are exam scores; entries are grades | m × n for m students, n exams |
| Digital image | Rows and columns of pixels; entries are brightness values | 480 × 640 for a standard image |
| Rotation in 2D | Encodes a rotation by angle θ using cosine and sine values | 2 × 2 |
Notation
Matrices are named with capital letters: A, B, C, M, etc. Their entries are named with the corresponding lowercase letter and two subscripts. The entry in row i and column j of matrix A is written aij. The subscript ij always names the row first and the column second. This order is consistent and important: a23 means row 2, column 3 — not row 3, column 2.
Example 4.1.1
Reading matrix entries by subscript
- Matrix
Let
A be the matrix with entries as shown:
Row 1: 5, −2 | Row 2: 0, 7 | Row 3: 3, 1
- Entries
a₁₁ = 5 (row 1, column 1)
a₁₂ = −2 (row 1, column 2)
a₂₁ = 0 (row 2, column 1)
a₂₂ = 7 (row 2, column 2)
a₃₁ = 3 (row 3, column 1)
a₃₂ = 1 (row 3, column 2)
This is a 3 × 2 matrix. Row index always comes first in the subscript.
Vectors as Special Matrices
A column vector with three entries is a 3 × 1 matrix. A row vector with three entries is a 1 × 3 matrix. Matrices and vectors are part of the same family — vectors are simply matrices of a particular shape.
Section 4.2
Matrix Size and Entries
The size (or dimensions) of a matrix is described as m × n, where m is the number of rows and n is the number of columns. An m × n matrix has mn total entries.
| Matrix Description | Size | Total Entries |
| 2 rows, 2 columns (square) | 2 × 2 | 4 |
| 2 rows, 3 columns | 2 × 3 | 6 |
| 1 row, 4 columns (row vector) | 1 × 4 | 4 |
| 4 rows, 1 column (column vector) | 4 × 1 | 4 |
| 3 rows, 3 columns (square) | 3 × 3 | 9 |
Square Matrices and the Main Diagonal
A matrix with the same number of rows and columns is called a square matrix. The entries a₁₁, a₂₂, a₃₃, … along the top-left to bottom-right diagonal are called the main diagonal entries. Square matrices are especially important because many powerful operations — determinants, inverses, eigenvalues — are defined specifically for square matrices.
Reading size from context: when you write a system as Ax = b, the size of A tells you immediately how many equations (rows) and how many variables (columns) the system has. A 3 × 4 coefficient matrix means three equations and four unknowns.
Section 4.3
Matrix Equality
Two matrices are equal if and only if they have exactly the same size and every corresponding entry is equal. If two matrices differ in size, they are never equal, even if their entries look similar. If two matrices have the same size but even one entry differs, they are not equal.
Definition — Matrix Equality
A = B if and only if:
1. A and B are the same size (same m, same n), and
2. aij = bij for every row index i and column index j.
Example 4.3.1
Determining matrix equality
- ProblemThree 2×2 matrices are given. A has entries 3, −1 (row 1) and 5, 2 (row 2). B is identical to A. C has entries 3, 5 (row 1) and −1, 2 (row 2). Are they equal?
- ThinkCompare sizes first, then entries position by position.
- Analyze
A and B: All four entries match position by position. A = B. ✓
A and C: Entry (1,2) of A is −1, but entry (1,2) of C is 5. A ≠ C.
A = B because same size and all entries match. A ≠ C because entry (1,2) differs — despite C containing the same numbers, their positions differ.
Example 4.3.2
Using matrix equality to solve for unknowns
- ProblemFind x and y such that the matrix with entries (2x − 1, 4) in row 1 and (3, y + 5) in row 2 equals the matrix with entries (7, 4) in row 1 and (3, 2) in row 2.
- ThinkSet each pair of corresponding entries equal. This gives a system of equations.
- Calculate
Entry (1,1): 2x − 1 = 7 → x = 4
Entry (2,2): y + 5 = 2 → y = −3
Entries (1,2) and (2,1): 4 = 4 ✓ and 3 = 3 ✓ (no new info)
- Check2(4) − 1 = 7 ✓ and −3 + 5 = 2 ✓
Answer: x = 4, y = −3.
Section 4.4
Matrix Addition
When two matrices have the same size, you can add them by adding their corresponding entries. Matrix addition is only defined when the two matrices have exactly the same size.
Definition — Matrix Addition
If A and B are both m × n matrices, then A + B is the m × n matrix whose entry in row i, column j is aij + bij.
Subtraction works the same way: (A − B)ij = aij − bij.
Example 4.4.1
Adding two 2×3 matrices
- ProblemA has rows (3, −1, 5) and (0, 2, −4). B has rows (−2, 4, 1) and (7, −3, 0). Compute A + B.
- ThinkBoth matrices are 2 × 3 — addition is defined. Add corresponding entries.
- Calculate
Row 1: (3 + (−2), −1 + 4, 5 + 1) = (1, 3, 6)
Row 2: (0 + 7, 2 + (−3), −4 + 0) = (7, −1, −4)
- InterpretIf A and B represent warehouse inventories for two companies, A + B is the combined inventory after a merger.
A + B = [[1, 3, 6], [7, −1, −4]]
Properties of Matrix Addition
Commutativity: A + B = B + A Associativity: (A + B) + C = A + (B + C)
Additive identity: A + O = A (O is the zero matrix) Additive inverse: A + (−A) = O
These hold because each entry satisfies them as a real number.
Section 4.5
Scalar Multiplication
A scalar is a single real number, as opposed to a vector or matrix. In linear algebra, the word "scalar" distinguishes ordinary numbers from the structured objects of vectors and matrices. Scalar multiplication means multiplying every entry of a matrix by the same scalar.
Definition — Scalar Multiplication
If A is an m × n matrix and c is a scalar, then cA is the m × n matrix whose entry in row i, column j is c · aij.
Properties: c(A + B) = cA + cB (c + d)A = cA + dA c(dA) = (cd)A 1 · A = A
Example 4.5.1
Computing 3A and a linear combination 2A − 3B
- Problem 1A has rows (2, −1), (0, 5), (−3, 4). Compute 3A.
- Result
3A: rows (6, −3), (0, 15), (−9, 12)
- Problem 2A = [[1, 4], [−2, 0]], B = [[3, −1], [5, 2]]. Compute 2A − 3B.
- Calculate
2A = [[2, 8], [−4, 0]]
3B = [[9, −3], [15, 6]]
2A − 3B = [[2−9, 8−(−3)], [−4−15, 0−6]] = [[−7, 11], [−19, −6]]
- InterpretIf A represents warehouse quantities, 3A represents tripling every inventory count — a uniform scaling. The combination 2A − 3B gives a weighted difference of two data matrices.
3A = [[6, −3], [0, 15], [−9, 12]] · 2A − 3B = [[−7, 11], [−19, −6]]
Sections 4.6 – 4.9
Matrix Multiplication, Identity, and Zero Matrices
Row-Column Products · Non-Commutativity · Identity · Zero Matrix
Section 4.6
Matrix Multiplication as Row-by-Column Products
Matrix multiplication is the most important — and most surprising — operation in this chapter. Unlike addition and scalar multiplication, matrix multiplication is not simply done entry by entry. Instead, it is defined by a row-by-column process that reflects how systems of equations and linear transformations compose.
Compatibility and Size Rule
A is m × k and B is k × n → AB is m × n.
The inner dimensions (k) must match. The outer dimensions (m and n) give the size of the result.
The entry in row i, column j of AB is the dot product of row i of A with column j of B:
(AB)ᵢⱼ = aᵢ₁b₁ⱼ + aᵢ₂b₂ⱼ + ··· + aᵢₖbₖⱼ
Example 4.6.1
Multiplying a 2×3 matrix by a 3×2 matrix
- ProblemA = [[1, 2, 3], [4, 5, 6]], B = [[7, 8], [9, 10], [11, 12]]. Compute AB.
- ThinkA is 2×3, B is 3×2. Inner dimension (3) matches. Result is 2×2. Compute four entries.
- Calculate
Entry (1,1): Row 1 of A · Col 1 of B = 1·7 + 2·9 + 3·11 = 7 + 18 + 33 = 58
Entry (1,2): Row 1 of A · Col 2 of B = 1·8 + 2·10 + 3·12 = 8 + 20 + 36 = 64
Entry (2,1): Row 2 of A · Col 1 of B = 4·7 + 5·9 + 6·11 = 28 + 45 + 66 = 139
Entry (2,2): Row 2 of A · Col 2 of B = 4·8 + 5·10 + 6·12 = 32 + 50 + 72 = 154
AB = [[58, 64], [139, 154]]
Example 4.6.2
Matrix-vector multiplication: A acts on x
- ProblemA = [[2, −1, 3], [0, 4, −2]], x = [1, −2, 5]ᵀ. Compute Ax.
- ThinkA is 2×3, x is 3×1. Inner dimension (3) matches. Result is 2×1.
- Calculate
Entry 1: 2(1) + (−1)(−2) + 3(5) = 2 + 2 + 15 = 19
Entry 2: 0(1) + 4(−2) + (−2)(5) = 0 − 8 − 10 = −18
- InterpretThe matrix A transforms the input vector x into the output vector [19, −18]ᵀ. This is the fundamental action of a matrix: it takes a vector as input and produces a new vector as output.
Ax = [19, −18]ᵀ. The matrix A maps the 3D vector x to a 2D output vector.
Column Interpretation: Ax as a Linear Combination
There is a second way to understand Ax: as a linear combination of the columns of A. If x has entries x₁, x₂, …, xₙ, then Ax = x₁a₁ + x₂a₂ + ··· + xₙaₙ, where aⱼ is the jth column of A. The entries of x serve as the coefficients. This connects matrix multiplication to the ideas of span and column space studied in Chapters 9 and 10.
Example 4.6.3
Matrix multiplication and systems: writing Ax = b
- ProblemWrite the system 3x₁ + 2x₂ = 7 and x₁ − 5x₂ = −4 as a matrix equation.
- Represent
A = [[3, 2], [1, −5]], x = [x₁, x₂]ᵀ, b = [7, −4]ᵀ
Matrix equation: Ax = b
- CheckExpanding row by row: Row 1 gives 3x₁ + 2x₂ = 7 ✓ Row 2 gives x₁ − 5x₂ = −4 ✓
- InterpretThe matrix equation Ax = b is a compact, elegant encoding of the entire system. Solving it means finding the vector x that A maps to b.
The system is fully encoded as Ax = b, with A the 2×2 coefficient matrix, x the variable vector, b the right-hand side vector.
Section 4.7
Why Matrix Multiplication Is Not Commutative
One of the most important — and most surprising — facts about matrix multiplication is that it is generally not commutative. For real numbers, ab = ba always. For matrices, AB = BA is almost never true.
| Reason Commutativity Fails | Explanation |
| Dimension mismatch | If A is 2×3 and B is 3×4, AB is 2×4 but BA requires a 3×4 times 2×3, which is undefined (inner dimensions 4 ≠ 2). |
| Size mismatch | If A is 2×3 and B is 3×2, AB is 2×2 while BA is 3×3. Different sizes cannot be equal. |
| Order matters for square matrices | Even when AB and BA are both defined and the same size, the entries usually differ. |
Example 4.7.1
Commutativity fails for 2×2 matrices
- ProblemA = [[1, 2], [3, 4]], B = [[0, 1], [1, 0]]. Compute AB and BA.
- Calculate AB
AB: (1,1) = 1·0 + 2·1 = 2 (1,2) = 1·1 + 2·0 = 1
(2,1) = 3·0 + 4·1 = 4 (2,2) = 3·1 + 4·0 = 3
AB = [[2, 1], [4, 3]]
- Calculate BA
BA: (1,1) = 0·1 + 1·3 = 3 (1,2) = 0·2 + 1·4 = 4
(2,1) = 1·1 + 0·3 = 1 (2,2) = 1·2 + 0·4 = 2
BA = [[3, 4], [1, 2]]
- InterpretAB ≠ BA. Entry (1,1) is 2 in AB but 3 in BA. Matrix multiplication represents composition of transformations — the order in which transformations are applied matters.
AB = [[2,1],[4,3]], BA = [[3,4],[1,2]]. These are completely different matrices.
A Geometric Reason: Transformations Don't Commute
In AB, the transformation B is applied first, then A is applied to the result. Just as putting on socks and then shoes gives a different result from shoes then socks, applying B first and then A is generally different from A first and then B. The order of composition matters.
Properties that do hold: Associativity (AB)C = A(BC); Left distributivity A(B+C) = AB + AC; Right distributivity (A+B)C = AC + BC; Scalar compatibility c(AB) = (cA)B = A(cB).
Section 4.8
Identity Matrices
The identity matrix of size n, written In, is the n × n square matrix with ones on the main diagonal and zeros everywhere else. The identity matrix plays the role of the number 1 in matrix multiplication: multiplying by it leaves the other matrix unchanged.
| Size | Identity Matrix Structure |
| I₂ (2×2) | Main diagonal: 1, 1 · All other entries: 0 · [[1,0],[0,1]] |
| I₃ (3×3) | Main diagonal: 1, 1, 1 · All other entries: 0 · [[1,0,0],[0,1,0],[0,0,1]] |
| I₄ (4×4) | Main diagonal: 1, 1, 1, 1 · All other entries: 0 |
Identity Matrix Property
For any matrix A of size m × n: I_m · A = A and A · I_n = A
The left identity I_m has size matching the number of rows of A. The right identity I_n has size matching the number of columns of A. Using the wrong-sized identity causes a dimension error.
Example 4.8.1
Verifying I₂A = AI₂ = A
- ProblemLet A = [[3, −1], [5, 2]]. Compute I₂A and AI₂.
- I₂A
(1,1): 1·3 + 0·5 = 3 (1,2): 1·(−1) + 0·2 = −1
(2,1): 0·3 + 1·5 = 5 (2,2): 0·(−1) + 1·2 = 2
I₂A = [[3, −1], [5, 2]] = A ✓
- AI₂
(1,1): 3·1 + (−1)·0 = 3 (1,2): 3·0 + (−1)·1 = −1
(2,1): 5·1 + 2·0 = 5 (2,2): 5·0 + 2·1 = 2
AI₂ = [[3, −1], [5, 2]] = A ✓
- InterpretThe identity matrix is the "do nothing" transformation. It sends every vector to itself: I_n · x = x for all x.
I₂A = AI₂ = A. The identity matrix leaves A unchanged on either side.
Section 4.9
Zero Matrices
The zero matrix O is the matrix with all entries equal to zero. It serves as the additive identity: A + O = O + A = A. The additive inverse of A is −A, and A + (−A) = O.
Critical Warning — The Zero Product Property Fails for Matrices
For real numbers, if ab = 0 then a = 0 or b = 0. This is not true for matrices. Non-zero matrices can multiply to produce the zero matrix.
Example: Let A have all entries equal to 1 (2×2), and B have entries 1, −1 in each row. Then AB = O even though neither A nor B is zero. This is one reason solving matrix equations requires more care than solving scalar equations.
Sections 4.10 – 4.12
Transpose, Matrix Equations, and Applications
Transpose · Symmetric Matrices · Matrix Equations · Data · Transformations
Section 4.10
Transpose of a Matrix
The transpose of a matrix A is written AT and is formed by flipping A across its main diagonal — turning its rows into columns and its columns into rows. If A is m × n, then AT is n × m. The entry in row i, column j of AT is the entry that was in row j, column i of A: (AT)ij = aji.
Example 4.10.1
Computing transposes of matrices and vectors
- Matrix A (2×3)
A = [[1, 2, 3], [4, 5, 6]] → A^T = [[1, 4], [2, 5], [3, 6]] (3×2)
- Matrix B (3×2)
B = [[3, −1], [5, 2], [0, 4]] → B^T = [[3, 5, 0], [−1, 2, 4]] (2×3)
- Column vector v
v = [7, −2, 5]^T (3×1) → v^T = [7, −2, 5] (1×3)
- InterpretThe transpose converts column vectors to row vectors and vice versa. For general matrices, it flips the shape from m×n to n×m. The main diagonal entries are fixed — only the off-diagonal entries change positions.
Properties of the Transpose
(A^T)^T = A — taking the transpose twice returns the original.
(A + B)^T = A^T + B^T
(cA)^T = c A^T
(AB)^T = B^T A^T — note the reversal of order. This is the most important and most easily forgotten property.
Student Warning — Transpose Reverses Multiplication Order
A common error is to write (AB)T = ATBT. The correct formula is (AB)T = BTAT — the order reverses. This is analogous to how inverse and transpose both "reverse" things. Forgetting this reversal is one of the most frequent mistakes in matrix algebra.
Symmetric Matrices
A square matrix A is called symmetric if AT = A. This means aij = aji for all i and j — the matrix is unchanged when reflected across its main diagonal. Symmetric matrices appear frequently in geometry (distance matrices), statistics (covariance matrices), physics (stress tensors), and data science (correlation matrices).
Example 4.10.2
Verifying (AB)^T = B^T A^T
- ProblemA = [[1, 2], [3, 4]], B = [[0, 1], [1, 0]]. Verify (AB)^T = B^T A^T.
- Compute AB
AB = [[2, 1], [4, 3]] → (AB)^T = [[2, 4], [1, 3]]
- Compute B^T A^T
B^T = [[0, 1], [1, 0]], A^T = [[1, 3], [2, 4]]
B^T A^T: (1,1) = 0·1 + 1·2 = 2 (1,2) = 0·3 + 1·4 = 4
(2,1) = 1·1 + 0·2 = 1 (2,2) = 1·3 + 0·4 = 3
B^T A^T = [[2, 4], [1, 3]] ✓
(AB)^T = B^T A^T = [[2, 4], [1, 3]]. The order reversal is confirmed.
Section 4.11
Matrix Equations
The matrix equation Ax = b is the single most important equation in linear algebra. It says: the matrix A acts on the vector x to produce the vector b. Solving the equation means finding all vectors x that A maps to b. This equation is equivalent to the system of linear equations encoded by the augmented matrix [A | b], which you solved using row reduction in Chapter 3.
Example 4.11.1
Writing a three-variable system as a matrix equation
- ProblemWrite as Ax = b: 2x₁ − x₂ + 3x₃ = 7 x₁ + 4x₂ − 2x₃ = −1 5x₁ + 0x₂ + x₃ = 3
- Represent
A = [[2, −1, 3], [1, 4, −2], [5, 0, 1]]
x = [x₁, x₂, x₃]^T
b = [7, −1, 3]^T
- CheckExpanding Ax by rows: Row 1 gives 2x₁ − x₂ + 3x₃ = 7 ✓ Row 2 gives x₁ + 4x₂ − 2x₃ = −1 ✓ Row 3 gives 5x₁ + x₃ = 3 ✓
- InterpretThe matrix equation Ax = b encodes all three equations simultaneously. In Chapter 5, you will learn to solve this equation using the matrix inverse when it exists.
The system is encoded as Ax = b with the 3×3 coefficient matrix A, variable vector x, and right-hand side b as shown above.
Matrix Equations for Multiple Right-Hand Sides
If you need to solve Ax = b₁, Ax = b₂, and Ax = b₃ — same A, three different right-hand sides — you can write this as a single matrix-matrix equation AX = B, where X and B have the three solution and right-hand side vectors as their columns. This is solved one column at a time, and it shows why matrix-matrix multiplication is defined the way it is.
Section 4.12
Matrices as Data and Transformations
Matrix operations are not abstract procedures — they correspond to meaningful actions on structured data, systems, and transformations. A matrix of size m × n defines a function from ℝⁿ to ℝᵐ: it takes any vector x in ℝⁿ and maps it to the vector Ax in ℝᵐ. This function is a linear transformation — it preserves vector addition and scalar multiplication. Chapter 7 will develop this idea fully.
Example 4.12.1
Matrices in a data application: computing store revenue
- ProblemQuantity matrix Q = [[10, 20, 15], [5, 30, 12]] (rows = stores, columns = products). Price vector p = [8, 5, 12]^T (dollars per product). Compute total revenue per store.
- ThinkTotal revenue for each store = quantity row · price column. This is the matrix-vector product Qp.
- Calculate
Store 1: 10·8 + 20·5 + 15·12 = 80 + 100 + 180 = 360
Store 2: 5·8 + 30·5 + 12·12 = 40 + 150 + 144 = 334
Qp = [360, 334]^T
- InterpretStore 1 generated $360 in revenue; Store 2 generated $334. Matrix-vector multiplication efficiently computed these totals by combining quantities with prices across all products at once.
Revenue: Store 1 = $360, Store 2 = $334. Computed via Qp.
Example 4.12.2
A rotation matrix in two dimensions
- SetupThe matrix R = [[cos θ, −sin θ], [sin θ, cos θ]] rotates every vector in ℝ² counterclockwise by angle θ. For θ = 90°, cos 90° = 0 and sin 90° = 1, so R = [[0, −1], [1, 0]].
- Apply to e₁
R·e₁ = [[0, −1], [1, 0]] · [1, 0]^T = [0, 1]^T = e₂
- Apply to e₂
R·e₂ = [[0, −1], [1, 0]] · [0, 1]^T = [−1, 0]^T = −e₁
- InterpretThe standard basis vector e₁ (pointing right) is rotated 90° counterclockwise to become e₂ (pointing up). The vector e₂ is rotated 90° to become −e₁ (pointing left). The matrix faithfully encodes the geometry of a 90° rotation.
The 90° rotation matrix sends e₁ → e₂ and e₂ → −e₁. The matrix is an action, not just a table of numbers.
Section 4.13
Common Matrix Operation Mistakes
Mistake 1 — Adding matrices of different sizes
Adding a 2×3 matrix to a 3×2 matrix
Matrix addition requires both matrices to have exactly the same size. A 2×3 and a 3×2 matrix cannot be added. Always check dimensions before adding.
Correct: Only add A + B when A and B have the same number of rows and the same number of columns.
Mistake 2 — Reversing row and column in subscript notation
Locating a₂₃ in the third row, second column
The subscript ij always names the row first and the column second. a₂₃ is row 2, column 3 — not column 2, row 3.
Correct: a₂₃ = entry in row 2, column 3. Row always comes first.
Mistake 3 — Multiplying matrices with incompatible dimensions
Multiplying a 3×2 matrix by another 3×2 matrix
The product AB requires the number of columns of A to equal the number of rows of B. Two 3×2 matrices cannot be multiplied because the inner dimensions (2 and 3) do not match.
Correct: A (3×2) can multiply B (2×k) on the right to give a 3×k result.
Mistake 4 — Entry-by-entry multiplication instead of row-by-column
(AB)ᵢⱼ = aᵢⱼ · bᵢⱼ (multiplying corresponding entries)
This is not matrix multiplication — it is the Hadamard (element-wise) product, a completely different operation. Matrix multiplication uses row-column dot products. Always apply the row-column definition.
Correct: (AB)ᵢⱼ = row i of A dotted with column j of B.
Mistake 5 — Assuming AB = BA
Treating matrix multiplication as commutative
Matrix multiplication is not commutative. Even for square matrices where both AB and BA are defined and the same size, they are usually different matrices.
Correct: Never assume AB = BA. Always specify the order of multiplication.
Mistake 6 — Canceling matrices like numbers
If AC = BC, conclude A = B
For real numbers, ac = bc with c ≠ 0 implies a = b. For matrices, AC = BC does not imply A = B, even when C ≠ O. Matrix cancellation requires matrix inverses, covered in Chapter 5.
Correct: AC = BC only implies A = B when C is invertible — not in general.
Mistake 7 — Confusing the transpose with the inverse
Writing A^T when A⁻¹ is meant, or vice versa
A^T means "flip across the diagonal." A⁻¹ means "the matrix that undoes A." These are different operations. For most matrices, A^T ≠ A⁻¹.
Correct: Distinguish transpose (structural flip) from inverse (undoing operation) at all times.
Mistake 8 — Applying the zero product property
If AB = O, conclude A = O or B = O
Unlike real numbers, non-zero matrices can multiply to give the zero matrix. The zero product property does not hold for matrices.
Correct: AB = O is possible even when both A and B are non-zero. Detecting this requires knowledge of inverses and determinants.
Mistake 9 — Writing (AB)^T = A^T B^T instead of B^T A^T
(AB)^T = A^T B^T
The transpose of a product reverses the order. This mirrors how multiplication composes transformations — reversing order is necessary.
Correct: (AB)^T = B^T A^T. Order always reverses when transposing a product.
Mistake 10 — Using the wrong-sized identity matrix
Multiplying an m×n matrix on the left by I_n instead of I_m
I_m A = A uses the m×m identity (matching the rows of A). A I_n = A uses the n×n identity (matching the columns of A). Using the wrong size causes a dimension error.
Correct: Left-multiply by I_m; right-multiply by I_n, where A is m×n.
Section 4.14
Preparing for Inverses and Determinants
This chapter has given you the full operational language of matrices. You can now add matrices, scale them, multiply them, transpose them, and write systems as matrix equations. The natural next question is: can you undo matrix multiplication? If Ax = b, is there a way to find x by "dividing by A"?
For real numbers, dividing by a (when a ≠ 0) is the same as multiplying by a−1. For matrices, the analogous operation is multiplying by the matrix inverse A−1. But not every matrix has an inverse, and determining whether one exists — and computing it when it does — requires new ideas.
Chapter 5 introduces matrix inverses and explains how they connect to solving systems. Chapter 6 introduces the determinant — a single number associated with a square matrix that reveals key structural information, including whether the matrix is invertible. Together, Chapters 5 and 6 will complete your foundational toolkit before Chapter 7 develops the full theory of linear transformations.
MGU Library Connection
- Matrix Operations Reference — Appendix G of this textbook
- Linear Transformation Reference — Appendix I of this textbook
- Algebra and Function Readiness Review — Appendix A of this textbook
- Calculus Readiness Bridge Guide — Appendix R of this textbook
- MGU Data Science Foundations and Scientific Computing series — matrix chapters
- MGU Dictionary entries: matrix, matrix multiplication, transpose, identity matrix, linear transformation
Chapter 4 — Back Matter
Chapter Summary
- Sec 4.1A matrix is a rectangular array of numbers organized into rows and columns. Entry aᵢⱼ is in row i, column j. Vectors are special matrices (m×1 or 1×n).
- Sec 4.2The size of a matrix is m × n (m rows, n columns, mn entries). Square matrices have equal rows and columns. Main diagonal entries are a₁₁, a₂₂, a₃₃, …
- Sec 4.3A = B iff they have the same size and all corresponding entries are equal. Matrix equality can be used to solve for unknown entries by setting up equations.
- Sec 4.4Matrix addition requires identical sizes; add corresponding entries. Properties: commutativity, associativity, additive identity (zero matrix), additive inverse (−A).
- Sec 4.5Scalar multiplication multiplies every entry by the same scalar. Linear combinations 2A − 3B are computed entry by entry after scaling.
- Sec 4.6Matrix multiplication AB requires A's columns = B's rows. Entry (i,j) of AB = dot product of row i of A with column j of B. Ax can also be viewed as a linear combination of the columns of A.
- Sec 4.7Matrix multiplication is not commutative — AB ≠ BA in general. It is associative and distributive. Order of multiplication reflects order of transformation composition.
- Sec 4.8The identity matrix Iₙ has 1s on the main diagonal and 0s elsewhere. I_m A = A and A I_n = A. The identity represents the "do nothing" transformation.
- Sec 4.9The zero matrix O has all entries = 0. It is the additive identity. Unlike real numbers, AB = O does not imply A = O or B = O.
- Sec 4.10The transpose A^T flips rows to columns: (A^T)ᵢⱼ = aⱼᵢ. Key property: (AB)^T = B^T A^T (order reverses). Symmetric matrices satisfy A^T = A.
- Sec 4.11The matrix equation Ax = b encodes a system of linear equations compactly. Solving it means finding all x that A maps to b.
- Sec 4.12Matrices organize data (Ax computes revenue, scores, or counts) and encode transformations (rotation, reflection, scaling). Every matrix defines a linear transformation.
- Sec 4.13Ten common errors: size mismatch in addition; wrong subscript order; incompatible dimensions in multiplication; entry-by-entry errors; assuming commutativity; false cancellation; transpose vs. inverse confusion; zero product fallacy; wrong transpose-product order; wrong identity size.
- Sec 4.14The matrix inverse A⁻¹ "undoes" A; not every matrix has one. Chapter 5 develops inverses; Chapter 6 develops determinants. These complete the toolkit for Chapter 7 linear transformations.
Key Terms Review
matrix
A rectangular array of numbers arranged in rows and columns, enclosed in brackets.
entry (aᵢⱼ)
The number in row i, column j of matrix A. Row index always comes first.
size (m × n)
An m × n matrix has m rows and n columns and mn total entries.
square matrix
A matrix with the same number of rows and columns.
main diagonal
The entries a₁₁, a₂₂, a₃₃, … along the top-left to bottom-right diagonal of a square matrix.
row vector
A matrix with exactly one row; size 1 × n.
column vector
A matrix with exactly one column; size m × 1.
matrix equality
A = B iff they have the same size and every corresponding entry is equal.
matrix addition
Entry-by-entry addition of two matrices with identical sizes.
scalar multiplication
Multiplying every entry of a matrix by the same real number (scalar).
matrix multiplication
Defined by row-column dot products: (AB)ᵢⱼ = Σ aᵢₗ bₗⱼ. Not commutative.
compatible dimensions
A (m×k) and B (k×n) are compatible for multiplication AB, giving an m×n result.
identity matrix (Iₙ)
The n×n matrix with 1s on the main diagonal and 0s elsewhere. I_m A = A and A I_n = A.
zero matrix (O)
A matrix with all entries equal to zero. The additive identity for matrix addition.
transpose (A^T)
Matrix formed by turning rows of A into columns: (A^T)ᵢⱼ = aⱼᵢ. Size changes from m×n to n×m.
symmetric matrix
A square matrix with A^T = A, meaning aᵢⱼ = aⱼᵢ for all i, j.
matrix equation
The equation Ax = b: a compact encoding of a system of linear equations.
coefficient matrix
The matrix A in the equation Ax = b, containing the coefficients of the system.
Concept Review Questions
- What information does the size of a matrix convey? What is the difference between a 2×3 matrix and a 3×2 matrix?
- What are the two conditions for two matrices to be equal?
- Why is matrix addition only defined for matrices of the same size? What would it mean to add matrices of different sizes?
- Matrix multiplication is defined by row-column products rather than entry-by-entry products. What is the motivation for this definition? How does it connect to systems of equations?
- State the size condition required for the product AB to be defined. What is the size of the resulting matrix when A is m×k and B is k×n?
- Give three distinct reasons why matrix multiplication is generally not commutative.
- What is the role of the identity matrix in matrix multiplication? How does it relate to the number 1 in ordinary arithmetic?
- What makes a matrix symmetric? Give an example and explain where symmetric matrices arise naturally in applications.
- How does the formula (AB)^T = B^T A^T differ from the analogous rule for scalars? Why does the order reverse?
- Explain the column interpretation of the matrix-vector product Ax. How does this view connect to span and linear combinations?
Skill Practice
For each matrix, state the size and identify the indicated entries.
- Let A have rows (4, −2, 0), (1, 7, −5), (3, 0, 8). State the size. Find a₁₂, a₂₃, a₃₁, a₃₃.
- State the sizes of: (a) [[1,0,3],[2,−1,5]] (b) the column vector [7, −2, 0, 4]^T (c) the row vector [1, 2, 3, 4] (d) [[5,0],[0,5]].
- Find values of a, b, c, d such that [[a+2, b−1],[3c, 2d−5]] = [[6, 4],[−9, 1]].
- Determine whether the following pairs are equal: (a) [[1,2],[3,4]] and [[1,3],[2,4]] (b) the 2×3 zero matrix and the 3×2 zero matrix.
- A=[[3,−1],[2,5]], B=[[−2,4],[0,−3]]. Find A+B, A−B, 3A.
- A=[[1,4],[−2,0]], B=[[3,−1],[5,2]]. Compute 2A − 3B.
- If A+B = [[5,0],[1,−2]] and A = [[3,2],[0,1]], find B.
- For what value of k is k·[[2,−1],[4,3]] = [[6,−3],[12,9]]?
For each pair, determine whether AB is defined. If so, give the size of AB and compute it.
- A is 3×4, B is 4×2.
- A is 2×5, B is 3×2.
- A is 4×1, B is 1×4.
- A=[[2,1],[3,−1]], B=[[1,4],[0,2]]. Compute AB and BA.
- A=[[1,0,−1],[2,3,1]], B=[2,−1,4]^T. Compute AB.
- Compute A² = AA for A = [[2,1],[0,3]].
- A=[[1,−2,0],[3,5,−1]]. Find A^T.
- B=[[4,0],[0,−3],[1,2]]. Find B^T.
- v=[3,1,−2]^T. Find v^T and the size of v^T.
- Is A=[[2,−1,4],[−1,5,0],[4,0,3]] symmetric?
- Verify (AB)^T = B^T A^T for A=[[1,2],[3,4]], B=[[0,1],[1,0]].
- Write as Ax = b: x₁ − 2x₂ = 5 and 3x₁ + x₂ = 7.
- Write as Ax = b: 2x + y − z = 4, x − 3y + 2z = −1, 4x + y + z = 6.
- A=[[1,2],[3,5]], x=[3,−1]^T. Compute b = Ax. Interpret: what system does this solve?
- Write Ax as a linear combination of the columns of A for A=[[1,3],[−2,5]], x=[4,−1]^T.
Application Problems
- Inventory Management. A sporting goods chain has two stores. The inventory matrix is A = [[40,25,60],[30,18,45]] (rows = stores, columns = running shoes, basketballs, yoga mats). (a) A shipment B = [[10,5,15],[8,12,20]] arrives. What is the new inventory matrix? (b) Prices are $85, $30, and $20. Compute total revenue per store using a matrix-vector product.
- Computer Graphics. A triangle has vertices p₁=[1,0]^T, p₂=[2,1]^T, p₃=[0,2]^T. The matrix M=[[2,0],[0,2]] scales all points by a factor of 2. (a) Compute M·p₁, M·p₂, M·p₃. (b) Describe the effect on the triangle. (c) What matrix would scale only the x-direction by 3?
- Weighted Grades. A student's scores on four assignments are s=[88, 74, 92, 80] (row vector). Weights w=[0.20, 0.30, 0.25, 0.25]^T. (a) Compute the weighted grade s·w. (b) For three students with score matrix S=[[88,74,92,80],[95,60,87,91],[72,85,78,66]], compute S·w to find each student's weighted grade.
- Rotations. The matrix R₉₀=[[0,−1],[1,0]] rotates vectors 90° counterclockwise. (a) Compute R₉₀·[3,0]^T and R₉₀·[0,2]^T. Describe the results geometrically. (b) Compute R₉₀·R₉₀. What transformation does this represent? (c) Compute R₉₀⁴. Explain the result.
- Reflection. The matrix F=[[1,0],[0,−1]] reflects vectors across the x-axis. (a) Apply F to [2,3]^T and [−1,4]^T. Describe the results. (b) Compute F² and interpret the result geometrically.
Geometric Interpretation Problems
- Describe in words the geometric action of each matrix on vectors in ℝ²: (a) [[3,0],[0,3]] (b) [[1,0],[0,0]] (c) [[−1,0],[0,1]].
- The identity matrix I₂ sends every vector to itself. Compute I₂·[5,−3]^T and verify.
- Why does a matrix of the form [[a,0],[0,d]] always send the standard basis vectors e₁ and e₂ along the same directions, just scaled? Explain using the column interpretation of Ax.
- The matrix [[0,1],[1,0]] swaps the two components of every vector. Verify this on [3,7]^T. What geometric transformation does this represent?
Error Analysis
Each problem contains an error. Identify and correct it.
Problem 1
[[1,2],[3,4]] + [[5,6,7],[8,9,10]] = [[6,8],[11,13]]
What is the error? Why is this addition undefined? What would a valid addition require?
Problem 2
[[2,1],[0,3]] · [[1,4],[2,−1]] = [[2,4],[0,−3]] (entry-by-entry)
What is the error? Perform the correct matrix multiplication and state the right answer.
Problem 3
Since AB = AC and A ≠ O, conclude B = C.
Explain why this reasoning is incorrect. Give a specific counterexample using 2×2 matrices.
Problem 4
(AB)^T = A^T B^T
State the correct formula. Verify it for A=[[1,0],[2,1]] and B=[[3,1],[1,2]].
Problem 5
[[1,1],[1,1]] · [[1,−1],[−1,1]] = [[0,0],[0,0]], so one matrix must be zero.
Identify the error and name the property that fails for matrices. Give the correct explanation.
Challenge and Extension
- Idempotent Matrices. A matrix A satisfying A² = A is called idempotent. Verify that P=[[1,0],[0,0]] is idempotent. Describe geometrically what transformation P performs on a vector in ℝ².
- Testing AB = BA. Let A=[[2,1],[5,3]] and B=[[3,−1],[−5,2]]. Compute AB and BA. Are they equal? Interpret your result.
- Proof. Prove that for any two matrices A and B of the same size, (A+B)^T = A^T + B^T. Use the definitions of transpose and matrix addition.
- Powers of Rotation. Let Rθ be the rotation matrix for angle θ. Show that Rθ · Rφ = Rθ₊φ by computing the product using the angle addition identities for sine and cosine. What does this say about the composition of two rotations?
Chapter 4 Checkpoint
Chapter 4 Checkpoint
Complete without referring to the sections — assesses all key skills and concepts from Chapter 4
Part A — Definitions and Concepts
- State the definition of matrix equality. What two conditions must be satisfied?
- State the size condition for AB to be defined. If A is 3×5 and B is 5×2, what is the size of AB?
- Give an example of two 2×2 matrices A and B for which AB ≠ BA.
- What is the transpose of [[1, −3], [5, 2]]? State the property (AB)^T = ?
- Why does the zero product property fail for matrices? Give a brief counterexample.
Part B — Computations
- A = [[3, −1], [2, 5]], B = [[−2, 4], [0, −3]]. Compute A + B, A − B, and 3A.
- Compute AB for A = [[1, 0, 2], [−1, 3, 1]] and B = [1, −2, 4]^T.
- Find A^T for A = [[2, −1, 4], [0, 3, −2]].
- Write the system as Ax = b and identify A, x, and b: 3x₁ − x₂ + 2x₃ = 5 and x₁ + 4x₃ = −2 and 2x₁ − 3x₂ + x₃ = 0.
Part C — Interpretation
- The matrix M = [[0, −1], [1, 0]] represents a rotation. What geometric transformation does M represent? Compute M² and explain what transformation it represents.
- A student stores the prices of five products in a row vector p^T and the quantities sold in a column vector q. What does the product p^T · q compute? What are the dimensions of the result?
Part D — Error Identification
- A student computes [[2,1],[0,3]] · [[1,4],[2,−1]] by multiplying corresponding entries to get [[2,4],[0,−3]]. What is the error? What is the correct result?
- A student writes (AB)^T = A^T B^T. What is the correct formula? Explain why the order must reverse.
Looking Ahead
Chapter 5: Matrix Inverses and Linear Systems
Chapter 4 gave you the complete language of matrix operations: addition, scalar multiplication, multiplication, identity matrices, zero matrices, and transposes. You can now write any linear system as the matrix equation Ax = b, and you understand matrix multiplication as both structured computation and transformation.
The central question of Chapter 5 is: when can you solve Ax = b by "dividing by the matrix A"? For real numbers, dividing by a means multiplying by a⁻¹. For matrices, the analog is multiplying by the matrix inverse A⁻¹ — a matrix that undoes the action of A. Not every matrix has an inverse. Discovering when an inverse exists, how to compute it, and how it connects to unique solutions of linear systems is the work of Chapter 5. Chapter 6 then introduces the determinant — a single number that encodes whether a matrix is invertible and how much it scales space. Together, inverses and determinants complete the foundational toolkit before Chapter 7 develops the full theory of linear transformations.