topic badge

4.14 Matrices modeling contexts

Lesson

Introduction

Learning objectives

  • 4.14.A - Construct a model of a scenario involving transitions between two states using matrices.
  • 4.14.B - Apply matrix models to predict future and past states for n transition steps.

Models with matrices

A matrix can serve as an effective tool to model transitions between different states in various contexts, where a state refers to any categorically distinct condition or position a system can be in.

A transition between states is represented by a change from one state to another over a discrete interval of time. For example, some animals might transition from the forest to the grassland, or a person might transition from being employed to unemployed.

These transitions can be quantified in terms of rates, often expressed as percent changes.

For example, we might say that each year, 20\% of the animals in the forest move to the grassland, and 5\% of the animals in the grassland move to the forest.

Alternatively, we might say that each year, 1\% of employed people become unemployed, and 0.2\% of unemployed people find employment.

These rates of transition can be represented in a square matrix, called a transition matrix. For a system with two states, the transition matrix is a 2\times 2 matrix, with each entry representing a rate of transition from one state to the other.

The row of the matrix corresponds to the initial state, and the column corresponds to the final state. Therefore, the entry in the first row and second column represents the rate of transition from the first state to the second state.

For example, in our ecological model with 20\% of the animals in the forest moving to the grassland, and 5\% of the animals in the grassland moving to the forest, the transition matrix might be: \begin{bmatrix} 0.8 & 0.2 \\ 0.05 & 0.95 \end{bmatrix}

Here, the first row represents the forest and the second row represents the grassland. The entry in the first row and second column (0.2) represents the rate of transition from the forest to the grassland. The entry in the first row and first column (0.8) represents the rate of animals staying in the forest. By constructing a matrix model in this way, we can simulate the transitions between states over time, predict future states, and analyze the dynamics of the system.

Examples

Example 1

A school has two lunch periods, period A and period B. Over time, they have noticed that approximately 15\% of students switch from period A to period B and 10\% switch from period B to period A every week. Given this, construct the transition matrix.

Worked Solution
Apply the idea
  • The 1st row, 1st column is the proportion of students who remain in period A which is \\1 - 0.15 = 0.85

  • The 1st row, 2nd column is the proportion of students who switch from period B to period A which is 0.10

  • The 2nd row, 1st column is the proportion of students who switch from period A to period B which is 0.15

  • The 2nd row, 2nd column is the proportion of students who remain in period B which is 1 - 0.10 = 0.90

So the transition matrix is: \begin{bmatrix} 0.70 & 0.10 \\ 0.30 & 0.90 \end{bmatrix}

Idea summary

Rates of transitions between states can often be represented as percent changes, which we can use to construct a matrix which models how states change over discrete intervals. Rows of the transition matrix represent the current state, and the columns represent the next state. Each cell in the matrix gives the rate of transition from one state to another.

Predictions with matrix models

We've seen how to model transition rates between states using matrices. Now, we'll use these models to predict future and past states. We can use the transition matrix model to predict the state of a system after a certain number of transitions.

For example, suppose we have a transition matrix T: \begin{bmatrix} 0.70 & 0.10 \\ 0.30 & 0.90 \end{bmatrix}

And our state vector, S, represents the current states: \begin{bmatrix} 500 \\ 200 \end{bmatrix}

If we want to predict the states after one transition, we multiply T by S:

\displaystyle \begin{bmatrix} 0.8 & 0.2 \\ 0.3 & 0.7 \end{bmatrix}\begin{bmatrix} 500 \\ 200 \end{bmatrix} \displaystyle =\displaystyle \begin{bmatrix} 420 \\ 280 \end{bmatrix}

This is done by multiplying the transition matrix by the state vector. By repeatedly multiplying the transition matrix by the state vector, we can predict the steady state, if it exists. The steady state is the state distribution that does not change from one transition to the next.

If we have the inverse of a transition matrix, we can use it to predict past states.

We multiply the inverse of the transition matrix by the state vector to find a previous state.

Let's take the state vector from the previous example after one transition:

\begin{bmatrix} 420 \\ 280 \end{bmatrix}

And let's say we have the inverse of the transition matrix T^{-1}:

\begin{bmatrix} 1.4 & -0.4 \\ 0.6 & 1.6 \end{bmatrix}

Then, by multiplying T^{-1} by the new state vector, we get:

T^{-1} S = \begin{bmatrix} 1.4 & -0.4 \\ 0.6 & 1.6 \end{bmatrix}\begin{bmatrix} 420 \\ 280 \end{bmatrix} = \begin{bmatrix} 500 \\ 200 \end{bmatrix}

We get the initial state vector, predicting the past states.

Examples

Example 2

A city has two main neighborhoods, Neighborhood A and Neighborhood B. From previous surveys, it is known that each year, 10\% of the residents of Neighborhood A move to Neighborhood B, and 5\% of the residents of Neighborhood B move to Neighborhood A. If the current populations of Neighborhood A and Neighborhood B are 2000 and 1000 respectively.

a

Predict the populations of the two neighborhoods after one year using a matrix model.

Worked Solution
Apply the idea

First, we construct the transition matrix based on the rates given: \begin{bmatrix} 0.90 & 0.05 \\ 0.10 & 0.95 \end{bmatrix}

Next, we construct the current state vector: \begin{bmatrix} 2000 \\ 1000 \end{bmatrix}

\displaystyle \text{Predicted populations} \displaystyle =\displaystyle \begin{bmatrix} 0.90 & 0.05 \\ 0.10 & 0.95 \end{bmatrix}\begin{bmatrix} 2000 \\ 1000 \end{bmatrix}Multiply the transition matrix by the state vector
\displaystyle =\displaystyle \begin{bmatrix} 1850 \\ 1150 \end{bmatrix}Evaluate

So, the predicted populations after one year are 1850 for Neighborhood A and 1150 for Neighborhood B.

b

Refer to the scenario in P. Predict the populations of the two neighborhoods two years from now using the matrix model.

Worked Solution
Apply the idea
\displaystyle \text{Predicted populations} \displaystyle =\displaystyle \begin{bmatrix} 0.90 & 0.05 \\ 0.10 & 0.95 \end{bmatrix}\begin{bmatrix} 1850 \\ 1150 \end{bmatrix}Multiply the transition matrix by the state vector from part (a)
\displaystyle =\displaystyle \begin{bmatrix} 1722.5 \\ 1277.5 \end{bmatrix}Evaluate

So, the predicted populations after two years are approximately 1723 for Neighborhood A and 1278 for Neighborhood B (rounding to the nearest whole number since population counts are integers).

Idea summary

By multiplying the transition matrix by the current state vector, we can predict future states. By repeatedly doing this multiplication, we can predict the steady state of the system. If we have the inverse of the transition matrix, we can predict past states by multiplying it by the current state vector.

Outcomes

4.14.A

Construct a model of a scenario involving transitions between two states using matrices.

4.14.B

Apply matrix models to predict future and past states for n transition steps.

What is Mathspace

About Mathspace