01 / 21

Matrices Modeling
Real-World Contexts

Learn how to organize data, represent relationships, and solve problems using matrix operations in applied settings.

AP Precalculus

What Is a Matrix?

A matrix is a rectangular array of numbers arranged in rows and columns. We describe its size as \( m \times n \), where \( m \) is the number of rows and \( n \) is the number of columns.

3 7 1 5 2 8 Row 1 → Row 2 → Col 1 Col 2 Col 3 \( 2 \times 3 \)

Why Use Matrices to Model?

Real-world data often has multiple categories measured across multiple subjects. Matrices let us organize, transform, and compute with this data efficiently.

Organize
Store sales, costs, or scores for many items in a compact grid.
Compute
Add, subtract, or multiply matrices to combine or transform data.
Interpret
Each entry, row, and column carries meaning tied to the context.

Key Vocabulary

Dimensions
\( m \times n \): rows by columns. A \( 3 \times 2 \) matrix has 3 rows and 2 columns.
Entry \( a_{ij} \)
The number in row \( i \) and column \( j \). Also called an element.
Row Matrix
A matrix with exactly one row: dimension \( 1 \times n \).
Column Matrix
A matrix with exactly one column: dimension \( m \times 1 \).

Core Matrix Operations

1
Scalar Multiplication: Multiply every entry by a constant \( k \). If \( A \) is a matrix, \( kA \) scales all entries.
2
Matrix Addition: Add corresponding entries. Requires same dimensions: \( (A + B)_{ij} = a_{ij} + b_{ij} \).
3
Matrix Multiplication: The entry \( (AB)_{ij} \) is the dot product of row \( i \) of \( A \) and column \( j \) of \( B \). Requires inner dimensions to match.

The Dimension Rule for Multiplication

A \( m \times n \) × B \( n \times p \) = AB \( m \times p \) must match

Addition vs Multiplication

Addition \( A + B \) Multiplication \( AB \)
Dimension Rule Same dimensions Inner dims match
Operation Entry-by-entry Row-by-column dot product
Commutative? Yes: \( A+B = B+A \) No: \( AB \neq BA \) generally
Result Size Same as inputs \( m \times p \)

How to Model with Matrices

1
Identify the data. Determine what the rows and columns represent in the real-world context.
2
Set up the matrices. Organize the data so that dimensions align for the operation you need.
3
Perform the operation. Add, subtract, scale, or multiply: follow the rules for each operation.
4
Interpret the result. Every entry in the resulting matrix has a meaning. Explain it in the context of the problem.

Example 1: Scalar Multiplication

A bakery tracks daily sales of muffins and cookies at two locations. Matrix \( S \) shows Monday's sales. If Tuesday's sales are twice Monday's, find Tuesday's matrix.

S (Monday) 30 50 20 45 \( 2 \times \) = 2S (Tuesday) 60 100 40 90 ← Location A ← Location B Muffins Cookies

Example 2: Matrix Addition

A store tracks morning and afternoon sales separately. Add the matrices to find total daily sales.

Morning 10 15 8 12 + Afternoon 20 25 14 18 = Total 30 40 22 30 ← Shirts ← Pants S M

Example 3: Matrix Multiplication

A cafe sells 3 items. Matrix \( Q \) gives quantities sold at 2 locations. Matrix \( P \) gives the price per item. Find total revenue per location with \( QP \).

\( Q \) (\( 2 \times 3 \)) 10 20 15 8 25 12 × \( P \) (\( 3 \times 1 \)) $3 $5 $2 = \( QP \) (\( 2 \times 1 \)) $160 $173
Row 1: \( (10)(3) + (20)(5) + (15)(2) = 30 + 100 + 30 = 160 \)
Row 2: \( (8)(3) + (25)(5) + (12)(2) = 24 + 125 + 24 = 173 \)
← Loc A ← Loc B

Inside the Dot Product

Each entry of the product \( AB \) is computed by pairing a row of \( A \) with a column of \( B \), multiplying corresponding entries, and summing.

A a b c ... ... ... B x y z \( ax+by+cz \) Row \( i \) of \( A \) \( \cdot \) Column \( j \) of \( B \) = Entry \( (i, j) \) of \( AB \)

A bakery counter turns a dot product into a bill

Two bakery counter sections display croissants,muffins and cakes while the exact matrix matches inventory quantities to the same price categories.Align the product categories in each inventory row with the same categories in the price column. Their dot product gives the value of that location’s inventory.

Align reordered prices by category

Align the product categories in each inventory row with the same categories in the price column. Their dot product gives the value of that location’s inventory.Align the product categories in each inventory row with the same categories in the price column. Their dot product gives the value of that location’s inventory.

Turn aligned quantities into inventory value

Inventory table for Downtown and Uptown lists croissants, muffins and cakes and multiplies the aligned quantities by prices to produce $740 and $685.For croissants, muffins and cakes priced at $3, $2.50 and $4, the inventory rows (80, 120, 50) and (60, 90, 70) give values $740 and $685. Each row’s quantities pair with the same product order in the price column.Open full diagram

Interpreting Every Entry

In a modeling context, every row, column, and entry has real-world meaning. The AP exam often asks you to interpret a specific entry.

Rows
Often represent subjects: stores, students, teams, or locations.
Columns
Often represent categories: products, scores, time periods, or prices.

Example 4: Nutrition Tracking

Matrix \( F \) gives servings of 3 foods eaten by 2 people. Matrix \( N \) gives calories and protein per serving. Compute \( FN \) for totals.

F (servings) 2 1 3 1 3 0 × N (nutrients) 200 10 150 8 100 5 = FN (totals) 850 43 650 34 Cal Protein

Common Mistakes

✕ Wrong Dimensions
Adding matrices with different dimensions, or multiplying when inner dimensions don't match.
✕ Swapping Order
Assuming \( AB = BA \). Matrix multiplication is not commutative: order matters for dimensions and results.
✕ Ignoring Context
Computing correctly but failing to interpret what an entry means in the real-world setting.

Summary of Matrix Operations

Operation Rule Context Use
Scalar \( kA \) Multiply each entry by \( k \) Scaling (doubling sales, adjusting rates)
\( A + B \) Same dimensions required Combining totals (morning + afternoon)
\( A - B \) Same dimensions required Finding differences (change over time)
\( AB \) Inner dims match: \( n \) Aggregating (\( \text{quantities} \times \text{prices} = \text{revenue} \))

Question 1 of 5

Matrix \( A \) is \( 3 \times 4 \) and matrix \( B \) is \( 4 \times 2 \). What are the dimensions of \( AB \)?

Question 2 of 5

A store tracks sales of hats and scarves at 2 locations in matrix \( S \). If all prices increase by 10%, which operation gives the new price matrix?

Question 3 of 5

Matrix \( Q \) (\( 2 \times 3 \)) gives quantities of 3 items at 2 stores. Matrix \( P \) (\( 3 \times 1 \)) gives prices. What does entry \( (QP)_{2,1} \) represent?

Question 4 of 5

If \( A = \begin{bmatrix} 2 & 5 \\ 1 & 3 \end{bmatrix} \) and \( B = \begin{bmatrix} 4 & 0 \\ 2 & 6 \end{bmatrix} \), what is \( A + B \)?

Question 5 of 5

Which of the following products is undefined?