3.5 Basic Matrix Operations

What a matrix is, its dimensions and elements, when two matrices are equal, adding and subtracting element by element, scalar multiplication, combining the operations, and organising real data in matrix form.

Subject: Algebra 2 · 65 slides · symbolic lesson

Open the interactive version of this deck

What this lesson covers

The lesson, slide by slide

1. Lesson 3.5 Basic Matrix Operations

Title

Algebra 2 · Chapter 3 — Linear Systems and Matrices

Perform Basic Matrix Operations

2. By the end of this lesson you can

Objectives

Five outcomes. The first is vocabulary the rest of the chapter assumes.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 187-189 — the lesson these objectives are drawn from

3. What you already have

Warm-up

Lesson 3.4 solved a system by carrying x, y and z through every line. Most of that writing was bookkeeping.

Discussion prompt

Write out the system 2x plus 3y equals 7 and 4x minus y equals 1. Which symbols actually changed from line to line while you solved it, and which were just repeated?

Hint: Underline everything that carried information.

Answer:

\[ \begin{cases} 2x + 3y = 7 \\ 4x - y = 1 \end{cases} \;\longrightarrow\; \begin{bmatrix} 2 & 3 & 7 \\ 4 & -1 & 1 \end{bmatrix} \]

Only the numbers ever changed. The letters, the plus signs and the equals signs were copied unchanged down every line. A matrix keeps the numbers and drops the rest, which is why the next four lessons are about matrices.

4. A matrix is a table you can do arithmetic on

Concept

A matrix is a rectangular arrangement of numbers in rows and columns. Its size is described by its dimensions, rows first, and the numbers inside are its elements. Once data is in this form, whole tables can be added, subtracted and scaled in one operation.

dimensions — The size of a matrix, written as the number of rows by the number of columns, in that order. A matrix with 2 rows and 3 columns is 2 by 3.

Rows before columns is a convention worth over-learning, because everything in the next three lessons depends on getting the order right.

Figure (svg): A two by three matrix with its rows, columns, dimensions and one element labelled

A matrix is a rectangular arrangement of numbers, described by how many rows and columns it has.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 187-187

5. Anatomy of a matrix

Section

Section 1

6. Rows, columns, elements, dimensions

Concept

Count the rows first, then the columns, and write the dimensions in that order. An element is located by giving its row and then its column, again in that order.

equal matrices — Two matrices are equal when their dimensions are the same and the elements in corresponding positions are equal.

\[ A = \begin{bmatrix} 4 & -1 & 5 \\ 0 & 6 & 3 \end{bmatrix} \quad \text{is } 2 \times 3 \]

Two matrices with the same numbers arranged differently are not equal. Shape is part of the identity of a matrix, not just a detail of how it is written.

Figure (svg): A two by three matrix with its rows, columns, dimensions and one element labelled

A matrix is a rectangular arrangement of numbers, described by how many rows and columns it has.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 187-187

7. Everything named at once

Picture it

A two by three matrix, fully labelled.

Figure (svg): A two by three matrix with its rows, columns, dimensions and one element labelled

A matrix is a rectangular arrangement of numbers, described by how many rows and columns it has.

The element in row 1, column 3 is 5. Reversing the order would name the element in row 3, column 1, which does not exist in a matrix with only two rows.

8. Worked example: read a matrix

Worked example

Naming the parts before doing anything with them.

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

Count the rows

Why: There are two horizontal lines of numbers.

\[ 2\text{ rows} \]

Count the columns

Why: There are three vertical lines of numbers.

\[ 3\text{ columns} \]

Write the dimensions rows first

Why: Two by three, never three by two.

\[ 2 x 3 \]

Locate row 2, column 2

Why: Go down to the second row, then across to the second column.

\[ \text{the element is } 6 \]

Figure (svg): The solution to Worked example read a matrix shown as a ladder of expressions, one row per algebraic move

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

\[ 2 \times 3, \quad a_{2,2} = 6 \]

Verify: count the elements two ways

Why: Two rows of three gives six elements, and counting the numbers directly also gives six. A matrix always has exactly rows times columns elements, which is a quick check that nothing was miscounted.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 187-187

9. What are the dimensions?

Sorting

Rows first, then columns.

Sort into buckets

Sort each matrix by its dimensions.

More columns than rows
a matrix with 2 rows and 3 columns; a single row of four numbers
More rows than columns
a matrix with 3 rows and 2 columns; a single column of four numbers
Square
a square arrangement of nine numbers
wide
The second number of the dimensions exceeds the first: 2 by 3 and 1 by 4. A single row is always a wide matrix, however many entries it has.
tall
The first number exceeds the second: 3 by 2 and 4 by 1. A single column is always tall.
square
Rows and columns are equal, so this one is 3 by 3. Square matrices are the only ones that can have determinants and inverses, which is what Lessons 3.7 and 3.8 will need.

The last bucket is worth remembering: only square matrices reach the two most powerful ideas of this chapter.

10. Worked example: decide whether two matrices are equal

Worked example

Equality needs matching shape and matching entries.

\[ \text{Are } \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \text{ and } \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix} \text{ equal?} \]

Compare the dimensions

Why: Both are 2 by 2, so the first condition is met.

Compare row 1, column 2

Why: The first has 2 there; the second has 3.

\[ 2\text{ is not } 3 \]

Conclude

Why: One corresponding pair differs, which is enough.

Note what they do share

Why: The same four numbers appear in both, arranged differently. That is not enough for equality.

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

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

\[ \text{not equal: position matters} \]

Verify: check every corresponding pair

