9.5 Matrices and Matrix Operations

Introduces the matrix as an object with its own arithmetic. Covers dimensions and notation, addition and scalar multiplication entry by entry, and the row-times-column rule for products — including why the dimension condition exists and why matrix multiplication is not commutative.

Subject: Precalculus · 65 slides · symbolic lesson

Open the interactive version of this deck

What this lesson covers

The lesson, slide by slide

1. Lesson 9.5 Matrices and Matrix Operations

Title

Precalculus · Chapter 9 — Systems of Equations and Inequalities

§9.5 Matrices and Matrix Operations, pp. 1116-1129

2. By the end of this lesson you can

Objectives

Five things, each one you can check yourself on paper.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1116-1129 — the pages these objectives are drawn from

3. Before we start: what is a system of equations, stripped down?

Warm-up

The letters carry no information once the positions are fixed.

Discussion prompt

In the equations 2x plus 3y equals 8 and x minus y equals 1, what is actually needed to solve them?

Hint: Which symbols could be dropped?

Answer:

The coefficients and constants — 2, 3, 8 and 1, negative 1, 1. The letters x and y are placeholders whose positions already say which variable is which.

So the whole system is captured by a rectangular array of numbers, with columns for each variable and a column for the constants.

That array is a matrix. Once systems are written this way, solving them becomes a set of operations on rows — which is what §9.6 does.

4. A rectangular array with its own arithmetic

Concept

A matrix is a grid of numbers, and the operations defined on matrices are chosen so that they represent operations on the systems and transformations the matrices stand for.

matrix — a rectangular array of numbers arranged in rows and columns, with dimensions given as rows by columns

\[ A=\begin{bmatrix}2&3\\1&-1\end{bmatrix} \quad(2\times 2) \]

Dimensions are always quoted rows first, then columns. That order is a convention but a rigid one, and getting it backwards makes every dimension check give the wrong answer.

Figure (svg): Three cards giving the rules for adding matrices, scaling them, and multiplying them

The first two are entry-by-entry and hold no surprises. The third is a genuinely different operation and is where all the care is needed.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1116-1119

5. Dimensions and entries

Section

Section 1

6. Rows first, then columns

Concept

A matrix's size is given as its number of rows by its number of columns, and an individual entry is named by its row and column position in that order.

The rows-first convention runs through everything: the dimension rule for products, the notation for entries, and the row operations of the next section. Reversing it silently makes every subsequent check wrong.

Figure (svg): Three cards giving the rules for adding matrices, scaling them, and multiplying them

The first two are entry-by-entry and hold no surprises. The third is a genuinely different operation and is where all the care is needed.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1116-1120

7. The three operations

Picture it

Two are routine and the third is not.

Figure (svg): Three cards giving the rules for adding matrices, scaling them, and multiplying them

The first two are entry-by-entry and hold no surprises. The third is a genuinely different operation and is where all the care is needed.

The caption divides the section. Addition and scaling behave like ordinary arithmetic; multiplication is a new operation with new rules.

8. Worked example: state dimensions and locate an entry

Worked example

Rows first.

\[ \text{For } A=\begin{bmatrix}2&1&3\\0&-4&5\end{bmatrix}, \text{ give its size and the entry in row 2, column 3.} \]

Count the rows

Why: Two horizontal lines of numbers.

\[ 2 \]

Count the columns

Why: Three vertical ones.

\[ 3 \]

State the dimensions

Why: Rows by columns.

\[ 2\text{ by } 3 \]

Locate the entry

Why: Second row, third column.

\[ 5 \]

Figure (svg): The solution to Worked example state dimensions and locate an entry shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ 2\times 3, \; a_{23}=5 \]

Verify: count the entries

Why: A 2 by 3 matrix has six entries, and the array shown has six — consistent. Multiplying the dimensions always gives the entry count, which is a quick check that the dimensions were read correctly.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1117-1118

9. Predict the entry count

Prediction

A matrix is 4 by 5.

Predict first

How many entries does it have?

  • Twenty
  • Nine
  • Five
  • Four

Correct: Twenty.

Why: The entry count is the product of the dimensions, since each of four rows contains five entries. Checking that count against the visible array confirms the dimensions were read correctly.

10. Worked example: when are two matrices equal?

Worked example

Every entry and both dimensions.

\[ \text{Can a } 2\times 3 \text{ matrix equal a } 3\times 2 \text{ one?} \]

