Lesson 8 of 8 · 18 min
More applications of matrices
Investigate Markov chains, Leontief input–output models, Hill ciphers, areas from determinants, and the eigenvalues behind long-run behaviour.
What you will be able to do
- Use a transition matrix to predict the next state of a Markov chain and find its long-run state.
- Solve a Leontief input–output model .
- Encode and decode a message with a matrix (Hill cipher).
- Find the area of a triangle from a determinant, and recognise eigenvalues and eigenvectors.
Note
What the exam covers
The syllabus asks you to investigate these applications, so you will meet them in class and in assessment such as a problem-solving and modelling task. By the syllabus note, the external exam may assess only dominance and Leslie matrices.
Markov chains. Two cafés share a town's 1000 regular coffee drinkers. Each week, of café A's customers come back to A and switch to B; of B's customers stay and switch to A. Put the proportions in a transition matrix, with column for "from state ":
Each column adds to , because everyone goes somewhere. Starting with at each café, .
Slide up. The state settles at customers for A and for B, whatever the starting split: this is the steady state, where .
With the same transition matrix, one week the cafés have (A) and (B) customers. How many go to café A the next week?
Leontief input–output models. Industries buy from one another. If producing $1 of manufacturing needs $0.20 of agriculture, then in the technology matrix . For total outputs and external demand , output must cover what the industries use plus what consumers buy:
That is an equation in disguise, solved with technology.
Worked example
Solve a Leontief input–output model
An economy has three sectors: agriculture, manufacturing and services. The technology matrix (dollars of each row sector's output used to make $1 of each column sector's output) and the external demand, in millions of dollars, are
Find the total output each sector must produce.
Step 1: Set up the model
Total output covers internal use plus external demand: .
Step 2: Rearrange
, so and .
Write so that can be factored out on the right.
Step 3: Form
Step 4: Solve with technology
Step 5: Check one sector
Agriculture: .
Try it yourself first, then check the working one step at a time.
Answer
Agriculture must produce $800 million, manufacturing $1000 million and services $900 million.
Method
Write .
Rearrange to .
Solve with technology and check one row.
Watch out for
Using , which gives negative outputs.
Solving : that ignores the external demand being on top of internal use.
Cryptology. The Hill cipher turns letters into numbers (, , …, ), groups them into columns, and multiplies by an encoding matrix . Only someone who knows can recover the message. For example, with
the word SUM is sent as . Since , has whole-number entries, and gives back .
Using the same matrix , encode the word CAT, which is .
History
The real Hill cipher
Lester Hill published the cipher in 1929. The real version works modulo 26, so every coded number is again a letter, and the encoding matrix needs an inverse modulo 26. Cracking it is a matter of linear algebra, which is why it is now a teaching example, not a secure code.
Area. In Unit 2 you saw that a matrix multiplies areas by . A determinant gives the area of a triangle straight from its vertices , , :
If the determinant is , the three points are collinear.
The triangle with vertices , and .
Use the determinant formula to find the area of the triangle with vertices , and , in square units.
Eigenvalues and eigenvectors
Some vectors are only stretched by a matrix, not turned: . Such a (not zero) is an eigenvector of and the number is its eigenvalue. They are found from .
They explain the long-run behaviour you have seen. The café steady state is an eigenvector with : . A Leslie matrix's long-term growth ratio is its largest eigenvalue, and the stable age distribution is the matching eigenvector.
Summary
Markov chain: with each column of adding to ; the steady state satisfies .
Leontief model: , so .
Hill cipher: encode with , decode with ; keeps the numbers whole.
The area of a triangle is half the absolute value of a determinant of its vertices.
Eigenvectors satisfy ; they describe long-run states in Markov and Leslie models.
These applications are for investigation; the external exam may assess only dominance and Leslie matrices.
Finished the lesson?
Try the 3 quick checks above and the lesson completes itself, or mark it complete now.