Why: Row 1 column 1 matches at 1 and row 2 column 2 matches at 4, but both off-diagonal entries differ. Equality requires every position to agree, so two agreements out of four is a failure. Compare with numbers: 12 and 21 use the same digits and are not the same number.

11. Trap: dimensions written columns first

Trap

The trap

\[ A = \begin{bmatrix} 4 & -1 & 5 \\ 0 & 6 & 3 \end{bmatrix} \]

Report the dimensions as 3 by 2, counting across first

Why: The eye reads left to right, so columns are counted before rows.

But then the element in row 3, column 1 would have to exist, and there is no third row.

The fix

\[ A = \begin{bmatrix} 4 & -1 & 5 \\ 0 & 6 & 3 \end{bmatrix} \text{ is } 2 \times 3 \]

Count rows first, then columns

Why: The convention is rows by columns, in that order, and it is universal.

A quick check: the first number of the dimensions must equal the number of horizontal lines of numbers. Here that is two.

12. Name the element

Fill the middle

In the matrix with rows 4, -1, 5 and 0, 6, 3.

Fill in the blanks

\text-1 1, \text___ 2 \;\longrightarrow\; ___

Why: The first row is 4, negative 1, 5, so its second entry is negative 1. Reading row then column, in that order, is what keeps this unambiguous — the element in row 2, column 1 is 0, a completely different number.

13. How many elements?

Prediction

Commit before counting.

Predict first

How many elements does a 4 by 7 matrix have?

  • 11
  • 28
  • 47
  • It depends on the values

Correct: 28 — four rows of seven.

\[ 4 \times 7 = 28 \text{ elements} \]

Why: A matrix is a full rectangle, so every row has the same number of entries and the total is rows times columns. Adding the dimensions gives 11, which counts nothing meaningful, and 47 simply writes the two numbers next to each other. This product is also why a 4 by 7 and a 7 by 4 matrix have the same number of elements while being entirely different objects.

14. Why does shape matter?

Explain it to yourself

Two matrices can contain the same numbers and still be different.

\[ \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \quad \text{versus} \quad \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{bmatrix} \]

Discussion prompt

Both contain the numbers 1 through 6. Explain why they are not the same matrix, using an example of real data to make the difference concrete.

Hint: Think about what the rows and columns would label.

Answer:

The first is 2 by 3 and the second is 3 by 2, so no element of one corresponds to an element of the other — row 3 does not exist in the first at all.

Concretely: the first might be two teams and three statistics, the second three teams and two statistics. The same six numbers mean entirely different things, and only the shape records which.

15. Adding and subtracting

Section

Section 2

16. Element by element, and only when the shapes match

Concept

To add or subtract two matrices, add or subtract the numbers in corresponding positions. This is only possible when the two matrices have the same dimensions, because otherwise some positions have no partner.

\[ \begin{bmatrix} a & b \\ c & d \end{bmatrix} + \begin{bmatrix} e & f \\ g & h \end{bmatrix} = \begin{bmatrix} a+e & b+f \\ c+g & d+h \end{bmatrix} \]

The textbook flags this with an Avoid Errors note: check the dimensions before starting, not after.

Figure (svg): Two matrices being added element by element, with each corresponding pair highlighted

Matrix addition is done position by position, which is why the two matrices must be the same shape.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 187-187 — Adding and Subtracting Matrices

17. Position by position

Picture it

Example 1a: two 2 by 2 matrices added.

Figure (svg): Two matrices being added element by element, with each corresponding pair highlighted

Matrix addition is done position by position, which is why the two matrices must be the same shape.

Each of the four sums is a completely separate calculation. Nothing in one position affects any other, which is what makes matrix addition so easy compared with the multiplication of Lesson 3.6.

18. Worked example: add two matrices

Worked example

Example 1a. Four independent additions.

\[ \begin{bmatrix} 3 & 0 \\ -5 & -1 \end{bmatrix} + \begin{bmatrix} -1 & 4 \\ 2 & 0 \end{bmatrix} \]

Check the dimensions match

Why: Both are 2 by 2, so the sum exists.

\[ \text{both } 2 x 2 \]

Add the top-left pair

Why: Three plus negative one.

\[ 2 \]

Add the top-right pair

Why: Zero plus four.

\[ 4 \]

Add the bottom row

Why: Negative five plus two is negative three; negative one plus zero is negative one.

\[ -3\text{ and } -1 \]

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

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

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

Verify: subtract one of the originals from the answer

Why: Taking the second matrix away from the result should recover the first: 2 minus negative 1 is 3, 4 minus 4 is 0, negative 3 minus 2 is negative 5, and negative 1 minus 0 is negative 1. That is exactly the first matrix, so the addition was done correctly in every position.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 187-187

19. When can you add?

Picture it

The dimension condition, drawn.

Figure (svg): Two columns contrasting pairs of matrices that can be added with pairs that cannot

Same number of rows AND same number of columns, or the sum does not exist.

Both numbers of the dimensions must match. A 2 by 3 and a 3 by 2 have the same number of elements and still cannot be added, because no element of one corresponds to an element of the other.

20. Worked example: subtract two matrices

Worked example

Example 1b. Six subtractions, several involving negatives.

\[ \begin{bmatrix} 7 & 4 & 0 \\ -2 & -1 & 6 \end{bmatrix} - \begin{bmatrix} -2 & 5 & 3 \\ -10 & -3 & 1 \end{bmatrix} \]

Check the dimensions

Why: Both are 2 by 3, so the difference exists.

\[ \text{both } 2 x 3 \]

Subtract along the first row

Why: Seven minus negative two is nine; four minus five is negative one; zero minus three is negative three.