Compare the row counts

Why: Two versus three.

Conclude on shape

Why: Different dimensions.

Note the entry count

Why: Both have six entries.

State the rule

Why: Shape must match too.

Figure (svg): The solution to Worked example when are two matrices equal shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \text{different shapes are never equal} \]

Verify: consider why the entry count is not enough

Why: Both matrices hold six numbers, but the arrangement carries meaning — in a system, rows are equations and columns are variables. Two arrangements of the same numbers describe different things, so shape is part of identity.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1118-1120

11. Trap: quoting dimensions columns first

Trap

The trap

\[ \text{three columns and two rows, so it is }3\times 2 \]

State the larger or the more visible count first

Why: The convention is not applied.

Every subsequent dimension check for a product is then wrong.

The fix

Rows first, always. Two rows and three columns is a two by three matrix.

The convention is rigid because the product rule depends on it — the first matrix's columns must match the second's rows.

Say 'rows by columns' aloud when reading a size. It is a habit that costs nothing and prevents a whole class of errors.

12. State a matrix's dimensions

Faded example

Three rows and two columns.

Fill in the blanks

\text3=2\times___

Why: Rows come first and columns second, always. Reversing the order gives a different matrix shape and makes every product dimension check fail.

13. Are these matrices equal?

Sorting

Both dimensions and every entry must match.

Sort into buckets

Sort each comparison.

Equal
same shape, same entries
Not equal
same entries, different shape; same shape, one entry differs; 2 by 3 versus 3 by 2
eq
Every dimension and every entry agrees, which is exactly what matrix equality requires.
no
In each case something differs — the shape, one entry, or both. Any single mismatch is enough to make two matrices unequal.

14. What is the first move?

Step zero

You are asked to perform a matrix operation.

Discussion prompt

What do you check before computing anything?

Hint: Not every operation is defined.

Answer:

The dimensions, and whether the operation is defined for them. Addition needs identical shapes and multiplication needs matching inner dimensions.

Unlike ordinary arithmetic, a matrix operation can simply fail to exist — and computing anyway produces nonsense rather than an error.

So the check is the first step, not a formality. Writing the two sizes down side by side takes a second and settles both whether the operation exists and what shape its result will be.

15. Addition and scalar multiplication

Section

Section 2

16. Entry by entry, with identical shapes

Concept

Two matrices of the same size are added by adding corresponding entries. Multiplying by a number scales every entry, and is always defined.

These operations hold no surprises: addition is commutative and associative, scaling distributes over addition, and everything works as expected. It is worth noticing that explicitly, because multiplication then breaks the pattern so sharply.

Figure (svg): Three cards giving the rules for adding matrices, scaling them, and multiplying them

The first two are entry-by-entry and hold no surprises. The third is a genuinely different operation and is where all the care is needed.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1120-1123

17. The three operations again

Picture it

The first two cards are this idea.

Figure (svg): Three cards giving the rules for adding matrices, scaling them, and multiplying them

The first two are entry-by-entry and hold no surprises. The third is a genuinely different operation and is where all the care is needed.

Both are position-by-position, which is why both require identical shapes and why neither holds any surprise.

18. Worked example: add two matrices

Worked example

Corresponding entries.

\[ \text{Add } \begin{bmatrix}2&1\\0&3\end{bmatrix} \text{ and } \begin{bmatrix}4&-1\\5&2\end{bmatrix}. \]

Check the dimensions

Why: Both two by two.

Add the top row

Why: Position by position.

\[ 6\text{ and } 0 \]

Add the bottom row

Why: Position by position.

\[ 5\text{ and } 5 \]

Assemble

Why: Same shape as the inputs.

\[ 2\text{ by } 2 \]

Figure (svg): The solution to Worked example add two matrices shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \begin{bmatrix}6&0\\5&5\end{bmatrix} \]

Verify: check the shape is preserved

Why: The sum has the same dimensions as both inputs, which addition always guarantees. Any operation that changed the shape would signal that something other than addition had been performed.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1121-1122

19. Predict whether the sum exists

Prediction

A 3 by 2 matrix and a 2 by 3 matrix.

Predict first

Can they be added?

  • No, the dimensions differ
  • Yes, both have six entries
  • Yes, after transposing one
  • Only if the entries match

Correct: No, the dimensions differ.

