Brief
Some systems change by the same rule every year. A population with three age classes has births and survival rates. A region has people moving between city, suburbs and countryside. Write the rule as a matrix and the state as a vector , and next year is . This project asks: where does it end up?
Run it long enough and something striking happens. The total may keep growing, but the shape stops changing: the share in each age class settles. That settled shape is an eigenvector, a vector the matrix only stretches:
The stretch factor is the eigenvalue. For a population, means growth and means decline. For a migration matrix, nobody is created or lost, so .
Power iteration is the simplest way to find them: multiply by , rescale to length 1, repeat. Any start that has some of the top eigenvector in it turns towards it. How fast depends on the ratio of the second-largest to the largest eigenvalue: the leftover error shrinks by each step.
DATA · published Leslie-matrix examples
Objectives
Read-only. Log in to update progress.
VICTORY CONDITIONS
- Dominant eigenvalue and unit eigenvector match numpy.linalg.eig within 1e-8 for at least three published Leslie matrices, recorded with `python tools/mlarena.py record BM-07 "<largest difference>"`.
- Your step counts match the prediction from the ratio of the top two eigenvalues to within a factor of 2.
- A chart of age-class shares settling towards the eigenvector, and a sentence on what λ means for that population.
Side quests
Terms in plain words
- Eigenvector
- A vector that a matrix only stretches, never turns. Multiplying by the matrix gives the same vector times a number.
- Eigenvalue
- That stretch factor. For a population matrix, the largest one is the long-run growth rate per step.
- Power iteration
- Multiply a starting vector by the matrix again and again, rescaling each time. It turns towards the eigenvector with the largest eigenvalue.
- Leslie matrix
- A population model split by age class. The top row holds births per individual; the entries just below the diagonal hold survival to the next class.
- Spectral gap
- How much bigger the largest eigenvalue is than the next, often measured as the ratio of the second to the first. A small ratio means fast convergence.