AP® Precalculus review sheet from Aim for Five (aimforfive.com/precalc/units/4/4-14)
Unit 4 · Topic 4.14
4.14 Matrices Modeling Contexts
A transition matrix records the percent of a population that moves between states in each time step, like customers switching between two stores. Multiplying by the matrix predicts future states, repeated multiplication can reveal a steady state, and the inverse matrix estimates past states.
Key terms
- transition matrix
- state vector
- steady state
- past and future states
States and transitions
A state is a category that each member of a population is in, such as “shops at store A” or “shops at store B.” A state vector lists how many (or what fraction) are in each state at one time.
A context gives the rates of change between states as percents per time step. For example: each month, 80% of A's customers stay with A and 20% switch to B; 70% of B's customers stay and 30% switch to A.
Building the transition matrix
In these notes, state vectors are columns, and column j of the transition matrix M says where the members of state j go. For the example, M = [0.8 0.3; 0.2 0.7]. The first column (0.8, 0.2) describes A's customers; the second column (0.3, 0.7) describes B's.
Each column adds to 1, because everyone in a state ends up somewhere. That's a good check on your matrix.
Some books use row vectors and put each state's percents in a row instead. The results are the same as long as you're consistent.
Predicting future and past states
If xₙ is the state vector now, the next one is xₙ₊₁ = Mxₙ. Two steps later it's M(Mxₙ) = M²xₙ, and k steps later it's Mᵏxₙ.
To go backward, multiply by the inverse: xₙ = M⁻¹xₙ₊₁. This estimates the earlier state that would lead to the current one.
Steady state
A steady state is a distribution that doesn't change from one step to the next: Mx = x. Members still move between states, but the flows balance out.
Multiplying by M over and over often brings the state vector closer and closer to the steady state. You can also solve for it directly. In the example, a steady state needs A = 0.8A + 0.3B, so 0.2A = 0.3B, which means A and B are in the ratio 3 to 2.
For a matrix like this one, the long-run result doesn't depend on how the customers start out. Whether the 1,000 customers begin split 500 and 500, or all 1,000 at store A, repeated multiplication brings the split closer and closer to 600 and 400.
State vectors can also hold fractions of the population, like [0.5; 0.5] for half at each store. Multiplying by M works the same way, and the entries keep adding to 1.
Worked examples
Try each one yourself first, then open the solution.
- Example 1
Predicting the next two months
Two stores each have 500 customers this month. Use M = [0.8 0.3; 0.2 0.7] (column 1: from A, column 2: from B) to predict the next two months.
Show the solutionHide the solution
- Step 1: x₀ = [500; 500].
- Step 2: x₁ = Mx₀ = [0.8(500) + 0.3(500); 0.2(500) + 0.7(500)] = [550; 450].
- Step 3: x₂ = Mx₁ = [0.8(550) + 0.3(450); 0.2(550) + 0.7(450)] = [575; 425].
- Step 4: The total stays 1,000 each month, as it should.
Answer: Next month A has 550 and B has 450; the month after, A has 575 and B has 425.
- Example 2
Steady state and a past state
For the same stores, find the steady state for 1,000 customers. Then, if this month's state is [550; 450], estimate last month's.
Show the solutionHide the solution
- Step 1: Steady state: A and B are in a 3 to 2 ratio, so A = 600 and B = 400. Check: 0.8(600) + 0.3(400) = 600 and 0.2(600) + 0.7(400) = 400.
- Step 2: Past state: det(M) = 0.8(0.7) − 0.3(0.2) = 0.5, so M⁻¹ = (1/0.5)[0.7 −0.3; −0.2 0.8] = [1.4 −0.6; −0.4 1.6].
- Step 3: M⁻¹[550; 450] = [1.4(550) − 0.6(450); −0.4(550) + 1.6(450)] = [500; 500].
Answer: Steady state: 600 at A and 400 at B. Last month: 500 at each store.
- Example 3
Trap: rows and columns swapped
A student uses [0.8 0.2; 0.3 0.7] for the same stores, with column state vectors, and applies it to [600; 400]. What goes wrong?
Show the solutionHide the solution
- Step 1: The product is [0.8(600) + 0.2(400); 0.3(600) + 0.7(400)] = [560; 460].
- Step 2: That's 1,020 customers, but no one joined or left. Customers appeared out of nowhere.
- Step 3: The student put each store's percents in a row while using column vectors. With column vectors, the columns must add to 1.
Answer: The matrix is set up the wrong way for column vectors; the correct M = [0.8 0.3; 0.2 0.7] keeps the total at 1,000.
Common mistakes
- Mixing row and column conventions, which creates or destroys population. Check that the columns (or rows, in a row convention) add to 1.
- Multiplying in the wrong order. With column state vectors, it's M times x.
- Thinking a steady state means no one moves. People still switch; the totals just stay the same.
On the exam
- Unit 4 is not on the AP Precalculus Exam, so you'll see this topic on class tests rather than in May.
- Expect to build a transition matrix from percents, predict a few steps ahead, estimate a past state with the inverse, and find or approximate a steady state.
Connected topics
Videos
Check yourself
3 questions on 4.14 Matrices Modeling Contexts. Pick an answer to see if you got it, and why.
Two grocery stores, A and B, compete for the same 1000 customers. Each week, 80% of store A's customers stay with A and 20% switch to B. Also, 70% of store B's customers stay with B and 30% switch to A.
The transition matrix T = [0.8 0.3; 0.2 0.7] models these changes. (Rows are separated by semicolons. Column 1 describes A's customers and column 2 describes B's.) If the column vector s = ⟨a, b⟩ gives the numbers of customers at A and B this week, then Ts gives the numbers next week.
This week, each store has 500 customers.
Invented scenario
According to the model, how many customers will store A have next week?
If the model continues for many weeks, the numbers of customers approach a steady state. What is the steady state?
According to the model, how many customers did store A have last week?
0 of 3 answered