Why: Addition pairs entries by position, so the shapes must be identical. Equal entry counts are irrelevant, since there is no entry in the third row of a two-row matrix to pair with.

20. Worked example: combine a scalar multiple

Worked example

Scale first, then add.

\[ \text{Compute } 3A-2B \text{ for } A=\begin{bmatrix}1&2\\0&1\end{bmatrix}, \; B=\begin{bmatrix}0&1\\2&1\end{bmatrix}. \]

Scale the first

Why: Every entry tripled.

\[ 3, 6, 0, 3 \]

Scale the second

Why: Every entry doubled.

\[ 0, 2, 4, 2 \]

Subtract entry by entry

Why: Position by position.

\[ 3, 4, -4, 1 \]

Assemble

Why: Same shape throughout.

\[ 2\text{ by } 2 \]

Figure (svg): Three cards giving the rules for adding matrices, scaling them, and multiplying them

The first two are entry-by-entry and hold no surprises. The third is a genuinely different operation and is where all the care is needed.

\[ \begin{bmatrix}3&4\\-4&1\end{bmatrix} \]

Verify: check one entry directly

Why: The bottom-left entry is three times zero minus two times two, which is negative four — matching. Every entry can be checked independently, since the operation is entirely positional.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1122-1123

21. Find the error: adding matrices of different sizes

Error analysis

A student adds a 2 by 3 matrix to a 3 by 2 one.

Annotate

On: \( \begin{bmatrix}1&2&3\\4&5&6\end{bmatrix}+\begin{bmatrix}1&2\\3&4\\5&6\end{bmatrix} \)

  • Both matrices have six entries, which makes the attempt look plausible.
  • But addition pairs entries by position, not by count.
  • There is no entry in row 3 of the first matrix to pair with.
  • So the sum is simply undefined.
  • Addition requires identical dimensions, not merely equal entry counts.

An undefined operation produces no error message when done by hand — it produces a plausible-looking array. Checking the dimensions first is what prevents an answer that means nothing.

22. Add corresponding entries

Faded example

Two entries in the same position.

Fill in the blanks

2+4=6, \quad 1+(-1)=0

Why: Each entry of the sum comes from the two entries in that position, added as ordinary numbers. The operation is entirely positional, which is why it holds no surprises.

23. Is this operation defined?

Sorting

Addition and scaling have different requirements.

Sort into buckets

Sort each operation.

Defined
adding two 2 by 3 matrices; multiplying a 2 by 3 by the number 5
Undefined
adding a 2 by 3 and a 3 by 2; adding a 2 by 2 and a 2 by 3
yes
The first has identical shapes, which is what addition requires, and scalar multiplication is defined for any matrix at all.
no
Both attempt to add matrices whose shapes differ, so entries cannot be paired by position and the sum does not exist.

24. Explain why shapes must match

Explain it to yourself

Addition requires identical dimensions.

Discussion prompt

Explain why that requirement exists.

Hint: How is each entry of the sum produced?

Answer:

Each entry of the sum comes from the two entries in the same position. That pairing needs a partner for every entry.

With different shapes some positions have no partner — a three-row matrix has entries in row 3 that a two-row matrix simply lacks.

So the operation is not merely awkward but undefined. A good explanation notes the contrast with scalar multiplication, which needs no partner and is therefore defined for every matrix regardless of shape.

25. The dimension rule for products

Section

Section 3

26. Inner dimensions match, outer ones give the size

Concept

A product exists only when the first matrix's column count equals the second's row count. When it does, the product has the first's row count and the second's column count.

The last point is worth dwelling on. A 2 by 3 times a 3 by 4 is defined and gives a 2 by 4, but the reverse order pairs 4 with 2 and does not exist at all. Order matters before any arithmetic happens.

Figure (svg): A diagram showing the dimension rule for matrix multiplication: the inner dimensions must match and the outer ones give the product's size

Two matrices can be multiplied only when the first's column count equals the second's row count. That single condition decides whether the product exists, and it is why order matters.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1123-1126

27. The dimension rule

Picture it

Inner match, outer give the size.

Figure (svg): A diagram showing the dimension rule for matrix multiplication: the inner dimensions must match and the outer ones give the product's size

Two matrices can be multiplied only when the first's column count equals the second's row count. That single condition decides whether the product exists, and it is why order matters.

Writing the two sizes side by side makes the check visual rather than a matter of recall, and it produces the product's shape at the same time.