\[ 9, -1, -3 \]

Subtract along the second row

Why: Negative two minus negative ten is eight; negative one minus negative three is two; six minus one is five.

\[ 8, 2, 5 \]

Assemble the answer

Why: The result has the same dimensions as the two originals.

\[ a 2 x 3\text{ matrix} \]

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

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

\[ \begin{bmatrix} 9 & -1 & -3 \\ 8 & 2 & 5 \end{bmatrix} \]

Verify: add the second matrix back to the answer

Why: Nine plus negative two is 7, negative one plus five is 4, negative three plus three is 0, eight plus negative ten is negative 2, two plus negative three is negative 1, and five plus one is 6. That reconstructs the first matrix exactly, confirming all six subtractions — including the four involving a negative being subtracted.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 187-187

21. Trap: adding matrices of different shapes

Trap

The trap

\[ \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} + \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \]

Add the entries that do have partners and copy the rest

Why: The mismatch is treated as a minor obstacle rather than a fatal one.

But the elements in the third column have nothing to be added to, so the answer would be inventing information.

The fix

\[ \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} + \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \quad \text{is undefined} \]

Check the dimensions first and stop if they differ

Why: A 2 by 3 and a 2 by 2 cannot be added: the sum simply does not exist.

Undefined is a legitimate answer here, exactly as it was for the slope of a vertical line in Lesson 2.2. Some operations have conditions.

22. Defined or undefined?

Sorting

Judge from the dimensions alone.

Sort into buckets

Sort each sum or difference by whether it exists.

Defined
a 2x2 plus a 2x2; a 2x3 minus a 2x3; a 4x4 minus a 4x4
Undefined
a 2x3 plus a 3x2; a 3x1 plus a 1x3
yes
Both dimensions match exactly, so every element has a partner in the same position and the operation is done entry by entry.
no
The dimensions are transposed rather than equal. Having the same NUMBER of elements is not enough — they must be arranged the same way, or no correspondence exists.

The two undefined cases each involve a matrix and its transpose, which is the commonest near-miss and the one worth recognising instantly.

23. Complete the subtraction

Fill the middle

One entry of Example 1b.

Fill in the blanks

-2 - (-10) = 8

Why: Subtracting negative ten is the same as adding ten, so negative two becomes positive eight. This is the definition of subtraction from Lesson 1.1 — subtract by adding the opposite — applied inside a matrix. Four of the six entries in that example involve a negative being subtracted, which is why the whole computation is really a sign exercise.

24. What are the dimensions of the answer?

Prediction

Commit before computing.

Predict first

What are the dimensions of the sum of two 3 by 4 matrices?

  • 3 by 4
  • 6 by 8
  • 12 by 12
  • The sum is undefined

Correct: 3 by 4 — the same as both originals.

Keep this contrast in mind: addition preserves shape, and multiplication generally does not.

Why: Addition is done position by position, so the answer has exactly one entry for each position of the originals and therefore the same shape. Nothing about matrix addition changes the dimensions. This will be strikingly different in Lesson 3.6, where multiplying a 2 by 3 by a 3 by 4 gives a 2 by 4 — a shape that matches neither input.

25. Scalar multiplication

Section

Section 3

26. One number reaches every element

Concept

In matrix algebra an ordinary number is called a scalar. Multiplying a matrix by a scalar means multiplying every element by it, which scales the whole table at once without changing its shape.

scalar — A real number, in a context where matrices are also present. Multiplying a matrix by a scalar multiplies each of its elements by that number.

\[ -2\begin{bmatrix} 4 & -1 \\ 1 & 0 \\ 2 & 7 \end{bmatrix} = \begin{bmatrix} -8 & 2 \\ -2 & 0 \\ -4 & -14 \end{bmatrix} \]

Every element, without exception — including any zeros, which stay zero, and including negatives, which change sign when the scalar is negative.

Figure (svg): A matrix multiplied by a scalar, with the multiplier reaching every element

Scalar multiplication scales every element at once, leaving the shape of the matrix untouched.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 188-188 — Scalar multiplication

27. Six elements, one multiplier

Picture it

Example 2a: negative two times a 3 by 2 matrix.

Figure (svg): A matrix multiplied by a scalar, with the multiplier reaching every element

Scalar multiplication scales every element at once, leaving the shape of the matrix untouched.

The result is still 3 by 2. A scalar changes the values inside a matrix and never its shape, which distinguishes it from every operation in the next lesson.

28. Worked example: multiply by a negative scalar

Worked example

Example 2a. Six multiplications, each with a sign to watch.

\[ -2\begin{bmatrix} 4 & -1 \\ 1 & 0 \\ 2 & 7 \end{bmatrix} \]

Multiply the first row

Why: Negative two times four is negative eight; negative two times negative one is positive two.

\[ -8\text{ and } 2 \]

Multiply the second row

Why: Negative two times one is negative two; negative two times zero is zero.

\[ -2\text{ and } 0 \]

Multiply the third row

Why: Negative two times two is negative four; negative two times seven is negative fourteen.

\[ -4\text{ and } -14 \]

Note the shape is unchanged

Why: Still three rows and two columns.

\[ \text{still } 3 x 2 \]

Figure (svg): The solution to Worked example multiply by a negative scalar shown as a ladder of expressions, one row per algebraic move

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

\[ \begin{bmatrix} -8 & 2 \\ -2 & 0 \\ -4 & -14 \end{bmatrix} \]

Verify: divide the answer by the scalar

Why: Dividing every element by negative two gives 4, negative 1, 1, 0, 2, 7 — exactly the original matrix. Note the one element that stayed the same: zero times any scalar is zero, so a zero entry survives every scalar multiplication unchanged.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 188-188

