Educerie · AP · Precalculus
Unit 4 Functions Involving Parameters, Vectors, and Matrices · 4.10 Matrices
This unit is not on the AP exam. The exam covers Units 1 to 3 only; Unit 4 is taught here for the course and for what comes after it.
Big ideas: A matrix as a rectangular array that stores a table of numbers; multiplication as rows meeting columns; why the order of a product matters.
Where it is examined: Not on the AP Precalculus exam. The College Board lists Unit 4 as an additional topic available to schools. If your school teaches it, the work is multiplying matrices by hand and with a graphing calculator, and using products in a context.
The question this unit answers: How can we combine two tables of numbers so that the result is another useful table?
AP Precalculus 4.10
Matrices
How can we combine two tables of numbers so that the result is another useful table?
What you will learn
- Understand a matrix as rows by columns and when a product exists
- Know that each entry of a product is a row-times-column sum
- Know that matrix multiplication depends on order
You must be able to
- State the size of a matrix and of a product
- Multiply two matrices by hand and with a calculator
- Show that AB and BA usually differ
- Multiply a matrix by a column vector
- Use a matrix product to total quantities times prices
- Check the inner sizes before multiplying
1What a matrix is
A matrix is an array. Its size is given as rows by columns.
An matrix has rows and columns. Rows come first.
Example: this is a matrix, with 2 rows and 3 columns.
Each number is an entry or component. The entry in the th row and the th column is the entry. Here the entry is .
A vector in the plane can be written as a matrix, a single column:
A square matrix has the same number of rows and columns. A matrix is the most common case in this unit.
2When can two matrices be multiplied?
Two matrices and can be multiplied, in the order , only if the number of columns of equals the number of rows of .
The product has the number of rows of and the number of columns of .
The two middle numbers must match. They disappear. The two outer numbers give the size of the product.
| Can you form ? | Size of | ||
|---|---|---|---|
| yes | |||
| yes | |||
| no (3 does not equal 2) | none | ||
| yes |
3How to multiply
Each entry of the product is a dot product.
The entry in row , column of is the dot product of row of with column of .
Worked example 1. Let and . Find .
Work through each entry.
- Row 1 of with column 1 of : .
- Row 1 of with column 2 of : .
- Row 2 of with column 1 of : .
- Row 2 of with column 2 of : .
Check the size: times is .
Worked example 2. A product of different shapes. Let () and ().
The columns of (3) equal the rows of (3), so exists and is .
- Row 1 with column 1: .
- Row 1 with column 2: .
- Row 2 with column 1: .
- Row 2 with column 2: .
The product also exists, but it is . So and are different sizes.
4Order matters
For numbers, . For matrices, and are usually not equal.
Use the and of Worked example 1 and multiply in the other order:
- Row 1 of with column 1 of : .
- Row 1 of with column 2 of : .
- Row 2 of with column 1 of : .
- Row 2 of with column 2 of : .
This is not . Two matrices of the same size usually have two different products.
Say "multiply by " or write carefully. The first matrix is on the left.
5A matrix times a vector
A vector written as a column is a matrix, so a matrix can multiply it. The result is another column.
Each entry is a dot product of a row with the vector.
Example: .
This is the key step for Topic 4.12, where a matrix turns a vector into a new vector.
6A product in context
Matrices turn a table of quantities and a table of prices into a table of totals.
Example (invented): two shops sell sandwiches and drinks. The first column of the table gives sandwiches sold in a day, and the second gives drinks.
Row 1 is shop A and row 2 is shop B. A sandwich costs and a drink costs . The price is a column vector:
Then gives the takings for each shop:
Shop A takes and shop B takes . The rows of are shops, and the rows of the answer are shops too. The columns of are products, and the rows of are products, so they match.
That match is what makes the product meaningful. Before you multiply, check that the "inner" quantities are the same kind of thing.
7Using a calculator
A graphing calculator stores matrices and multiplies them.
- Enter each matrix by giving its size, then its entries, one row at a time.
- Multiply with the multiplication sign between the two named matrices.
- A "dimension mismatch" error means the columns of the first do not equal the rows of the second.
- Check the order. is not the same as .
Do one entry by hand to confirm a calculator result.