28. Worked example: check a product

Worked example

Write the sizes side by side.

\[ \text{Does } AB \text{ exist for } A \text{ of size } 2\times 3 \text{ and } B \text{ of size } 3\times 4? \]

Write them in order

Why: First then second.

\[ 2 x 3\text{ and } 3 x 4 \]

Check the inner pair

Why: Three and three.

Conclude it exists

Why: The condition holds.

Read the outer pair

Why: Two and four.

\[ 2\text{ by } 4 \]

Figure (svg): A diagram showing the dimension rule for matrix multiplication: the inner dimensions must match and the outer ones give the product's size

Two matrices can be multiplied only when the first's column count equals the second's row count. That single condition decides whether the product exists, and it is why order matters.

\[ AB \text{ is } 2\times 4 \]

Verify: check the reverse order

Why: For BA the sizes read 3 by 4 and 2 by 3, whose inner numbers are 4 and 2 — they do not match, so BA does not exist. One order works and the other does not, which is the starkest form of non-commutativity.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1124-1125

29. Predict the product's size

Prediction

A 4 by 2 matrix times a 2 by 5 matrix.

Predict first

What is the product's size?

  • Four by five
  • Two by two
  • Five by four
  • It does not exist

Correct: Four by five.

Why: The inner dimensions are both two, so the product exists, and the outer dimensions four and five give its size. Writing the two sizes side by side makes both facts readable at once.

30. Worked example: both orders defined but different

Worked example

Square matrices always allow both.

\[ \text{For two } 2\times 2 \text{ matrices, are } AB \text{ and } BA \text{ the same?} \]

Check both products exist

Why: Inner dimensions match either way.

Check the shapes

Why: Both two by two.

Compute a small example

Why: Entries generally differ.

Conclude

Why: Same shape, different entries.

Figure (svg): The solution to Worked example both orders defined but different shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ AB\ne BA \text{ in general} \]

Verify: consider why the shapes agree but the entries do not

Why: Each entry of a product comes from one row of the first matrix and one column of the second. Swapping the order swaps which matrix supplies rows and which supplies columns, so the sums being formed are entirely different even though the grid has the same shape.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1125-1126

31. Trap: assuming a product exists because both matrices do

Trap

The trap

\[ A\text{ is }3\times 4, \; B\text{ is }2\times 3, \text{ so compute }AB \]

Multiply because both matrices are available

Why: The dimension check is skipped.

The inner dimensions are 4 and 2, so the product does not exist at all.

The fix

Check the inner dimensions before computing. Four and two do not match, so this product is undefined.

The reverse order would work: B times A pairs 3 with 3 and gives a 2 by 4 result.

Which order is defined is part of the problem, not a detail. In matrix arithmetic the question 'can these be multiplied' has to be asked before the question 'what is the product'.

32. Apply the dimension rule

Faded example

A 3 by 2 times a 2 by 6.

Fill in the blanks

3\times2 \text6 2\times 6 \;\Longrightarrow\; \text___3\times___

Why: The inner twos match so the product exists, and the outer three and six give its dimensions. The rule delivers both the existence check and the result's shape in one reading.

33. Does this product exist?

Sorting

Check the inner dimensions.

Sort into buckets

Sort each pair, in the order written.

Defined
2 by 3 times 3 by 4; 5 by 2 times 2 by 2
Undefined
3 by 4 times 2 by 3; 2 by 2 times 3 by 3
yes
In both, the first matrix's column count equals the second's row count, so rows and columns pair off correctly.
no
In both, the inner dimensions differ, so a row of the first has a different length from a column of the second and no entry can be formed.

34. Explain the dimension rule

Explain it

Not every pair of matrices can be multiplied.

Discussion prompt

Explain to a classmate where the rule comes from.

Hint: How is one entry computed?

Answer:

Each entry of the product is formed by pairing off a row of the first with a column of the second, term by term, and adding.

Pairing requires them to be the same length — the row's length is the first matrix's column count and the column's length is the second's row count.

So the rule is not a convention but a requirement of the mechanism. A good explanation adds that this is also why order matters: swapping the matrices swaps which supplies rows and which supplies columns.

35. Computing a product

Section

Section 4

36. Row of the first, column of the second

Concept

The entry in a given row and column of the product comes from that row of the first matrix and that column of the second, multiplied term by term and summed.