29. Complete the scalar multiple

Fill the middle

One entry of Example 2a.

Fill in the blanks

-2 \times (-1) = 2

Why: Negative two times negative one is positive two. In a matrix with mixed signs, a negative scalar flips every sign, so entries that were negative become positive and vice versa. Scanning the answer for the right pattern of signs is a quick partial check: with a negative scalar, no sign should be the same as it was.

30. Worked example: a scalar with a fraction

Worked example

The same procedure with a fractional multiplier.

\[ \tfrac{1}{2}\begin{bmatrix} 6 & -4 \\ 0 & 10 \end{bmatrix} \]

Halve the first row

Why: Six halved is three; negative four halved is negative two.

\[ 3\text{ and } -2 \]

Halve the second row

Why: Zero halved is zero; ten halved is five.

\[ 0\text{ and } 5 \]

Assemble

Why: Same shape, every value halved.

\[ a 2 x 2\text{ matrix} \]

Note what a fractional scalar does

Why: It shrinks the entries rather than growing them, exactly as a fractional coefficient shrank a graph in Lesson 2.7.

Figure (svg): The solution to Worked example a scalar with a fraction shown as a ladder of expressions, one row per algebraic move

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

\[ \begin{bmatrix} 3 & -2 \\ 0 & 5 \end{bmatrix} \]

Verify: multiply the answer by 2

Why: Doubling gives 6, negative 4, 0 and 10 — the original. Multiplying by one half and then by two returns the matrix unchanged, because the two scalars are reciprocals. That is a genuine check, not a restatement.

31. Trap: the scalar applied to one row only

Trap

The trap

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

Multiply the first row and copy the second

Why: The multiplier is applied where the eye starts and then attention moves on.

\[ \begin{bmatrix} -8 & 2 \\ 1 & 0 \end{bmatrix} \quad \text{(wrong)} \]

The second row was untouched, so the answer is a mixture of the scaled and unscaled matrix.

The fix

\[ -2\begin{bmatrix} 4 & -1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} -8 & 2 \\ -2 & 0 \end{bmatrix} \]

Multiply EVERY element, working systematically across each row in turn

Why: A scalar reaches the whole matrix, and skipping any element produces something that is not a scalar multiple of anything.

The check is to divide the answer back by the scalar. A row that does not return to its original value was missed.

32. What does each scalar do?

Discrimination

Compare the size and sign of the multiplier.

Sort into buckets

Sort each scalar by its effect on a matrix of positive entries.

Entries grow, signs kept
multiply by 3
Entries shrink, signs kept
multiply by 1/2
Signs flip
multiply by -2; multiply by -1/3
Nothing changes
multiply by 1
grow
The scalar is positive and greater than one, so every entry increases in size and keeps its sign.
shrink
The scalar is positive and less than one, so every entry shrinks toward zero while keeping its sign.
flip
The scalar is negative, so every sign changes. Whether the entries also grow or shrink depends on the size, which is a separate question — the same size-and-sign split as for the coefficient a in Lesson 2.7.
same
Multiplying by one leaves every element as it was. One is the identity for scalar multiplication, exactly as it was for ordinary numbers in Lesson 1.1.

33. What happens to the dimensions?

Prediction

Commit before computing.

Predict first

You multiply a 3 by 5 matrix by the scalar 7. What are the dimensions of the result?

  • 3 by 5
  • 21 by 35
  • 1 by 15
  • It depends on the entries

Correct: 3 by 5 — unchanged.

This is why scalar multiplication and addition combine freely: both preserve dimensions, so any expression built from them stays the same shape throughout.

Why: A scalar multiplies the values stored in each position; it does not create or remove positions. So the result has exactly the same fifteen positions as the original. Nothing a scalar can do will change a matrix's shape, which makes scalar multiplication the safest of all the matrix operations to combine with addition.

34. Why call it a scalar?

Explain it to yourself

The word is doing descriptive work.

\[ 3\begin{bmatrix} 2 & 1 \\ 0 & 4 \end{bmatrix} = \begin{bmatrix} 6 & 3 \\ 0 & 12 \end{bmatrix} \]

Discussion prompt

Explain why an ordinary number is called a scalar in this context. What does it do to the matrix, and why would calling it a matrix instead be confusing?

Hint: The word shares a root with scale.

Answer:

It scales the matrix: every entry grows or shrinks by the same factor, so the whole table changes size while keeping its proportions and its shape.

Calling it a matrix would be confusing because a 1 by 1 matrix is a different object with different rules — you could not add it to a 2 by 2, whereas a scalar multiplies any matrix at all. The separate name records that a scalar interacts with matrices in a way matrices do not interact with each other.

35. Combining the operations

Section

Section 4

36. The same order of operations as for numbers

Concept

When an expression mixes scalar multiplication with addition or subtraction, do the scalar multiplications first and then combine. It is the order of operations from Lesson 1.2, applied to whole matrices.

\[ 4\begin{bmatrix} -2 & -8 \\ 5 & 0 \end{bmatrix} + \begin{bmatrix} -3 & 8 \\ 6 & -5 \end{bmatrix} \]

Because addition and scalar multiplication both preserve dimensions, any such expression stays the same shape from beginning to end.

Figure (svg): A matrix multiplied by a scalar, with the multiplier reaching every element

Scalar multiplication scales every element at once, leaving the shape of the matrix untouched.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 188-188

37. Scale first, then add

Picture it

Example 2b: a scalar multiple added to another matrix.

