Linear Algebra and Vector Geometry 201-SN4-RE • CEGEP, Montreal
Revision sheet: matrix models, Markov, Leontief and Leslie (201-SN4-RE)
This sheet covers the three matrix models that the CEGEP linear algebra course, 201-SN4-RE (formerly 201-NYC), uses to show what matrices are for: Markov chains, the Leontief input-output model and Leslie matrices. It does not repeat matrix arithmetic; it gives the eight places where a correct product answers the wrong question.
It is written for CEGEP students taking 201-SN4-RE in the Science program, and for those taking linear algebra in the Social Science program, 201-105. The corrected exercise set of the same chapter works through each model, from the transition graph to the reading of an input-output table.
Mark this sheet as read or add it to your favourites: a free account, no password, keeps your read sheets and favourites from one visit to the next, tells you which chapter to tackle next and lets you ask for the method or exercise you are missing. Create your space, an email is enough.
The thread of the chapter
A model matrix is not a table of numbers: it is a machine that carries a state vector from one step to the next. Almost every mistake in the chapter comes from ignoring IN WHICH DIRECTION it carries it.
•COLUMN convention: pij reads “from state j TO state i”, and every COLUMN sums to 1.
•In the row convention everything is transposed: pij goes from i to j and it is the ROWS that sum to 1.
•One step: xn+1=Pxn. After n steps: xn=Pnx0.
•Entry (i,j) of P2 AUTOMATICALLY adds up every path from j to i in two steps: this is what makes the matrix useful.
The top arrow carries pBA=0.30: it leaves column A and arrives at row B, and the complement 0.70 stays in place.
Instant check of the convention: add up a column. If it gives 1, you are in the column convention and the product is written Px.
The steady state, and when it exists
•We look for x such that Px=x, so we solve (P−I)x=0 and NEVER Px=0.
•The system is rank deficient: it has infinitely many solutions, all proportional. They must then be NORMALIZED by the required sum.
•A REGULAR chain, that is, one with a power whose entries are all strictly positive, converges to a unique steady state, whatever the initial distribution.
•The powers of a stochastic matrix remain stochastic: the columns of Pn still sum to 1.
The three bars get closer from step to step and end at the limiting distribution: it is the fixed point of the matrix, reached whatever the start.
Every stochastic matrix has 1 as an eigenvalue, and the steady state is precisely the associated eigenvector.
Leontief and Leslie, two matrices read differently
•LEONTIEF: x=Ax+d, so (I−A)x=d and x=(I−A)−1d. COLUMN j of A says what ONE UNIT produced by sector j consumes.
•Each entry of (I−A)−1 is the total output of one sector required by one unit of final demand for another; the sum of a COLUMN is the MULTIPLIER of that sector.
•(I−A)−1=I+A+A2+⋯: direct effect, then the indirect effects of every round.
•LESLIE: first ROW of fertility rates, SUBDIAGONAL of survival rates, everything else zero. The first periods oscillate: this is the population wave.
The Leslie matrix can be read on this diagram: its first row carries the fertility rates f2, f3 (in orange, towards class 1), its subdiagonal the survival rates s1, s2 (in blue).
Inverse of a 2×2 matrix: swap the diagonal entries, change the sign of the other two, divide by the determinant.
The mistakes that cost marks
These are the errors I correct most often in session. Each one costs marks on a paper, even when the reasoning behind it is right.
1.Confusing the row convention with the column convention
the whole question, every result being transposed
What not to write
“Row A sums to 1, so I write xn+1=Pxn.”
What to write
“The ROWS sum to 1: I am in the row convention, so either I write xn+1=xnP with a row vector, or I TRANSPOSE the matrix and keep Px.”
Matrix of the worked example: each COLUMN sums to 1 (in green), hence the column convention and xn+1=Pxn. The rows sum to 1.1 or 0.9 (in red): they are not probabilities.
Why: The two conventions look exactly the same on paper. The only thing that tells them apart is the direction in which the entries add up to 1, and that is why it is checked BEFORE any calculation.
2.Writing the product in the wrong order
the whole question, and often a visible dimension error
What not to write
“x1=x0P, with x0 as a column.”
What to write
“A COLUMN vector is multiplied on the RIGHT of the matrix: x1=Px0. The other order is not even defined for these dimensions.”
Why: The matrix product is not commutative, and the dimensions act as a safeguard: a 3×3 matrix followed by a 3×1 vector gives a 3×1 vector; the reverse cannot be computed.
3.Raising each entry to the power n
2 marks, and a result that is not even stochastic any more
What not to write
“P2: I square each probability.”
What to write
“P2=P×P, a matrix product: its entry (i,j) adds up every path from j to i in TWO steps.”
In two steps, you come back to A along two paths: A→A→A (0.49) and A→B→A (0.03). Hence P2 at (A,A): 0.52, and not 0.702=0.49, which forgets the second path.
Why: Squaring the entries destroys the column sums: 0.72+0.22+0.12=0.54, which is no longer a probability distribution.
4.Looking for the steady state by solving the wrong system
the whole question
What not to write
“The steady state satisfies Px=0.”
What to write
“It satisfies Px=x, so (P−I)x=0. Solving Px=0 would give the null space of P, which almost always contains only the zero vector.”
Why: A steady state is a FIXED point, not a vector sent to zero. Subtracting the identity is precisely what turns “P changes nothing” into a homogeneous system.
5.Forgetting to normalize the steady state
1.5 marks, and an answer with no unit
What not to write
“The system gives x=(10,11,8): that is the final distribution.”
What to write
“The system is rank deficient, so all its solutions are proportional. With 1,000 students, I normalize: 291000(10,11,8)≈(345,379,276).”
Why: The direction of the eigenvector is unique, its length is not. The sum constraint, given in the problem, is what fixes it.
6.Multiplying by I−A instead of inverting
the whole question, and an output that is badly underestimated
What not to write
“(I−A)x=d, so x=(I−A)d.”
What to write
“We INVERT: x=(I−A)−1d. With A=(0.20.40.30.1) and d=(100,200), we get x=(250,333.33).”
The “industry” column reads: producing one unit of industry consumes 0.30 of agriculture and 0.10 of industry.
Why: (I−A)−1=I+A+A2+⋯ contains every round of intermediate consumption. Multiplying by (I−A) keeps only the direct effect, and backwards.
7.Reading the Leontief matrix by rows
1.5 marks, and an economic interpretation turned upside down
What not to write
“The first row gives what agriculture consumes: 0.20 of itself and 0.30 of industry.”
What to write
“The first row says what agriculture SUPPLIES to the others. What a sector CONSUMES is read in its COLUMN.”
Why: The convention is the same as for Markov: the column index is the origin, the row index the destination. The matrix always reads “from the column to the row”.
8.Taking the first Leslie periods for the stable structure
2 marks, and the demographic conclusion
What not to write
“After one period, the class of the young explodes: that is the equilibrium structure of the population.”
What to write
“These are the oscillations of the POPULATION WAVE. The stable structure is the eigenvector of the DOMINANT eigenvalue, reached only after several periods.”
Why: The second eigenvalue governs the speed of convergence: the gap to the limit is multiplied by ∣λ2∣ at every step, which takes all the longer as this modulus is close to 1.
Which method to choose
Which model does the problem describe?
Look at what the matrix contains and what the vector represents.
If the columns sum to 1 and the entries are transition probabilities → MARKOV CHAIN: xn+1=Pxn, steady state through (P−I)x=0
Example: mobility between three programs
If the entries say what a sector consumes to produce one unit, and a final demand is given → LEONTIEF: x=(I−A)−1d
Example: a two-sector input-output table
If the first row carries fertility rates and the subdiagonal survival rates → LESLIE: growth given by the dominant eigenvalue
Example: a population by age classes
If the matrix has none of these structures → it is an ordinary linear transformation: go back to the general tools of the course
Example: a rotation matrix
The first move is always the same: add up a column. A sum of 1 signals Markov, a sum less than 1 signals Leontief.
What does the question ask for, one step or the limit?
Find the TIME HORIZON of the question in the problem.
If “after one year”, “at the next step” → a single product Px0
Example: from (600,300,100) to (490,330,180)
If “after n steps”, with n small → iterate the product, or compute Pn then multiply
Example: two or three iterations by hand
If “in the long run”, “at equilibrium”, “the final distribution” → STEADY state: solve (P−I)x=0 then normalize
Example: (345,379,276) out of a thousand students
If “what long-term growth rate” → dominant EIGENVALUE, and its eigenvector gives the stable structure
Example: a Leslie matrix
If the problem asks for the limit, iterating the product earns almost nothing: the marker expects the system, not ten multiplications.
How the answer is expected to be written
A marker ticks steps. Here they are in order, with the concluding sentence expected word for word.
Finding and writing up a steady state
When to use it: As soon as the problem asks for the long-term distribution of a Markov chain.
1Check and STATE the convention: the columns sum to 1, so xn+1=Pxn.
2Write the system (P−I)x=0 in full, row by row.
3Solve, pointing out that the system is rank deficient and therefore has infinitely many proportional solutions.
4NORMALIZE according to the constraint of the problem, total size or a sum equal to 1.
5Check by computing Px: you must get x back.
Concluding sentence
“The system (P−I)x=0 gives the solutions proportional to (10,11,8); normalized to 1,000 students, they are (345,379,276), and we check that Px=x.”
The trap: Stopping at the proportional vector: without normalization, the answer is not expressed in any unit of the problem.
Marking: 1 mark for the convention, 2 marks for the system, 1 mark for the normalization, 1 mark for the check.
Solving a Leontief problem
When to use it: When the problem gives a technology matrix and a final demand.
1Write A and recall that its COLUMN j describes what one unit of sector j consumes.
2Form I−A and compute its determinant, checking that it is not zero.
3Invert, with the 2×2 formula or by the Gauss-Jordan method.
4Compute x=(I−A)−1d and check that Ax+d=x.
5Interpret the MULTIPLIERS, that is, the column sums of the inverse.
Concluding sentence
“The required output is x=(250,333.33), and we check that Ax+d=x. The sum of the first column of (I−A)−1, 2.17, is the multiplier of agriculture: each dollar of final demand for agriculture mobilizes 2.17 dollars of total output.”
The trap: Forgetting the check Ax+d=x: it is what catches a faulty inversion, and it takes thirty seconds.
Marking: 1 mark for I−A, 2 marks for the inversion, 1 mark for the product, 1 mark for the check, 1 mark for the interpretation.
Check before you hand in
Five minutes of checking recover more marks than one more problem started in a hurry.
The columns always sum to 1
Add up each column of P, then of P2: the property is preserved, so a column at 0.97 signals an error in the product.
0.7+0.2+0.1=1: the matrix is indeed stochastic in the column convention.
The population total is conserved
After each step of a Markov chain, add up the vector: the total does not move.
490+330+180=1000, as at the start: the product is correct.
The steady state really is a fixed point
Recompute Px with the vector found: you must land exactly on it again.
P(345,379,276) gives back (345,379,276) up to rounding.
The Leontief solution plugs back in
Compute Ax+d and compare it with x: the equality is the very definition of the model.
A(250,333.33)+(100,200)=(250,333.33): the inversion is right.
The typical problem, taken apart
Mobility between three programs, from the first year to the limit
Every year, students change program according to the transition matrix, in the column convention: P=0.70.20.10.20.60.20.10.30.6.
At the start, the enrolments are x0=(600,300,100), that is 1,000 students.
We want the distribution after one year, after two years, and the long-term distribution.
The graph of P: the arrow from program j to program i carries pij, and what stays in place is the diagonal. What leaves a program, “stays” included, sums to 1.
Step 1
Convention check: 0.7+0.2+0.1=1, 0.2+0.6+0.2=1, 0.1+0.3+0.6=1. The COLUMNS sum to 1, so xn+1=Pxn.
Why
This check takes one line and decides everything else: in the row convention, every product in the problem would be transposed.
Step 2
x1=Px0=(0.7(600)+0.2(300)+0.1(100),…)=(490,330,180), with sum 1,000.
Why
Each component mixes the three origins: 490 students are in program 1 because 420 stayed there, 60 came from 2 and 10 from 3.
Step 3
x2=Px1=(427,350,223), with sum 1,000.
Why
The first program keeps losing and the third keeps gaining, but more and more slowly: the chain is approaching its fixed point.
Step 4
Steady state: (P−I)x=0 gives −0.3x1+0.2x2+0.1x3=0 and 0.1x1+0.2x2−0.4x3=0, hence x∝(10,11,8).
Why
The system has rank 2 for three unknowns: it can only give a DIRECTION, never enrolments. This is normal and must be written.
Step 5
Normalization to 1,000 students: 291000(10,11,8)≈(344.8,379.3,275.9).
Why
The sum constraint comes from the problem, not from the matrix. Without it, the answer would remain a ratio between three numbers.
Step 6
Check: 0.7(344.8)+0.2(379.3)+0.1(275.9)≈344.8.
Why
Getting the first component back confirms at once the solution of the system and the normalization, without redoing any calculation.
The conclusion, written out
“After one year the distribution is (490,330,180), after two years (427,350,223), and since the chain is regular it converges to (345,379,276), whatever the initial distribution.”
The classic mistake on this problem: Iterating the product ten times to approach the limit: the marker expects the system (P−I)x=0, and iterating earns almost no marks.
Learn by heart
•COLUMN convention: pij goes from j TO i, and every column sums to 1. State it before any calculation.
•One step, xn+1=Pxn; n steps, xn=Pnx0, and Pn is a matrix PRODUCT, not powers of the entries.
•Steady state: solve (P−I)x=0, never Px=0, then NORMALIZE.
•LEONTIEF: x=(I−A)−1d, and the sum of a column of the inverse is the MULTIPLIER of the sector.
•The column of a technology matrix says what a sector CONSUMES; its row says what it SUPPLIES.
•LESLIE: first row of fertility rates, subdiagonal of survival rates, and the first periods OSCILLATE.
•The DOMINANT eigenvalue gives the long-term growth rate, its eigenvector the stable structure.
Frequently asked questions
How do I know whether a transition matrix uses the column convention?
Add up one column: if the total is one, the matrix uses the column convention and the state vector is multiplied on the right of the matrix. If it is the rows that add up to one, the matrix is transposed with respect to that convention, and you must either transpose it or work with a row vector multiplied on the left.
How do I find the steady state of a Markov chain?
Solve the system obtained by subtracting the identity from the transition matrix and setting the result equal to zero. This system is rank deficient, so it gives a family of proportional solutions: you then normalize according to the constraint of the problem, a total size or a sum equal to one. Finally, check that the matrix leaves this vector unchanged.
What does the inverse of the Leontief matrix represent?
Each of its entries gives the total output that one sector must supply to meet one unit of final demand for another sector, indirect effects included. The sum of a column is the multiplier of that sector: it tells you how much total output is mobilized by each dollar of final demand addressed to it.
Why does a Leslie population oscillate at first?
Because the initial structure is not the equilibrium one. An age class that is too large produces a large generation one period later, which produces another in turn, and this movement takes several periods to die down. This is the population wave, and how fast it dies out depends on the second eigenvalue.
Can a matrix be raised to a power entry by entry?
No. The power of a matrix is a repeated matrix product, and that is exactly what gives it its meaning: an entry of the square automatically adds up every path in two steps. Raising the entries separately also destroys the column sums, which no longer equal one.
Practise it
Corrected exercises: Matrix models, 201-SN4-RE
A method is proved on a paper, not on a sheet. The set for the same chapter takes each of these traps into a problem, with the solution written out step by step.
Something missing from this sheet?A method, a trap, an exercise to practise it, a mistake you spotted: tell me, I read every request.
Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space.
Rather not create an account? Write to me directly.
Get in touch for a first session. Matrix models are the part of the course where linear algebra stops being abstract, and that is often where it finally clicks.