Working systematically — across the first row of the product, then the second, and so on — keeps track of which row and column are in play. Jumping between positions is where errors enter.

Figure (svg): A diagram showing one entry of a matrix product being formed from a row of the first matrix and a column of the second

The row and the column are paired off term by term, so they must have the same number of entries. That requirement is exactly the dimension rule, seen from the inside.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1126-1129

37. Forming one entry

Picture it

One row and one column produce one number.

Figure (svg): A diagram showing one entry of a matrix product being formed from a row of the first matrix and a column of the second

The row and the column are paired off term by term, so they must have the same number of entries. That requirement is exactly the dimension rule, seen from the inside.

The two highlighted strips have the same length, which is what makes the pairing possible. The result of all that multiplying and adding is a single entry of the product.

38. Worked example: compute one entry

Worked example

One row, one column.

\[ \text{Find the entry in row 1, column 1 of } \begin{bmatrix}2&1&3\end{bmatrix} \text{ times a column } \begin{bmatrix}4\\0\\5\end{bmatrix}. \]

Pair the first terms

Why: Two and four.

\[ 8 \]

Pair the second terms

Why: One and zero.

\[ 0 \]

Pair the third terms

Why: Three and five.

\[ 15 \]

Add

Why: The three products.

\[ 23 \]

Figure (svg): A diagram showing one entry of a matrix product being formed from a row of the first matrix and a column of the second

The row and the column are paired off term by term, so they must have the same number of entries. That requirement is exactly the dimension rule, seen from the inside.

\[ 23 \]

Verify: count the products

Why: Three products were formed, matching the inner dimension of three. A shorter or longer sum would mean the row and column had different lengths, which the dimension rule forbids.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1126-1127

39. Predict the number of products per entry

Prediction

A 2 by 3 matrix times a 3 by 4 matrix.

Predict first

How many products are added for each entry?

  • Three, the inner dimension
  • Two
  • Four
  • Twelve

Correct: Three, the inner dimension.

Why: Each row of the first matrix has three entries and each column of the second has three, so three products are formed and added. The inner dimension sets the length of every such sum.

40. Worked example: a full product

Worked example

Four entries, four row-column pairings.

\[ \text{Compute } \begin{bmatrix}1&2\\3&0\end{bmatrix}\begin{bmatrix}4&1\\2&5\end{bmatrix}. \]

Row 1 with column 1

Why: Four plus four.

\[ 8 \]

Row 1 with column 2

Why: One plus ten.

\[ 11 \]

Row 2 with column 1

Why: Twelve plus zero.

\[ 12 \]

Row 2 with column 2

Why: Three plus zero.

\[ 3 \]

Figure (svg): The solution to Worked example a full product shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \begin{bmatrix}8&11\\12&3\end{bmatrix} \]

Verify: compute the reverse order and compare

Why: Multiplying the other way gives a different matrix entirely — its top-left entry is 4 plus 3, which is 7, not 8. The two products are both defined and both two by two, and they are not equal, which is the concrete form of non-commutativity.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1127-1129

41. Find the error: pairing a row with a row

Error analysis

A student computes an entry of a product.

Annotate

On: \( \text{row 1 of }A\text{ times row 1 of }B \)

  • Two rows have been paired instead of a row and a column.
  • The rule takes row i of the first and column j of the second.
  • Pairing two rows would need the second matrix's rows to be as long as the first's.
  • That is a different condition from the dimension rule.
  • The correct pairing uses columns of the second matrix throughout.

The asymmetry between the two matrices is what makes multiplication non-commutative. Rows come from the first and columns from the second, and swapping the matrices swaps those roles.

42. Compute an entry

Faded example

Pairing a row with a column.

Fill in the blanks

2(4)+1(0)+3(5)=8+0+15=23

Why: The three products are formed term by term down the row and column and then added. That single number becomes one entry of the product matrix.

43. Match the entry to its ingredients

Matching

Position determines which row and column.

Match the pairs

  • l1. entry in row 1, column 1
  • l2. entry in row 1, column 2
  • l3. entry in row 2, column 1
  • l4. entry in row 2, column 2
  • r1. row 1 of the first with column 1 of the second
  • r2. row 1 of the first with column 2 of the second
  • r3. row 2 of the first with column 1 of the second
  • r4. row 2 of the first with column 2 of the second