Figure (svg): A matrix multiplied by a scalar, with the multiplier reaching every element

Scalar multiplication scales every element at once, leaving the shape of the matrix untouched.

Adding before scaling would give a different answer, exactly as it would with ordinary numbers. Multiplication outranks addition here for the same reason it does everywhere.

38. Worked example: scalar multiplication then addition

Worked example

Example 2b, worked in the required order.

\[ 4\begin{bmatrix} -2 & -8 \\ 5 & 0 \end{bmatrix} + \begin{bmatrix} -3 & 8 \\ 6 & -5 \end{bmatrix} \]

Do the scalar multiplication first

Why: Four times each element: negative eight, negative thirty-two, twenty, zero.

\[ [[-8, -32], [20, 0]] \]

Check the shapes before adding

Why: Both matrices are now 2 by 2, so the sum exists.

\[ \text{both } 2 x 2 \]

Add the first row

Why: Negative eight plus negative three is negative eleven; negative thirty-two plus eight is negative twenty-four.

\[ -11\text{ and } -24 \]

Add the second row

Why: Twenty plus six is twenty-six; zero plus negative five is negative five.

\[ 26\text{ and } -5 \]

Figure (svg): The solution to Worked example scalar multiplication then addition shown as a ladder of expressions, one row per algebraic move

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

\[ \begin{bmatrix} -11 & -24 \\ 26 & -5 \end{bmatrix} \]

Verify: undo both operations

Why: Subtracting the second matrix from the answer gives negative 8, negative 32, 20 and 0, and dividing that by 4 gives negative 2, negative 8, 5 and 0 — the original first matrix. Reversing both steps in the opposite order recovers the input, which checks every element.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 188-188

39. Order the operations

Ranking

Evaluating 4A plus B, where A and B are matrices.

Put in order

  1. Check that A and B have the same dimensions
  2. Multiply every element of A by 4
  3. Add the result to B element by element
  4. Confirm the answer has the same dimensions as A and B

Why: Checking dimensions first avoids doing a scalar multiplication that turns out to be useless because the addition is undefined. Scaling comes before adding by the order of operations. The final dimension check is quick and catches any slip that dropped or invented a row.

40. Worked example: a subtraction of scalar multiples

Worked example

Two scalars, then a subtraction.

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

Scale the first matrix by 3

Why: Six, negative three, zero, twelve.

\[ [[6, -3], [0, 12]] \]

Scale the second matrix by 2

Why: Two, six, negative four, ten.

\[ [[2, 6], [-4, 10]] \]

Subtract element by element

Why: Six minus two is four; negative three minus six is negative nine; zero minus negative four is four; twelve minus ten is two.

\[ 4, -9, 4, 2 \]

Assemble

Why: Both scalings preserved the 2 by 2 shape, so the difference does too.

\[ a 2 x 2\text{ matrix} \]

Figure (svg): The solution to Worked example a subtraction of scalar multiples shown as a ladder of expressions, one row per algebraic move

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

\[ \begin{bmatrix} 4 & -9 \\ 4 & 2 \end{bmatrix} \]

Verify: check one entry by an independent route

Why: The bottom-left entry: three times zero is 0, and two times negative two is negative 4, so the entry is 0 minus negative 4, which is 4. Computing a single entry from scratch, rather than re-reading the working, is a genuine spot check.

41. Find the error: added before scaling

Error analysis

A student evaluates a mixed expression in the wrong order.

Annotate

On: \( 4\begin{bmatrix} -2 & -8 \\ 5 & 0 \end{bmatrix} + \begin{bmatrix} -3 & 8 \\ 6 & -5 \end{bmatrix} \;\Longrightarrow\; 4\begin{bmatrix} -5 & 0 \\ 11 & -5 \end{bmatrix} = \begin{bmatrix} -20 & 0 \\ 44 & -20 \end{bmatrix} \)

  • Both individual operations were performed correctly: the addition is right, and so is the scaling that follows it.
  • But they were done in the wrong order. The 4 multiplies only the FIRST matrix, not the sum of both.
  • This is the order-of-operations rule from Lesson 1.2, unchanged: multiplication before addition unless brackets say otherwise.
  • Corrected: scale first to get [[-8,-32],[20,0]], then add to get [[-11,-24],[26,-5]]. The two answers differ in every entry, so the order is not a technicality.

If the 4 had been meant to multiply the whole sum, the expression would have been written with brackets around it. Read the expression before computing.

42. Numbers against matrices

Comparison

Fill the blanks. The rules transfer almost unchanged.

Comparison matrix

RuleFor numbersFor matrices
Order of operationsmultiply before addingscale before adding
Adding requiresnothing specialmatching dimensions
Multiplying by 1changes nothingchanges nothing
Multiplying by 0gives 0gives a matrix of zeros
Result of addinga numbera matrix of the same shape

The one genuinely new rule is in the second row. Everything else carries over from arithmetic, which is why these operations feel familiar.

43. Complete the mixed expression

Fill the middle

Example 2b, after the scaling.

Fill in the blanks

\begin-11 -8 & -32 \\ 20 & 0 \end___ + \begin___ -3 & 8 \\ 6 & -5 \end___ = \begin___ ___ & -24 \\ 26 & -5 \end___

Why: Negative eight plus negative three is negative eleven. Notice that this entry was negative 2 before scaling, so the 4 turned it into negative 8 before the addition ever happened — computing it as negative 2 plus negative 3 and then scaling would give negative 20 instead, which is the wrong-order error.

44. How sure are you?

Commit first

Answer, then rate your confidence honestly.

Predict first

