Unit 4 · Topic 4.10 · about 30 minutes · 7 parts · 14 scored checks, 2 of them multiple choice

AP Precalculus 4.10: Matrices

Not assessed on the AP Exam. Unit 4 is part of the course, but nothing in it is on the exam.

The product of a 2 by 2 matrix A and a 2 by 3 matrix B, worked out. A has rows (1, 3) and (-2, 4). B has rows (2, 0, -1) and (5, 1, 3). Their product AB is 2 by 3, with rows (17, 3, 8) and (16, 4, 14). Row 2 of A and column 3 of B are boxed, and so is the component in row 2, column 3 of AB, with the working beneath: (-2)(-1) + (4)(3) = 2 + 12 = 14. The sizes are written under each matrix: 2 by 2, 2 by 3 and 2 by 3.Tap to open the picture full size

Part 1 Think first Count the box office

Make a guess first. Committing to an answer, even a wrong one, helps the lesson stick.

Predict first

A theater sold 150 adult tickets and 90 student tickets for its Friday show. An adult ticket costs 12 dollars and a student ticket costs 8 dollars. Which calculation gives the money the Friday show took in?

In short. The product AB of two matrices exists when A has as many columns as B has rows, and its component in row i, column j is the dot product of row i of A with column j of B.

  • An n×m matrix has n rows and m columns, and the number of rows is always written first.
  • If A is n×m and B is m×p, then AB is n×p. When the two inside numbers differ, the product is not defined.
  • Order matters. BA is usually not equal to AB, and it can fail to exist even when AB does.

Part 2 Learn it Matrices and their products

2a. Rows, columns and size

A matrix is a rectangular array of numbers. Its rows run across and its columns run down. A matrix with n rows and m columns is an n×m matrix, said "n by m". Rows always come first.

[40−1275]

This one has 2 rows and 3 columns, so it is 2×3. Stand it on its end and you get a 3×2 matrix, which is a different shape, not the same one written another way.

Each number in a matrix is a component. You locate one by its row first and then its column. Here the component in row 2, column 1 is 2, and the component in row 1, column 2 is 0.

A table of data is a matrix with its labels taken off. A shop that tracks sales of two items over three days can keep them in a 3×2 matrix: one row per day, one column per item.

Quick check · Match

Tap a matrix, then tap its size.

2b. When a product exists

Two matrices can be multiplied only when they fit. The number of columns in the first has to equal the number of rows in the second.

Write the two sizes side by side, in the order of the product. Say A is 3×2 and B is 2×4:

(3×2)(2×4)

The two inside numbers are 2 and 2. They match, so AB exists. The two outside numbers give its size, so AB is 3×4.

Now try BA. The sizes read (2×4)(3×2), and the inside numbers are 4 and 3. They do not match, so BA is not defined. The order you write the letters in decides whether there is a product at all.

Why the inside numbers? Each component pairs a row of the first matrix with a column of the second, number by number. A row of A holds as many numbers as A has columns, and a column of B holds as many as B has rows. If those counts differ, some number has no partner.

Quick check · Multiple choice

A food truck records its sales in a matrix S with one row for each of 5 days and one column for each of 2 menu items. A matrix P has one row for each menu item and a single column holding that item's price. What is the size of the product SP?

2c. Each component is a dot product

The dot product of two vectors with two components multiplies the matching components and adds:

⟨a1,b1⟩⋅⟨a2,b2⟩=a1a2+b1b2

So ⟨3,−2⟩⋅⟨5,4⟩=15−8=7. The result is one number.

That is all a matrix product is made of. The component in row i, column j of AB is the dot product of row i of A with column j of B. Read the row across and the column down.

Take A=[251−3] and B=[40−16]. For row 1, column 2 of AB, use row 1 of A, ⟨2,5⟩, and column 2 of B, ⟨0,6⟩: (2)(0)+(5)(6)=30. For row 2, column 1, use ⟨1,−3⟩ and ⟨4,−1⟩: (1)(4)+(−3)(−1)=7.

A component of AB is not the product of the two components in the same spot. In row 1, column 2, A has 5 and B has 0, yet AB has 30 there.

Quick check · Calculate

