An Introduction to Master Equations
This post references material from TAME course materials by Laurent Hébert-Dufresne and Guillaume St-Onge.
1. What is ?
Consider a system whose condition can be summarized by a single integer — the count of particles, infected agents, voters holding a given opinion, and so on. Define as the probability that the system is in state at time .
A useful mental image: imagine running infinitely many identical but independent copies of the system in parallel. At any moment, is simply the fraction of those copies that find themselves in state . We are not following a single trajectory — we are following the entire distribution of trajectories.
To model any system with master equations, three questions must be answered before writing a single equation:
- Q1 What are the available states? Define the full set of values can take.
- Q2 What transitions are possible? Which pairs of states are connected by an event?
- Q3 At what rates do they occur? Assign a transition rate to every arrow.
2. Conservation of probability
The distribution must satisfy normalization at every instant:
Because this holds for all time, the sum is a constant. The derivative of a constant is zero, so differentiating both sides gives:
This is a powerful consistency check. In a master equation, every probability current appears exactly twice across the full system — once as a loss from state , and once as a gain to state . The two contributions cancel in the sum, so the constraint is satisfied automatically by any correctly written master equation.
3. The bookkeeping principle
The master equation for state is built entirely from probability currents in and out of that state:
In practice this reduces to a simple rule that applies to every state in every model:
- 01 Leaving in any direction → loss. Subtract the transition rate multiplied by .
- 02 Entering from any direction → gain. Add the transition rate (evaluated at the originating state) multiplied by the neighboring or .
- 03 Respect boundaries. If a neighboring state does not exist (e.g., when ), that term simply drops out. The boundary is enforced by the physics, not by adding extra rules.
In general notation:
(±) × rate(originating state) × P(originating state)
The sign is determined by direction of flow relative to the state you are writing the equation for — negative if probability is leaving, positive if it is arriving. The rate and the distribution are both evaluated at the state the probability is departing from, not where it is going.
4. Worked example: Birth-death process
Particles are created at a constant rate from a reservoir and each existing particle disappears independently at rate . This is the simplest non-trivial system that exhibits both boundaries and state-dependent rates, making it an ideal first example.
Answering the three questions:
| Question | Answer |
|---|---|
| States | |
| Transitions | (birth), (death, only if ) |
| Rates | Birth: (constant, from reservoir). Death: (each of the particles dies at rate ). |
The death rate deserves a moment's attention. Each particle dies independently, so with particles present there are independent chances for a death event. The total rate is summed times. Birth, by contrast, comes from an external reservoir rather than from the particles themselves, so its rate is a flat regardless of .
Applying the bookkeeping principle to each state gives two cases. When the state below does not exist — there are no particles to kill — so the gain term has nothing to attach to and drops out entirely:
Read term by term: is the loss from a birth event pushing the system up to state 1; is the gain from the system being at state 1 and its single particle dying. The term is a gain to state 0 — it originates elsewhere and arrives here. For all :
5. Example: The Voter Model
agents each hold one of two opinions: For (F) or Against (A). At each step, a randomly chosen agent copies a randomly chosen neighbor. Let = number of F-agents.
To move from to , an F-agent must be chosen and select an A-neighbor. The rates are:
Both rates are symmetric in and — the dynamics treat F and A identically. The full master equation:
6. Example: SIS Epidemic Dynamics
agents are either Susceptible (S) or Infectious (I). Infection spreads at per-contact rate ; infected agents recover at rate . Let = number of infectious agents. The system is bounded: is a valid absorbing state (extinction) and cannot exceed .
The key structural difference from the Voter Model: already encodes the per-contact rate, so we count all S–I pairs directly (mass-action) rather than sampling one neighbor. There is no division by . The rates are:
Applying the bookkeeping principle with boundary conditions :
The mean-field limit recovers the familiar ODE by replacing the full distribution with its average:
The threshold separates extinction from endemic persistence — a result the master equation approach can derive more rigorously by examining the absorbing boundary at .