Is matrix addition commutative — does A plus B always equal B plus A?

  • Yes, because the elements are added and number addition is commutative
  • No, order matters for matrices
  • Only for square matrices
  • Only when the matrices have no negative entries

Correct: Yes — each position is an ordinary sum of numbers, and number addition is commutative.

\[ (A + B)_{ij} = a_{ij} + b_{ij} = b_{ij} + a_{ij} = (B + A)_{ij} \]

Why: The entry in any position of A plus B is the sum of two numbers, and swapping them changes nothing. So every position agrees and the two matrices are equal. This is worth stating explicitly because matrix MULTIPLICATION in Lesson 3.6 is emphatically not commutative — the properties do not all transfer, and knowing which ones do is what stops you assuming the rest.

45. Matrices as organised data

Section

Section 5

46. A table with the labels taken outside

Concept

Real data usually arrives as a two-way table: rows for one category, columns for another. Stripping the labels leaves a matrix, and then whole tables can be combined in a single operation.

The labels have to be remembered, because the matrix itself does not record them. Two matrices can only be added meaningfully if their rows and columns mean the same things.

Figure (svg): A table of sports data written as a matrix, with rows and columns labelled by what they mean

A matrix is a table with the labels stripped away, which is what makes arithmetic on whole tables possible.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 187-189

47. A results table as a matrix

Picture it

Two teams down the side, three statistics across the top.

Figure (svg): A table of sports data written as a matrix, with rows and columns labelled by what they mean

A matrix is a table with the labels stripped away, which is what makes arithmetic on whole tables possible.

Adding a second season's matrix gives the combined record, and multiplying by 3 would convert wins into points. Both operations act on the whole table at once.

48. Worked example: combine two seasons

Worked example

Two matrices of the same shape and the same meaning, added.

\[ \text{Season 1: } \begin{bmatrix} 12 & 4 & 6 \\ 9 & 7 & 6 \end{bmatrix}, \text{ Season 2: } \begin{bmatrix} 10 & 6 & 6 \\ 14 & 3 & 5 \end{bmatrix}. \text{ Find the two-season totals.} \]

Check the rows and columns mean the same things

Why: Both have teams down the side in the same order and wins, draws, losses across the top. Without that, the sum would be meaningless even though it is defined.

Add element by element

Why: Twelve plus ten is 22; four plus six is 10; six plus six is 12.

\[ r o w 1: 22, 10, 12 \]

Do the second row

Why: Nine plus fourteen is 23; seven plus three is 10; six plus five is 11.

\[ r o w 2: 23, 10, 11 \]

Interpret the result

Why: Each entry is that team's two-season total for that statistic.

Figure (svg): The solution to Worked example combine two seasons shown as a ladder of expressions, one row per algebraic move

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

\[ \begin{bmatrix} 22 & 10 & 12 \\ 23 & 10 & 11 \end{bmatrix} \]

Verify: check each row against the number of games

Why: Team A played 22 games and 22 more, so its totals should sum to 44: 22 plus 10 plus 12 is 44 — correct. Team B: 23 plus 10 plus 11 is 44 as well, and both seasons had 22 games each. Row totals that match the games played confirm nothing was lost.

49. Build a matrix from data

Real world

Two shops each sell three products. In week 1, shop A sold 20, 15 and 8; shop B sold 12, 22 and 9.

Discussion prompt

Write this as a matrix, state its dimensions, and say what the rows and columns mean. Then say what adding week 2's matrix would give, and what multiplying by a price would and would not achieve.

Hint: Prices differ by product, which matters for the last part.

Answer:

\[ \begin{bmatrix} 20 & 15 & 8 \\ 12 & 22 & 9 \end{bmatrix} \quad \text{2 by 3: shops by products} \]

Adding week 2's matrix gives the two-week totals for every shop and product. A single scalar would multiply everything by one price, which is only right if all three products cost the same.

Applying different prices to different products is not scalar multiplication at all — it needs matrix multiplication, which is exactly what Lesson 3.6 is for.

50. Worked example: convert wins to points

Worked example

Scalar multiplication used to change the unit of a whole table.

\[ \text{At 3 points a win, convert } \begin{bmatrix} 12 \\ 9 \end{bmatrix} \text{ wins into points.} \]

Identify what the scalar means

Why: Three points per win, so it converts a count of wins into a count of points.

\[ 3\text{ points per win} \]

Multiply every element

Why: Three times twelve is thirty-six; three times nine is twenty-seven.

\[ 36\text{ and } 27 \]

State the units of the result

Why: The entries are now points, not wins — the numbers changed meaning as well as value.

Note what stayed the same

Why: Still a 2 by 1 matrix, with the same teams in the same order.

Figure (svg): The solution to Worked example convert wins to points shown as a ladder of expressions, one row per algebraic move

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

\[ 3\begin{bmatrix} 12 \\ 9 \end{bmatrix} = \begin{bmatrix} 36 \\ 27 \end{bmatrix} \]

Verify: check against a direct count

Why: Team A won 12 games at 3 points each, which is 36 points — matching. And the ordering is preserved: the team with more wins still has more points, which any positive scalar guarantees.

51. Find the error: matrices with mismatched meanings added

Error analysis

A student adds two 2 by 3 matrices whose columns mean different things.

Annotate

On: \( \begin{bmatrix} 12 & 4 & 6 \\ 9 & 7 & 6 \end{bmatrix} + \begin{bmatrix} 30 & 24 & 18 \\ 27 & 21 & 18 \end{bmatrix} \quad \text{(the second is goals for, against, difference)} \)

  • The operation is perfectly DEFINED: both matrices are 2 by 3, so the arithmetic goes through without complaint.
  • But the first records wins, draws and losses while the second records goals. Adding them puts wins and goals in the same entry, which measures nothing.
  • A matrix carries no labels, so nothing in the notation prevents this. The check has to come from you.
  • Corrected: the two tables should be kept separate, or combined into one 2 by 6 matrix with six labelled columns - which is a different operation from adding.

