State matrices and matrix recurrence relations
Predict the future one step at a time with state matrices in Year 12 VCE General Mathematics. If a hire company knows how many kayaks sit at each of its Gippsland Lakes bases today, and how often they are returned to the other base, it can forecast where they will be tomorrow, next week or next month, and plan its trucks to match.
You will multiply a transition matrix by a column state matrix to find \(S_1\), \(S_2\) and beyond, use technology for \(S_n = T^nS_0\), and work with numbers, percentages and proportions. You will also work back to an earlier state with an inverse matrix, a step towards finding the long-term equilibrium next.
Theory
A state matrix records how many members are in each state, and the recurrence relation \(S_{n+1} = TS_n\) moves it forward one period at a time. This Year 12 General Mathematics guide for students in Victoria shows how to generate state matrices by hand, use \(S_n = T^nS_0\) with technology and work back to an earlier state.
A state matrix \(S_n\) is a column matrix that records how many members (or what percentage or proportion) are in each state at step \(n\). The states are listed down the column in the same order as the transition matrix. \(S_0\) is the initial state matrix, \(S_1\) is one period later, and so on.
Multiplying the transition matrix by the current state matrix gives the next one. This rule, \(S_{n+1} = TS_n\), is a matrix recurrence relation. Starting from \(S_0\) and applying it again and again generates the sequence \(S_1, S_2, S_3, \dots\). The model assumes that where a member goes next depends only on where it is now, not on its history.
Because applying \(T\) \(n\) times is the same as multiplying by \(T^n\), the state after \(n\) steps is \(S_n = T^nS_0\). Technology finds \(T^n\) quickly. Each column of \(T\) adds to \(1\), so the total number of members never changes.
| Day \(n\) | Lakes Entrance \((L)\) | Metung \((M)\) |
|---|---|---|
| \(0\) | \(200\) | \(100\) |
| \(1\) | \(180\) | \(120\) |
| \(2\) | \(171\) | \(129\) |
| \(3\) | \(166.95\) | \(133.05\) |
The matrix recurrence relation:
The state after \(n\) steps, straight from the initial state:
For two states, each element of \(S_{n+1}\) is a row of \(T\) times the state column:
Working backwards one step (when \(T\) has an inverse):
How to generate state matrices
- Write \(T\) and \(S_0\) with the states in the same order (columns of \(T\) = this period). Use numbers, percentages or proportions in \(S_0\), as the question does.
- One step: \(S_1 = TS_0\). For each state, multiply its row of \(T\) by the column \(S_0\): first elements times first elements, plus second times second, and so on.
- Repeat: \(S_2 = TS_1\), \(S_3 = TS_2\). Keep the unrounded values from each step.
- Many steps: use technology to find \(T^n\), then \(S_n = T^nS_0\).
- Check that the total is the same as in \(S_0\), then round only the final answer.
To go back a step, multiply by the inverse: \(S_0 = T^{-1}S_1\). Check by working out \(TS_0\).
Use \(S_1 = TS_0\): one row of \(T\) at a time.
| \(\text{grass}\) | \(=\) | \(0.65 \times 120 + 0.2 \times 180\) |
| \(\) | \(=\) | \(78 + 36\) |
| \(\) | \(=\) | \(114\) |
| \(\text{hard court}\) | \(=\) | \(0.35 \times 120 + 0.8 \times 180\) |
| \(\) | \(=\) | \(42 + 144\) |
| \(\) | \(=\) | \(186\) |
| \(\text{total}\) | \(=\) | \(114 + 186\) |
| \(\) | \(=\) | \(300\) |
Next Saturday \(114\) members are expected to play on grass and \(186\) on hard courts. The total is still \(120 + 180 = 300\).
Write \(T\) from the diagram (columns = this year), put the percentages in \(S_0\), then \(S_1 = TS_0\).
| \(\text{camping}\) | \(=\) | \(0.6 \times 40 + 0.2 \times 35 + 0.1 \times 25\) |
| \(\) | \(=\) | \(24 + 7 + 2.5\) |
| \(\) | \(=\) | \(33.5\) |
| \(\text{cabin}\) | \(=\) | \(0.25 \times 40 + 0.6 \times 35 + 0.2 \times 25\) |
| \(\) | \(=\) | \(10 + 21 + 5\) |
| \(\) | \(=\) | \(36\) |
| \(\text{hotel}\) | \(=\) | \(0.15 \times 40 + 0.2 \times 35 + 0.7 \times 25\) |
| \(\) | \(=\) | \(6 + 7 + 17.5\) |
| \(\) | \(=\) | \(30.5\) |
| \(\text{check}\) | \(:\) | \(33.5 + 36 + 30.5 = 100\) |
Next year: camping \(33.5\%\), cabin \(36\%\), hotel \(30.5\%\).
Technology gives \(T^3\); then multiply by \(S_0\).
| \(\text{service A}\) | \(=\) | \(0.76875 \times 400 + 0.346875 \times 600\) |
| \(\) | \(=\) | \(307.5 + 208.125\) |
| \(\) | \(=\) | \(515.625\) |
| \(\text{service B}\) | \(=\) | \(0.23125 \times 400 + 0.653125 \times 600\) |
| \(\) | \(=\) | \(92.5 + 391.875\) |
| \(\) | \(=\) | \(484.375\) |
| \(\text{step by step}\) | \(:\) | \(S_1 = \begin{bmatrix}450\\ 550\end{bmatrix},\ S_2 = \begin{bmatrix}487.5\\ 512.5\end{bmatrix}\) |
| \(S_3\) | \(=\) | \(TS_2 = \begin{bmatrix}515.625\\ 484.375\end{bmatrix}\) |
After \(3\) months about \(516\) households have service \(A\) and \(484\) have service \(B\). Multiplying by \(T\) three times gives the same \(S_3\). Round only at the end.
Since \(S_1 = TS_0\), the previous state is \(S_0 = T^{-1}S_1\).
| \(\det T\) | \(=\) | \(0.9 \times 0.6 - 0.4 \times 0.1\) |
| \(\) | \(=\) | \(0.5\) |
| \(T^{-1}\) | \(=\) | \(\dfrac{1}{0.5}\begin{bmatrix} 0.6 & -0.4\\ -0.1 & 0.9 \end{bmatrix}\) |
| \(\) | \(=\) | \(\begin{bmatrix}1.2 & -0.8\\ -0.2 & 1.8\end{bmatrix}\) |
| \(\text{on campus}\) | \(=\) | \(1.2 \times 570 - 0.8 \times 230\) |
| \(\) | \(=\) | \(684 - 184\) |
| \(\) | \(=\) | \(500\) |
| \(\text{off campus}\) | \(=\) | \(- 0.2 \times 570 + 1.8 \times 230\) |
| \(\) | \(=\) | \(- 114 + 414\) |
| \(\) | \(=\) | \(300\) |
Check with \(S_1 = TS_0\):
| \(\text{on campus}\) | \(=\) | \(0.9 \times 500 + 0.4 \times 300\) |
| \(\) | \(=\) | \(450 + 120\) |
| \(\) | \(=\) | \(570\) |
| \(\text{off campus}\) | \(=\) | \(0.1 \times 500 + 0.6 \times 300\) |
| \(\) | \(=\) | \(50 + 180\) |
| \(\) | \(=\) | \(230\) |
This year \(500\) students live on campus (and \(300\) off campus). Multiplying back by \(T\) gives \(570\) and \(230\), as given.
Common pitfalls
Frequently asked questions
What is a state matrix?
It is a column matrix showing how many members, or what percentage, are in each state at one time. S0 is the starting state, S1 is one period later, and so on.
How do you find the next state matrix?
Multiply the transition matrix by the current state matrix: S(n + 1) = T times S(n). Each new element is a row of T multiplied by the state column, element by element, then added.
How do you find the state after many steps?
Use S(n) = T to the power n times S0. Technology works out the power of T, then you multiply it by the initial state matrix. It gives the same result as multiplying by T again and again.
Why does the total stay the same?
Each column of the transition matrix adds to 1, so every member in a state this period is shared out among the states next period. Nobody is added or lost.
How do you work backwards to an earlier state?
Multiply by the inverse of the transition matrix: S0 = T inverse times S1. Then check by multiplying your answer by T to get S1 back.