Let A=[3−125] and B=[421−3]. What is the component in row 2, column 2 of AB?

2d. The whole product, in order

To write all of AB, pair every row of A with every column of B. With A=[251−3] and B=[40−16] from the last part, there are four dot products:

  • row 1 with column 1: (2)(4)+(5)(−1)=3
  • row 1 with column 2: (2)(0)+(5)(6)=30
  • row 2 with column 1: (1)(4)+(−3)(−1)=7
  • row 2 with column 2: (1)(0)+(−3)(6)=−18

Each result goes in the spot its row and column name, so AB=[3307−18].

Now multiply the other way. Row 1 of B with column 1 of A is (4)(2)+(0)(1)=8, so BA starts with 8, not 3. In full, BA=[8204−23].

With numbers, 3⋅5 and 5⋅3 are the same. With matrices, AB and BA usually differ, and you saw in the last part that one of them may not exist at all. Multiply in the order you are given.

Quick check · Spot the error

A student finds AB for A=[123−1] and B=[045−2]. Tap the first line that goes wrong.

Part 3 Watch it done Revenue and cost at a snack stand

Watch each step, then do the last one yourself.

A ballpark snack stand sold 40 hot dogs and 25 pretzels on Friday, and 55 hot dogs and 30 pretzels on Saturday. A hot dog sells for 3 dollars and costs the stand 1 dollar to make. A pretzel sells for 4 dollars and costs 2 dollars. Use one matrix product to get each day's revenue and cost, then find Saturday's revenue.

  1. Step 1 · Put each table in a matrix

    Let Q=[40255530], with one row per day (Friday, then Saturday) and one column per item (hot dogs, then pretzels). Let P=[3142], with one row per item and one column per amount (selling price, then cost), in dollars.

  2. Step 2 · Choose the order

    Both are 2×2, so QP and PQ both exist, but only one means anything here. The columns of Q are items and the rows of P are items, so in QP every dot product pairs hot dogs with hot dogs and pretzels with pretzels. The product QP has a row for each day and a column for revenue and cost.

  3. Why this step?

    Why do the numbers in PQ mean nothing for this stand?

    In PQ, row 1 of P is a hot dog's price and cost, ⟨3,1⟩, and column 1 of Q is hot dogs sold on each day, ⟨40,55⟩. Their dot product, 175, prices Friday's hot dogs and adds Saturday's hot dogs at cost. The labels that meet inside the product have to agree, items with items.

  4. Step 3 · Fill in Friday

    Row 1 of Q with column 1 of P: (40)(3)+(25)(4)=220, Friday's revenue in dollars. Row 1 of Q with column 2 of P: (40)(1)+(25)(2)=90, Friday's cost.

  5. Step 4 · Set up Saturday's revenue

    Saturday's revenue is the component in row 2, column 1 of QP. That is row 2 of Q, ⟨55,30⟩, with column 1 of P, ⟨3,4⟩.

  6. Your step · Calculate

    Finish it. A snack stand's sales are Q=[40255530], with rows Friday and Saturday and columns hot dogs and pretzels. Prices and costs in dollars are P=[3142], with rows hot dogs and pretzels and columns selling price and cost. What is the component in row 2, column 1 of QP, Saturday's revenue in dollars?

Part 4 Try it Bake for two cafés

A bakery fills a daily order for two cafés. A muffin takes 60 grams of flour, 25 grams of sugar and 15 grams of butter. A loaf takes 400 grams of flour, 30 grams of sugar and 40 grams of butter. The North café orders 24 muffins and 6 loaves, and the South café orders 18 muffins and 10 loaves.

The orders go in C, one row per café (North, then South) and one column per item (muffins, then loaves). The recipes go in R, one row per item and one column per ingredient (flour, sugar, butter), in grams.

C=[2461810]R=[6025154003040]

Work on paper, then answer.

Try it · Fill the statement

The order matrix C=[2461810] has one row per café and one column per item, muffins then loaves. The recipe matrix R=[6025154003040] has one row per item and one column per ingredient, flour, sugar and butter, in grams. Tap a blank, then tap an answer.

The product is defined, and it is a matrix. The product is not defined.

Try it · Calculate