Why: The entry's row index picks the row from the first matrix and its column index picks the column from the second. That correspondence is the whole rule, and working through the positions systematically keeps it straight.

44. Explain the row-column asymmetry

Explain it to yourself

Rows come from one matrix and columns from the other.

Discussion prompt

Explain what that asymmetry causes.

Hint: What happens when the order is swapped?

Answer:

The first matrix supplies rows and the second supplies columns. Those are different roles, and the two matrices are not interchangeable in them.

Swapping the order swaps the roles, so entirely different sums are formed — even when both products are defined and have the same shape.

That is why matrix multiplication is not commutative. A good explanation notes that this is not an oddity to be memorised but a direct consequence of how each entry is built, which makes it predictable rather than surprising.

45. What matrix arithmetic does not do

Section

Section 5

46. Familiar rules that fail

Concept

Addition behaves as expected, but multiplication breaks several rules that hold for numbers. Knowing which ones fail prevents importing them by habit.

The last row matters as a contrast: everything that goes wrong goes wrong on the multiplication side. Addition and scalar multiplication can be used with ordinary intuition, and only products need care.

rule for numbersfor matrices
ab equals bagenerally false
any two can be multipliedonly if dimensions allow
a product is zero only if a factor isfalse; nonzero matrices can multiply to zero
every nonzero element has a reciprocalfalse; many have no inverse
a plus b equals b plus atrue, addition is well behaved

Figure (svg): A contrast between the arithmetic of numbers and the arithmetic of matrices, highlighting where the familiar rules fail

Addition behaves as expected; multiplication does not. Every surprise in matrix arithmetic is on the multiplication side.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1124-1129

47. Where the familiar rules fail

Picture it

The right column lists the surprises.

Figure (svg): A contrast between the arithmetic of numbers and the arithmetic of matrices, highlighting where the familiar rules fail

Addition behaves as expected; multiplication does not. Every surprise in matrix arithmetic is on the multiplication side.

The caption is the summary worth carrying: addition is safe and multiplication is not, and every unexpected behaviour in this chapter comes from the second.

48. Worked example: a product of nonzero matrices that is zero

Worked example

The zero-product property fails.

\[ \text{Multiply } \begin{bmatrix}1&0\\0&0\end{bmatrix} \text{ and } \begin{bmatrix}0&0\\0&1\end{bmatrix}. \]

Row 1 with column 1

Why: One times zero plus zero times zero.

\[ 0 \]

Row 1 with column 2

Why: One times zero plus zero times one.

\[ 0 \]

Row 2 with both columns

Why: Every product is zero.

\[ 0\text{ and } 0 \]

Assemble

Why: All entries zero.

Figure (svg): A contrast between the arithmetic of numbers and the arithmetic of matrices, highlighting where the familiar rules fail

Addition behaves as expected; multiplication does not. Every surprise in matrix arithmetic is on the multiplication side.

\[ \begin{bmatrix}0&0\\0&0\end{bmatrix} \]

Verify: check both factors are nonzero

Why: The first has a 1 in its top-left and the second has a 1 in its bottom-right, so neither is the zero matrix. Yet their product is. For numbers this is impossible, and it is why the factoring techniques of chapter 3 do not transfer to matrices.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1127-1129

49. Does this rule hold for matrices?

Sorting

Addition behaves; multiplication does not.

Sort into buckets

Sort each rule.

Holds
A plus B equals B plus A; scaling distributes over addition
Fails
AB equals BA; a zero product means a zero factor
holds
Both concern addition or scaling, which are entry-by-entry operations inheriting the behaviour of ordinary arithmetic at each position.
fails
Both concern multiplication, where the row-column mechanism breaks the analogy with numbers. Counterexamples for each are easy to construct.

50. Worked example: order changes the answer

Worked example

Both products defined, both different.

\[ \text{Compare } AB \text{ and } BA \text{ for } A=\begin{bmatrix}1&1\\0&1\end{bmatrix}, \; B=\begin{bmatrix}1&0\\1&1\end{bmatrix}. \]

Compute the first product

Why: Row by column.

\[ [[2, 1], [1, 1]] \]

Compute the reverse

Why: Row by column again.

\[ [[1, 1], [1, 2]] \]

Compare

Why: Different entries.

Note both are defined

Why: Both two by two.

Figure (svg): The solution to Worked example order changes the answer shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ AB\ne BA \]

