Educerie

Educerie · AP · Precalculus

Unit 4 Functions Involving Parameters, Vectors, and Matrices · 4.14 Matrices Modeling Contexts

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 table of percentage changes as a matrix; repeated multiplication as repeated steps in time; a steady state, and the inverse as a way back to the past.

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, expect a scenario with two states, a matrix to build from percentages, and predictions with a justified conclusion.

The question this unit answers: How can we tell when the populations of two groups settle down?


AP Precalculus 4.14

Matrices Modeling Contexts

How can we tell when the populations of two groups settle down?

What you will learn

  • Understand how percentage transitions between two states become a matrix with columns adding to 1
  • Know that A s gives the next state, A^n s the state after n steps, and a steady state satisfies A s = s
  • Know that the inverse gives a past state that must be checked for sense

You must be able to

  1. Build a transition matrix from percentage rates
  2. Predict the state after one or several steps
  3. Find and check a steady state from the total
  4. Find a past state with the inverse and spot a negative result
  5. Check each prediction with the column sums and the total
  6. State a conclusion in the words of the scenario, noting the constant-rate assumption

1State vectors and the transition matrix

A state vector lists how many are in each state at one time:

s⃗=[PS]\vec{s} = \begin{bmatrix} P \\ S \end{bmatrix}

A transition matrix says how the states change in one step. Build it from the percentages.

Worked example 1. A school cafeteria offers pizza or salad. Each day:

  • of the students who ate pizza, 80%80\% choose pizza again and 20%20\% switch to salad,
  • of the students who ate salad, 70%70\% choose salad again and 30%30\% switch to pizza.

Let the state be [PS]\begin{bmatrix} P \\ S \end{bmatrix}, the numbers choosing pizza and salad. The new pizza number is 0.8P+0.3S0.8P + 0.3S. The new salad number is 0.2P+0.7S0.2P + 0.7S.

A=[0.80.30.20.7]A = \begin{bmatrix} 0.8 & 0.3 \\ 0.2 & 0.7 \end{bmatrix}

Each column of AA belongs to one starting state and shows where those students go. The first column is for pizza: 0.80.8 stay and 0.20.2 leave. The columns add to 11 because everyone goes somewhere.

This note puts each starting state in a column, so the matrix goes on the left of the state vector. A matrix built with rows for the starting states needs a different product, so keep to one layout.

2The next state

The state after one step is As⃗A\vec{s}.

Worked example 1 (continued). On Monday, 200200 students choose pizza and 800800 choose salad. Find the state each day for three days.

s⃗0=[200800]\vec{s}_0 = \begin{bmatrix} 200 \\ 800 \end{bmatrix}s⃗1=As⃗0=[0.8(200)+0.3(800)0.2(200)+0.7(800)]=[400600]\vec{s}_1 = A\vec{s}_0 = \begin{bmatrix} 0.8(200) + 0.3(800) \\ 0.2(200) + 0.7(800) \end{bmatrix} = \begin{bmatrix} 400 \\ 600 \end{bmatrix}s⃗2=As⃗1=[0.8(400)+0.3(600)0.2(400)+0.7(600)]=[500500]\vec{s}_2 = A\vec{s}_1 = \begin{bmatrix} 0.8(400) + 0.3(600) \\ 0.2(400) + 0.7(600) \end{bmatrix} = \begin{bmatrix} 500 \\ 500 \end{bmatrix}s⃗3=As⃗2=[550450]\vec{s}_3 = A\vec{s}_2 = \begin{bmatrix} 550 \\ 450 \end{bmatrix}

The total stays at 10001000 each day. That is a check on your arithmetic: if the total changes, the columns of AA do not add to 11 or you have made a mistake.

After nn steps the state is Ans⃗0A^n\vec{s}_0. A graphing calculator computes the power AnA^n directly, so you do not need to repeat the step nn times.

3The steady state

Look at the sequence of pizza numbers: 200,400,500,550,…200, 400, 500, 550, \ldots. The increases get smaller: 200,100,50200, 100, 50.

Continue the arithmetic: s⃗4=[575425]\vec{s}_4 = \begin{bmatrix} 575 \\ 425 \end{bmatrix}, then [587.5412.5]\begin{bmatrix} 587.5 \\ 412.5 \end{bmatrix}. The state is settling.

A steady state is a distribution that does not change from one step to the next. For it, As⃗=s⃗A\vec{s} = \vec{s}.

You can find it in two ways.

  • By repeated multiplication. Keep multiplying until the numbers stop changing, to the accuracy you need. Try 1010, 100100 and 10001000 steps.
  • By solving. Write As⃗=s⃗A\vec{s} = \vec{s} and use the total.

