The Next-Generation Matrix and R₀

The basic reproduction number R0R_0 decides whether a pathogen invades, but for anything more structured than a textbook SIR model — multiple host types, stages, or transmission routes — the naive “β\beta over γ\gamma” recipe breaks down. The next-generation matrix gives a rigorous, general way to compute R0R_0 as the dominant eigenvalue of a matrix built from the infection dynamics.

The idea

R0R_0 is the expected number of secondary cases produced by one typical infected individual in a fully susceptible population. In a structured model there are several kinds of infected individuals — say infants and adults, or exposed and infectious classes — and one infected of type jj produces a mixture of new infections across all types. We therefore need a matrix that bookkeeps “new infections in group ii caused by an infected in group jj,” and R0R_0 becomes a summary of that matrix rather than a single ratio.

Construction

Work with the infected compartments only (for SIR-type models these are the EE, II, and similar classes; SS and RR are excluded). Linearize their dynamics about the disease-free equilibrium (DFE), and split the linearized system into two parts:

Let FF and VV be the Jacobian matrices of F\mathcal{F} and V\mathcal{V} with respect to the infected variables, both evaluated at the DFE. The next-generation matrix is K=FV1,K = F V^{-1}, and the basic reproduction number is its spectral radius (largest-magnitude eigenvalue), R0=ρ(K)=ρ ⁣(FV1).R_0 = \rho(K) = \rho\!\left(F V^{-1}\right). Here V1V^{-1} requires the matrix inverse and determinant, and ρ\rho is found from an eigenvalue decomposition.

Interpretation

The pieces have a clean meaning. V1V^{-1} is the matrix of expected times spent in each infected state: entry (V1)jk(V^{-1})_{jk} is the expected time an individual who starts in state kk spends in state jj before leaving the infected classes. Multiplying by FF, which converts time-in-state into new infections, gives Kij=expected number of new infections in group i produced by one infected introduced into group j.K_{ij} = \text{expected number of new infections in group } i \text{ produced by one infected introduced into group } j. Because the total reproduction over generations is governed by repeated multiplication by KK, the long-run per-generation growth factor is the dominant eigenvalue ρ(K)\rho(K), and the epidemic can invade the DFE if and only if R0>1R_0 > 1. This is the stability threshold of the disease-free equilibrium, restated as a spectral radius.

Worked example 1: simple SIR

For the SIR model the only infected compartment is II, with dIdt=βSNIγI.\frac{dI}{dt} = \beta \frac{S}{N} I - \gamma I. New infections appear at rate F=βSNI\mathcal{F} = \beta \frac{S}{N} I and transitions (recovery) remove them at rate V=γI\mathcal{V} = \gamma I. At the disease-free equilibrium S=NS = N, so the 1×11\times 1 Jacobians are F=β,V=γ.F = \beta, \qquad V = \gamma. Then K=FV1=β/γK = F V^{-1} = \beta/\gamma and, since a 1×11\times 1 matrix is its own eigenvalue, R0=ρ(K)=βγ,R_0 = \rho(K) = \frac{\beta}{\gamma}, recovering the familiar result.

Worked example 2: a two-type model

Suppose infection spreads in two host groups (say children and adults) that mix, and an infected in group jj transmits to group ii at rate βij\beta_{ij}, while every infected recovers at rate γ\gamma. Then F=[β11β12β21β22],V=[γ00γ]=γI2,F = \begin{bmatrix} \beta_{11} & \beta_{12} \\ \beta_{21} & \beta_{22} \end{bmatrix}, \qquad V = \begin{bmatrix} \gamma & 0 \\ 0 & \gamma \end{bmatrix} = \gamma I_2, so V1=1γI2V^{-1} = \frac{1}{\gamma} I_2 and K=FV1=1γ[β11β12β21β22].K = F V^{-1} = \frac{1}{\gamma}\begin{bmatrix} \beta_{11} & \beta_{12} \\ \beta_{21} & \beta_{22} \end{bmatrix}. R0R_0 is the spectral radius of this matrix. Take β11=2, β12=1, β21=1, β22=1\beta_{11} = 2,\ \beta_{12} = 1,\ \beta_{21} = 1,\ \beta_{22} = 1 (per unit time) and γ=1\gamma = 1. The eigenvalues of KK solve λ2(trK)λ+detK=0\lambda^2 - (\operatorname{tr}K)\lambda + \det K = 0, i.e. λ23λ+1=0\lambda^2 - 3\lambda + 1 = 0, giving λ=3±522.618, 0.382.\lambda = \frac{3 \pm \sqrt{5}}{2} \approx 2.618,\ 0.382. So R0=ρ(K)2.62R_0 = \rho(K) \approx 2.62, larger than any single group’s own βii/γ\beta_{ii}/\gamma because cross-group transmission amplifies spread.

In code

We build FF and VV, form K=FV1K = FV^{-1}, and take the spectral radius from an eigen-decomposition.

R

gamma <- 1
F <- matrix(c(2, 1,
              1, 1), nrow = 2, byrow = TRUE)
V <- gamma * diag(2)

K <- F %*% solve(V)
R0 <- max(abs(eigen(K)$values))
$R0                       # ~2.618 = (3 + sqrt(5)) / 2

Python

import numpy as np

gamma = 1.0
F = np.array([[2., 1.],
              [1., 1.]])
V = gamma * np.eye(2)

K = F @ np.linalg.inv(V)
R0 = max(abs(np.linalg.eigvals(K)))
print(R0)               # ~2.618, the spectral radius of F V^{-1}
2.618033988749895

Julia

using LinearAlgebra

γ = 1.0
F = [2.0 1.0;
     1.0 1.0]
V = γ * I(2)

K = F * inv(Matrix(V))
R0 = maximum(abs.(eigvals(K)))
println(R0)             # ~2.618 = (3 + √5)/2

Why it matters

The next-generation matrix is the standard tool for computing R0R_0 in any structured epidemic model — age groups, spatial patches, vector-borne cycles, or staged infections like SEIR. It turns the vague notion of “average secondary cases” into a precise spectral quantity whose value above or below 11 decides invasion, and its dominant eigenvector tells you which mix of host types the epidemic will settle into. Because R0=ρ(FV1)R_0 = \rho(FV^{-1}) crosses 11 exactly when the disease-free equilibrium loses stability, it is also the parameter that drives the transcritical bifurcation between elimination and endemicity.