Verify: locate the difference

Why: The top-left entries are 2 and 1 respectively. Swapping the order changed which matrix supplied rows and which supplied columns, so different sums were formed at every position — the shapes agree and nothing else does.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1128-1129

51. Trap: cancelling a matrix factor

Trap

The trap

\[ AB=AC \;\Longrightarrow\; B=C \]

Cancel the common factor

Why: The matrix on the left is divided out of both sides.

This is invalid unless the cancelled matrix has an inverse.

The fix

Cancellation requires an inverse, and many nonzero matrices do not have one.

The same failure produces zero products from nonzero factors: if a matrix has no inverse, multiplying by it can destroy information.

Section 9.7 identifies which matrices can be cancelled. Until then, treat cancellation as unavailable rather than as a rule with exceptions.

52. Predict whether cancellation is valid

Prediction

A times B equals A times C, with A not the zero matrix.

Predict first

Does it follow that B equals C?

  • Only if A has an inverse
  • Yes, always
  • No, never
  • Only if A is square

Correct: Only if A has an inverse.

Why: Cancelling means multiplying both sides by an inverse, which many nonzero matrices lack. Without one, a matrix can destroy information and two different matrices can give the same product.

53. Show a zero product from nonzero factors

Faded example

Multiplying two matrices with disjoint nonzero entries.

Fill in the blanks

1\cdot 0+0\cdot 0=0, \text0___\text___

Why: Every row-column pairing puts a zero against each nonzero entry, so every product vanishes. Neither factor is the zero matrix, which shows the zero-product property failing.

54. Explain which rules survive

Explain it

Some familiar arithmetic transfers and some does not.

Discussion prompt

Explain to a classmate what can be trusted.

Hint: Which operations are positional?

Answer:

Addition and scalar multiplication are entry by entry, so at each position it is ordinary arithmetic. Every rule you know for numbers holds.

Multiplication is a different operation entirely — rows against columns — so nothing transfers automatically. Commutativity, cancellation and the zero-product property all fail.

The practical rule is: be relaxed about sums and careful about products. A good explanation adds that this is why the section spends most of its time on multiplication and almost none on addition.

55. The three operations

Comparison

Fill the blanks from memory. Two are positional and one is not.

Comparison matrix

additionscalar multiplematrix product
requirementidentical dimensionsnoneinner dimensions match
result's shapethe samethe samethe outer dimensions
commutativeyesyesno
computedentry by entryentry by entryrow against column

The last row explains the rest. Positional operations inherit ordinary arithmetic; the row-against-column operation does not.

56. Multiplying two matrices, in order

Pattern

Five steps, and the first decides whether the rest happens.

  1. Write the two dimensions side by side in the given order.
  2. Check the inner pair matches; if not, the product does not exist.
  3. Read the outer pair as the result's shape and draw an empty grid of that size.
  4. Fill each position from the corresponding row and column, systematically.
  5. Check that each entry summed as many products as the inner dimension.

Drawing the empty result grid first is worth the ten seconds: it makes the number of entries explicit and keeps the row-column bookkeeping visible.

OpenStax Algebra and Trigonometry 2e, §11.5 Matrices and Matrix Operations §11.5

57. Check yourself 1 of 3

Check

The dimension rule.

Check your understanding

A 3 by 2 matrix times a 2 by 5 matrix gives a matrix of what size?

  • A. Three by five (correct)
  • B. Two by two
  • C. Five by three
  • D. It does not exist

Answer: A

Why: The inner dimensions are both two, so the product exists, and the outer dimensions three and five give its size. Writing the sizes side by side makes both readable at once.

Why B tempts people
Those are the inner dimensions, which must match but do not give the result's size.
Why C tempts people
This reverses the order; rows come from the first matrix.
Why D tempts people
The inner dimensions match, so the product is defined.

58. Check yourself 2 of 3

Check

Computing an entry.

Check your understanding

Which ingredients produce the entry in row 2, column 3 of a product?

  • A. Row 2 of the first matrix and column 3 of the second (correct)
  • B. Row 3 of the first and column 2 of the second
  • C. Row 2 of both matrices
  • D. Column 2 of the first and row 3 of the second

Answer: A

Why: The entry's row index picks a row from the first matrix and its column index picks a column from the second. Rows always come from the first and columns from the second, which is the asymmetry that makes the operation non-commutative.