Defined and meaningful are different tests. The dimensions decide the first; only knowing what the rows and columns stand for decides the second.

52. Operation to meaning

Matching

Each matrix operation does something recognisable to real data.

Match the pairs

  • l1. adding two matrices of results
  • l2. subtracting one from another
  • l3. multiplying by the scalar 3
  • l4. multiplying by the scalar 1/2
  • r1. combined totals across both periods
  • r2. the change from one period to the other
  • r3. tripling every value, such as points per win
  • r4. halving every value, such as splitting between two owners

Why: Subtraction is the one worth noticing: it gives the change in every cell at once, which is exactly what a year-on-year comparison table shows. Doing that cell by cell for a large table is tedious; doing it as one matrix subtraction is a single operation.

53. Defined, meaningful, both, or neither?

Definition probe

Two tests: the dimensions, and what the entries stand for.

Sort into buckets

Sort each proposed addition.

Defined and meaningful
two 2x3 tables of wins, draws, losses for the same two teams
Defined but meaningless
a 2x3 table of wins plus a 2x3 table of goals; two 2x3 tables of results for DIFFERENT pairs of teams
Not even defined
a 2x3 table of results plus a 3x2 table of results
both
The dimensions match and every row and column means the same thing in both matrices, so each sum is a genuine total.
defined
The arithmetic goes through because the shapes match, but the entries being added measure different things — goals added to wins, or one team's record added to a different team's. The notation cannot object; you have to.
neither
The dimensions are transposed, so no correspondence between positions exists and the sum does not exist either.

54. What has the matrix thrown away?

Socratic

One question, and nothing else on this slide.

\[ \begin{bmatrix} 12 & 4 & 6 \\ 9 & 7 & 6 \end{bmatrix} \]

Discussion prompt

This matrix came from a labelled table. What information was lost when the labels were dropped, and why is losing it worth the trouble? What would go wrong if you came back to this matrix in a year?

Hint: Ask what you would need in order to read it.

Answer:

Everything about what the numbers MEAN was lost: which teams, which statistics, which season, what units. The matrix records only the values and their arrangement.

It is worth it because arithmetic on the whole table becomes possible — you cannot add two labelled tables, but you can add two matrices, and then reattach the labels afterwards.

Coming back in a year, the matrix alone would be unreadable. That is why real data work keeps the labels alongside, and it is why the middle bucket of the last sort exists: the mathematics will happily add things that should never be added.

55. The three operations at a glance

Comparison

Fill the blanks. All three preserve the shape of the matrix.

Comparison matrix

OperationConditionEffect on dimensions
Additiondimensions must matchunchanged
Subtractiondimensions must matchunchanged
Scalar multiplicationnone - any matrix, any scalarunchanged
Mixed expressionscale first, then addunchanged

Every row says unchanged, which is why these three operations combine so freely. Lesson 3.6 breaks that pattern completely.

56. The procedure, in order

Pattern

One routine handles any expression built from these three operations.

  1. Write down the dimensions of every matrix in the expression before computing anything.
  2. Do the scalar multiplications first, multiplying EVERY element of each matrix by its scalar.
  3. Check that any matrices about to be added or subtracted now have matching dimensions; if they do not, the expression is undefined and you can stop.
  4. Add or subtract element by element, position by position, treating each position as a separate arithmetic problem.
  5. Confirm the answer has the same dimensions as the matrices you combined, and if the matrices came from real data, check that the rows and columns meant the same things.

Step five's second half is the one the mathematics cannot do for you. A defined operation on mismatched data produces a number that means nothing.

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

57. Check yourself 1 of 3

Check

Dimensions, rows first.

Check your understanding

What are the dimensions of a matrix with 3 rows and 5 columns, and how many elements does it have?

  • A. 3 by 5, with 15 elements (correct)
  • B. 5 by 3, with 15 elements
  • C. 3 by 5, with 8 elements
  • D. 5 by 3, with 8 elements

Answer: A

Why: Dimensions are written rows by columns, so 3 by 5, and the number of elements is the product, which is 15.

Why B tempts people
The dimensions are reversed. The convention is rows first, and getting it backwards would place elements in rows that do not exist.
Why C tempts people
The dimensions are right but the elements were added rather than multiplied. A full rectangle of 3 rows by 5 columns holds 15 numbers.
Why D tempts people
Both errors at once: reversed dimensions and added rather than multiplied.

58. Check yourself 2 of 3

Check

Subtraction with negatives. Take care with the signs.

Check your understanding

Compute the entry in row 2, column 1 of [[7,4,0],[-2,-1,6]] minus [[-2,5,3],[-10,-3,1]].

  • A. 8 (correct)
  • B. -12
  • C. 12
  • D. -8

Answer: A

Why: The entry is -2 minus -10, and subtracting a negative is adding, so -2 plus 10 is 8.

Why B tempts people
The two numbers were added rather than subtracted, giving -2 plus -10. Subtracting negative ten adds ten, not minus ten.
Why C tempts people
The sign of the first entry was dropped, giving 2 plus 10. The first matrix has -2 in that position.
Why D tempts people
The subtraction was performed in the wrong order, as -10 minus -2. Matrix subtraction is not commutative any more than number subtraction is.

59. Check yourself 3 of 3

Check