For Worked example 1, 0.8P+0.3S=P0.8P + 0.3S = P gives 0.3S=0.2P0.3S = 0.2P, so 2P=3S2P = 3S. The pizza to salad ratio is 3:23 : 2. With 10001000 students, P=600P = 600 and S=400S = 400.

Check: A[600400]=[480+120120+280]=[600400]A\begin{bmatrix} 600 \\ 400 \end{bmatrix} = \begin{bmatrix} 480 + 120 \\ 120 + 280 \end{bmatrix} = \begin{bmatrix} 600 \\ 400 \end{bmatrix}. It does not change.

So in the long run, 600600 choose pizza and 400400 choose salad each day. Individual students keep switching, but the totals stay put.

The same steady state is reached from a different starting split, if the total is the same. Try [10000]\begin{bmatrix} 1000 \\ 0 \end{bmatrix}: the next state is [800200]\begin{bmatrix} 800 \\ 200 \end{bmatrix}, then [700300]\begin{bmatrix} 700 \\ 300 \end{bmatrix}, then [650350]\begin{bmatrix} 650 \\ 350 \end{bmatrix}, closing on 600,400600, 400.

4Another model

Worked example 2. A streaming service has two plans, Basic and Plus. Each month, 10%10\% of Basic subscribers move to Plus, and 25%25\% of Plus subscribers move to Basic. The rest stay.

A=[0.900.250.100.75]A = \begin{bmatrix} 0.90 & 0.25 \\ 0.10 & 0.75 \end{bmatrix}

The state is [BP]\begin{bmatrix} B \\ P \end{bmatrix}. Start with B=3000B = 3000 and P=500P = 500.

A[3000500]=[2700+125300+375]=[2825675]A\begin{bmatrix} 3000 \\ 500 \end{bmatrix} = \begin{bmatrix} 2700 + 125 \\ 300 + 375 \end{bmatrix} = \begin{bmatrix} 2825 \\ 675 \end{bmatrix}

The steady state has 0.10B=0.25P0.10B = 0.25P, so B:P=5:2B : P = 5 : 2. With 35003500 subscribers in all, B=2500B = 2500 and P=1000P = 1000.

Check: A[25001000]=[2250+250250+750]=[25001000]A\begin{bmatrix} 2500 \\ 1000 \end{bmatrix} = \begin{bmatrix} 2250 + 250 \\ 250 + 750 \end{bmatrix} = \begin{bmatrix} 2500 \\ 1000 \end{bmatrix}.

The steady state does not depend on the starting numbers, only on the matrix and the total.

5Past states

To go back one step, use the inverse. If s⃗1=As⃗0\vec{s}_1 = A\vec{s}_0, then s⃗0=A−1s⃗1\vec{s}_0 = A^{-1}\vec{s}_1.

Worked example 3. For the cafeteria, find the state the day before [400600]\begin{bmatrix} 400 \\ 600 \end{bmatrix}.

det⁡A=0.8(0.7)−0.3(0.2)=0.5\det A = 0.8(0.7) - 0.3(0.2) = 0.5A−1=10.5[0.7−0.3−0.20.8]=[1.4−0.6−0.41.6]A^{-1} = \frac{1}{0.5}\begin{bmatrix} 0.7 & -0.3 \\ -0.2 & 0.8 \end{bmatrix} = \begin{bmatrix} 1.4 & -0.6 \\ -0.4 & 1.6 \end{bmatrix}
A−1[400600]=[560−360−160+960]=[200800]A^{-1}\begin{bmatrix} 400 \\ 600 \end{bmatrix} = \begin{bmatrix} 560 - 360 \\ -160 + 960 \end{bmatrix} = \begin{bmatrix} 200 \\ 800 \end{bmatrix}

The day before, 200200 chose pizza and 800800 chose salad. That matches Worked example 1.

A past state only makes sense if both numbers are non-negative. Try going back one more day from [200800]\begin{bmatrix} 200 \\ 800 \end{bmatrix}:

A−1[200800]=[280−480−80+1280]=[−2001200]A^{-1}\begin{bmatrix} 200 \\ 800 \end{bmatrix} = \begin{bmatrix} 280 - 480 \\ -80 + 1280 \end{bmatrix} = \begin{bmatrix} -200 \\ 1200 \end{bmatrix}

A negative number of students is impossible. The model cannot be run back that far. Always check a prediction against the situation.

6Supporting a conclusion

A conclusion needs the numbers and a sentence that links them to the question.

Example: "Will the pizza number ever pass 600600?" The steady state is 600600, and the numbers 200,400,500,550,575,…200, 400, 500, 550, 575, \ldots rise towards 600600 without passing it. So the model says no, as long as the percentages stay the same.

The "as long as" matters. A model assumes the rates do not change, and real habits do. Say so when a question asks about limits.