Why B tempts people
This swaps the two indices, giving a different entry entirely.
Why C tempts people
Pairing two rows is not the rule and would require a different dimension condition.
Why D tempts people
This reverses the roles of the two matrices.

59. Check yourself 3 of 3

Check

What fails.

Check your understanding

Which of these is generally false for matrices?

  • A. AB equals BA (correct)
  • B. A plus B equals B plus A
  • C. Scaling distributes over addition
  • D. Addition is associative

Answer: A

Why: Multiplication is not commutative, because swapping the order swaps which matrix supplies rows and which supplies columns. The other three concern addition and scaling, which are entry-by-entry and behave like ordinary arithmetic.

Why B tempts people
Addition is positional, so it inherits commutativity from ordinary numbers.
Why C tempts people
Scaling multiplies every entry, so distribution holds at each position.
Why D tempts people
Associativity of addition follows from the same positional argument.

60. Where this shows up outside the classroom

Real world

Every rotation and scaling in computer graphics is a matrix product.

Discussion prompt

Why does the order of two graphics transformations matter?

Hint: What operation combines them?

Answer:

Each transformation is a matrix, and applying two in sequence is their product. Since matrix multiplication is not commutative, the order changes the result.

Rotating a shape and then moving it right gives something different from moving it right and then rotating — the rotation carries the displaced shape around a different arc.

So the non-commutativity is not a mathematical curiosity but a visible geometric fact. Every graphics library documents its transformation order carefully for exactly this reason, and mismatched conventions between libraries are a standard source of bugs.

61. Commit before you check

Commit first

State your confidence along with your answer.

Predict first

Why must the inner dimensions match for a product to exist?

  • Each entry pairs a row with a column term by term, so they must be the same length
  • Because matrices must be square
  • It is an arbitrary convention
  • They need not match

Correct: Each entry pairs a row with a column term by term, so they must be the same length.

Why: A row of the first matrix has as many entries as that matrix has columns, and a column of the second has as many as it has rows. Pairing them term by term requires those counts to agree, which is exactly the dimension rule.

62. Explain it to someone who missed the lesson

Explain it

The test of understanding is being able to say why, not just what.

Discussion prompt

A classmate is surprised that AB and BA differ. Explain why they should not be.

Hint: Where does each entry come from?

Answer:

Each entry of a product comes from a row of the first matrix and a column of the second. Those are different roles.

Swapping the order swaps which matrix plays which role, so entirely different numbers get paired and summed at every position.

So equality would be the surprise, not the difference. A good explanation adds the starker case: with non-square matrices, one order can be defined and the other not exist at all, which makes the asymmetry impossible to miss.

63. Exit ticket

Exit ticket

One honest answer, so the next lesson can start in the right place.

Predict first

Which idea from this lesson would you most want to see again?

  • Dimensions and notation
  • Addition and scalar multiplication
  • The dimension rule for products
  • Computing a product and why order matters

Correct: Any of these is a legitimate answer; the useful one is the honest one.

Why: There is no correct choice here. The fourth is where the whole section's difficulty concentrates, and the third is the check that has to become automatic before the next three sections make sense.

64. Draw the map

Connect it up

One page, drawn from memory, is worth more than rereading the section.

Draw it

Write the dimension rule with two sizes side by side, marking the inner and outer pairs. Beside it, compute one full two by two product showing which row and column produce each entry. Underneath, list the arithmetic rules that fail for matrices and give a one-line reason for each.

If your list of failures traces each one back to the row-against-column mechanism, the section's surprises are explained rather than memorised.

65. What you can do now

Recap

Five things, and the third is the one to check before every product.

if you remember one thingit should be this
about dimensionsrows first, always — the product rule depends on it
about productsinner dimensions match; outer ones give the size
about entriesrow of the first against column of the second
about the rulesaddition is safe; every surprise is in multiplication

Section 9.6 puts matrices to work, turning the elimination of §9.2 into a mechanical sequence of row operations that reaches triangular form without any choices to make.

OpenStax, Precalculus, §9.5 Matrices and Matrix Operations §9.5, pp. 1116-1129 — everything on these slides traces back here

Sources

  1. OpenStax, Precalculus, §9.5 Matrices and Matrix Operations
  2. OpenStax Algebra and Trigonometry 2e, §11.5 Matrices and Matrix Operations

Want this taught 1-on-1? Alexander tutors Precalculus — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108