A mixed expression. Watch the order.

Check your understanding

Compute 4[[-2,-8],[5,0]] + [[-3,8],[6,-5]].

  • A. [[-11, -24], [26, -5]] (correct)
  • B. [[-20, 0], [44, -20]]
  • C. [[-5, 0], [11, -5]]
  • D. [[-8, -32], [20, 0]]

Answer: A

Why: Scaling first gives [[-8,-32],[20,0]], and adding the second matrix gives [[-11,-24],[26,-5]].

Why B tempts people
The matrices were added first and the sum then multiplied by 4. The scalar multiplies only the first matrix, as written.
Why C tempts people
This is the sum of the two matrices with the scalar ignored entirely.
Why D tempts people
This is the scalar multiple alone, with the second matrix never added.

60. Where this shows up outside the textbook

Real world

A shop records monthly sales of three products across two branches as a 2 by 3 matrix, one matrix per month.

Discussion prompt

Describe what each of these gives: adding twelve monthly matrices; subtracting January from December; multiplying a monthly matrix by 1.2. Then say which of them a spreadsheet does for you, and why the matrix notation is still worth having.

Hint: Think about what each operation says about the business.

Answer:

Adding twelve months gives the annual totals for every branch and product at once. December minus January gives the change over the year in every cell — where growth happened and where it did not.

Multiplying by 1.2 models a uniform twenty percent increase, which is a forecast rather than a record.

A spreadsheet does all three cell by cell. The matrix notation is worth having because it names the operation as a single object — you can then say things like the annual total is the sum of the monthly matrices, and reason about it, which is the step that leads to matrix multiplication in the next lesson.

61. How sure are you?

Commit first

Answer, then rate your confidence honestly.

Predict first

Is there a matrix that behaves like zero, so that adding it changes nothing?

  • No, matrices have no such element
  • Yes — the matrix of all zeros, of the right dimensions
  • Yes — the matrix with 1 down the diagonal
  • Only for square matrices

Correct: Yes — the matrix whose every entry is zero, with the same dimensions.

\[ A + O = A \quad \text{where } O \text{ is the zero matrix of the same size} \]

Why: Adding zero to each element leaves each element unchanged, so the whole matrix is unchanged. This is the additive identity, exactly parallel to the number 0 from Lesson 1.1. Note the dimension proviso: a 2 by 3 matrix needs a 2 by 3 zero matrix, so there is one zero matrix per shape rather than a single universal one. The matrix with ones down the diagonal is a different object entirely, and it will turn out to be the identity for MULTIPLICATION in Lesson 3.8.

62. Explain it to someone a year behind you

Explain it

They have never seen a matrix and think it looks alarming.

Discussion prompt

In four sentences or fewer, explain what a matrix is, how you add two of them, and the one condition that has to hold. Give them a familiar example of data that is already in this shape.

Hint: They have seen tables.

Answer:

A matrix is just a table of numbers with the labels taken off — a sports league table or a shop's sales by branch and product is already one. To add two matrices you add the numbers that sit in the same position, and nothing else happens.

The one condition is that the two matrices must be the same size, both in rows and in columns, because otherwise some numbers have nothing to be added to.

63. Exit ticket

Exit ticket

Name the weakest spot before you close the deck.

Predict first

Which of these would you least want handed to you cold?

  • Writing dimensions in the right order
  • Subtracting entries where both are negative
  • Remembering the scalar reaches every element
  • Doing the scalar multiplication before the addition

Correct: Whichever you picked is tonight's ten minutes, and each has a one-line fix.

Why: For dimensions, count the horizontal lines of numbers first, always. For negative subtractions, rewrite each as adding the opposite before computing. For scalars, work systematically across each row rather than jumping about. For order, look for brackets — if the scalar is outside them it multiplies only what it touches. Do five of your chosen kind rather than twenty mixed ones.

64. Draw the lesson on one page

Connect it up

Paper. Fifteen minutes.

Draw it

At the top of a page draw a 2 by 3 matrix of your own and label its rows, its columns, its dimensions and one named element. Below it, write two matrices of the same shape and add them, showing every individual sum, then subtract them, again showing every difference. Beside that, multiply one of them by a negative scalar and circle every element whose sign changed. In the lower half, write a mixed expression combining a scalar multiple and an addition, and evaluate it twice — once in the correct order and once in the wrong order — writing one sentence about why the answers differ. Finally, in a margin, list the three operations from this lesson and write next to each what it does to the dimensions.

All three margin entries should say the dimensions are unchanged. That is what makes the next lesson a genuine surprise.

65. What you can do now

Recap

Five things, and all of them are element-by-element.

If you seeThen
Two matrices to addCheck the dimensions first
Different dimensionsThe sum is undefined; stop
A number in front of a matrixMultiply every element by it
A scalar and an addition togetherScale first, then add
Real data in two matricesCheck the labels mean the same things

Lesson 3.6 introduces the one matrix operation that is not element-by-element, changes the dimensions, and refuses to be commutative.

McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations §3.5, pp. 187-189 — everything on these slides traces back here

Sources

  1. McDougal Littell Algebra 2 (Texas Edition), Ch. 3 Linear Systems and Matrices — Lesson 3.5 Perform Basic Matrix Operations — Larson, Boswell, Kanold & Stiff, McDougal Littell / Houghton Mifflin, 2007, pp. 187-189
  2. OpenStax Algebra and Trigonometry 2e, §11.5 Matrices and Matrix Operations
  3. OpenStax College Algebra 2e, §7.5 Matrices and Matrix Operations

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

Book on Wyzant · Text (657) 465-8108