A bakery's daily orders are C=[2461810], with rows for the North and South cafés and columns for muffins and loaves. Its recipes are R=[6025154003040], with rows for a muffin and a loaf and columns for grams of flour, sugar and butter. How many grams of flour does the South café's order need each day? That is the component in row 2, column 1 of CR.

Part 5 Explain it Explain a product in writing

Nothing you type leaves this page. Compare your answer with the model and check off each point.

Unit 4 is not on the AP Exam, so this is written practice for the course.

Written practice

Let A=[2−143] and B=[52]. (i) Identify the size of A, of B and of AB, and explain why BA is not defined. (ii) Determine AB, showing each component as the dot product of a row and a column. (iii) A classmate wrote AB=[181]. Explain what the classmate did wrong.

Model answer

(i) A has 2 rows and 2 columns, so it is 2×2. B has 2 rows and 1 column, so it is 2×1. For AB the sizes read (2×2)(2×1); the inside numbers match, so AB exists and is 2×1. For BA they read (2×1)(2×2): B has 1 column but A has 2 rows, so BA is not defined. (ii) Row 1 of A with the column of B is (2)(5)+(−1)(2)=8, and row 2 is (4)(5)+(3)(2)=26. So AB=[826]. (iii) The classmate paired the columns of A with B: (2)(5)+(4)(2)=18 and (−1)(5)+(3)(2)=1. A component of AB uses a row of A, read across, with a column of B, read down.

Score your own answer. This is a self-check, not a grade. Tick each point your answer makes.

Part 6 Check yourself Three matrices in a graphics program

The three case questions use the same three matrices in the table. Answer them from those components.

A graphics program stores three small matrices, K, L and M, and multiplies them in different orders.

The matrices K, L and M
MatrixComponents
K[3−215]
L[4−1]
M[26]

Case question 1 · Select all

The matrices are K=[3−215], L=[4−1] and M=[26]. Which two of these products are defined? Pick two.

Select 2 answers, then check.

Case question 2 · Calculate

With M=[26] and L=[4−1], the product ML is a 1×1 matrix. What is its one component?

Case question 3 · Multiple choice

With M=[26] and K=[3−215], which matrix is MK?

The rest stand on their own and do not use the case.

Check yourself · Decide and justify

Let A=[1201] and B=[1031]. Is AB equal to BA?

Which reason supports your answer?

Check yourself · Sort it

Each card gives the sizes of two matrices A and B. Tap a card, then tap whether the product AB is defined.

AB is defined

AB is not defined

Part 7 Keep it Bring back earlier ideas

Pulling an older idea back up is what makes it last.

From 4.9 Vector-Valued Functions · Calculate

A particle's position is p(t)=⟨1−t2,2t⟩. How far is the particle from the origin at t=3?

From 4.6 Conic Sections · Spot the error

A student finds an asymptote of the hyperbola (y−2)29−(x+1)24=1. Tap the first line that goes wrong.

In three lines

  • An n×m matrix has n rows and m columns, rows first.
  • AB exists when A has as many columns as B has rows; its size is the rows of A by the columns of B.
  • The component in row i, column j of AB is row i of A dotted with column j of B, and BA is usually different.

Vocabulary

Matrix
A rectangular array of numbers arranged in rows, which run across, and columns, which run down.
n × m matrix
A matrix with exactly n rows and m columns, with the number of rows written first.
Component
One number in a matrix, named by its row and then its column, such as the component in row 2, column 1.
Dot product
For two vectors with two components, the sum of the products of their matching components: ⟨a1,b1⟩⋅⟨a2,b2⟩=a1a2+b1b2.
Product of two matrices
When A has as many columns as B has rows, the matrix AB whose component in row i, column j is the dot product of row i of A and column j of B.
Course alignment, for teachers

AP Precalculus topic 4.10, Unit 4: Functions Involving Parameters, Vectors, and Matrices.

  • Skill 1.B: Express functions, equations, or expressions in analytically equivalent forms that are useful in a given mathematical or applied context.
  • Skill 3.B: Apply numerical results in a given mathematical or applied context.

This lesson maps all 2 essential knowledge statements of the topic to the part that teaches each one: 2 are checked by a scored question. The map is in the lesson file.