The Lotka–Volterra Predator–Prey Model, Explained
After reading this you will know how the four Lotka–Volterra rates drive boom-and-bust cycles, how to read the phase-plane orbit and the time series, and where the model tells you the truth and where it lies.
What the model is, with one hook
Picture a meadow with hares and lynx. The hares eat grass and breed. The lynx eat only hares. When hares are plentiful, lynx breed well and their numbers climb. As lynx numbers rise, they eat hares faster than the hares can replace themselves, so hares crash. With little food, the lynx starve and their numbers crash too. Now hares are free to breed again, and the whole cycle repeats.
The Lotka–Volterra model captures that story with two coupled differential equations and four rate constants. The striking result is that the cycle never stops. There is no damping, no settling to a steady number. Once you pick a starting pair of populations, the system loops around the same closed curve forever. That is the hook and also the warning: real ecosystems do settle or collapse, but this idealized model does not.
When to use it and when not
Use this model to build intuition about two facts. First, that predator and prey can oscillate without any external forcing, purely from the feedback between them. Second, that the predator peak lags the prey peak. Those two lessons transfer to many real systems even when the exact numbers do not.
Do not use it to predict a real population. The model assumes prey grow without limit when predators are absent, that predators and prey meet in proportion to the product of their densities, and that no other species, disease, weather, or space matters. Those assumptions fail in the field. The famous hare-lynx fur-trade records from the Hudson's Bay Company do oscillate on roughly a ten-year period, but the fit to Lotka–Volterra is loose.
The classic model has no carrying capacity. Set predation to zero and the prey grow exponentially toward infinity. If you want prey that level off on their own, you need the logistic variant, which is a different equation.
The equations and what each symbol means
Let x be the prey population and y the predator population. The two rates of change are:
Prey grow at rate \alpha on their own (the \alpha x term) and are lost when they meet predators (the \beta x y term). The product x y counts encounters: double either population and encounters double.
Predators are born only in proportion to how much prey they eat (\delta x y) and die at a steady rate \gamma when there is nothing to eat (-\gamma y). Note that \delta is usually smaller than \beta: many prey eaten produce fewer new predators.
- \alpha (prey growth)
- How fast prey breed with unlimited food and no predators. Units of 1/time.
- \beta (predation)
- How efficiently predators remove prey per encounter.
- \delta (predator gain)
- How efficiently eaten prey turn into new predators.
- \gamma (predator death)
- How fast predators die without food.
The equilibrium and the closed orbit
Set both derivatives to zero. Besides the trivial extinction point (0,0), there is one coexistence equilibrium where both populations hold steady:
Notice the crossover. The steady prey level depends on the predator rates, and the steady predator level depends on the prey rates. That surprises many people. If predators die faster (larger \gamma), the steady prey count rises, because it takes more prey to sustain the hungrier predators.
Start anywhere other than the equilibrium and the state (x, y) traces a closed loop around it. The loop is fixed by a conserved quantity, a value that stays constant along any single orbit:
Because V never changes, the orbit can never spiral in or out. That is the mathematical reason the cycles never damp.
Reproducing the demo run
The demo uses \alpha = 1.1, \beta = 0.4, \delta = 0.1, \gamma = 0.4, with starting populations x = 10 prey and y = 10 predators.
- Equilibrium prey: x^{*} = \gamma/\delta = 0.4/0.1 = 4.
- Equilibrium predators: y^{*} = \alpha/\beta = 1.1/0.4 = 2.75.
- At the start, prey change is 1.1 \cdot 10 - 0.4 \cdot 10 \cdot 10 = 11 - 40 = -29. Prey are falling fast because 10 predators is well above the steady 2.75.
- Predator change is 0.1 \cdot 10 \cdot 10 - 0.4 \cdot 10 = 10 - 4 = +6. Predators are still rising because 10 prey is above the steady 4.
So the run opens with prey crashing while predators still climb. That mismatch in signs is exactly what produces the quarter-cycle lag: each population turns around at a different moment. The simulator advances these derivatives with fourth-order Runge–Kutta, which keeps the orbit from drifting outward as a crude Euler step would.
Reading the two plots
The time series shows both curves against time. Look for three things. The period is the time between successive prey peaks: in the demo it is roughly 5 time units. The amplitude is how high and low each curve swings, and it depends entirely on your starting point relative to equilibrium. The phase lag is the gap between the prey peak and the following predator peak, always about a quarter of the full period.
The phase plane plots predators against prey, with time hidden. A single orbit is one closed loop that runs counterclockwise around the marked equilibrium at (4, 2.75). Start closer to the center and the loop is small and nearly elliptical. Start far out, as the demo does at (10, 10), and the loop is large and lopsided, hugging the axes where one population nearly vanishes.
Common mistakes
The first mistake is expecting the cycles to settle. They will not. If your orbit slowly grows or shrinks on screen, that is numerical error in the integrator, not biology. Fourth-order Runge–Kutta at a small step keeps this tiny, which is why the tool uses it instead of a plain Euler step that visibly spirals outward.
The second mistake is confusing \beta and \delta. They both multiply the encounter term x y, but \beta is prey lost per encounter and \delta is predators gained per encounter. Swapping them moves the equilibrium and changes the whole picture.
The third mistake is reading a large amplitude as instability. A big loop is not unstable, it is just a start far from equilibrium. Nothing pushes the system away, and nothing pulls it back.
To find the period without solving anything, look at the time series and measure peak to peak. Near the equilibrium the period approaches 2\pi / \sqrt{\alpha \gamma}. For the demo that is 2\pi / \sqrt{1.1 \cdot 0.4} \approx 9.47 for small loops, and the large demo orbit runs a bit longer.
Related simulations on this site
If interacting populations interest you, two other models on this site use the same idea of tracking group sizes that change through contact. The SIR Epidemic Simulator tracks susceptible, infected and recovered people with an infection term that looks a lot like the predation term here, though an epidemic burns out instead of cycling forever. The Traffic Jam Simulator uses discrete rules rather than differential equations, but it shows the same lesson: simple local interactions produce large collective patterns that no single agent intends.
Frequently asked questions
Why do the predators peak after the prey?
Predators grow only after prey are abundant, so their rise trails the prey rise. By the time predators peak, they have already eaten the prey down, which is why the prey crash comes first and the predator crash follows about a quarter cycle later.
Why don't the cycles ever calm down?
The classic Lotka–Volterra model conserves the quantity V = \delta x - \gamma \ln x + \beta y - \alpha \ln y along each orbit. Because that value cannot change, the orbit cannot spiral inward to the equilibrium. Adding prey crowding (a logistic term) does make the cycles damp, but that is a different model.
What happens if I start exactly at the equilibrium?
Nothing moves. At (\gamma/\delta, \alpha/\beta) both derivatives are zero, so the populations sit still forever. Any tiny nudge starts a small loop around that point.
Can a population go to zero in this model?
Not from a positive start. The orbits can dip very close to zero, but the \ln x and \ln y terms in the conserved quantity blow up as either population approaches zero, which fences the orbit away from the axes. Real populations that get that low would go extinct by chance, a feature this smooth model ignores.
How accurate is the fourth-order Runge–Kutta integration?
Its error per step scales with the step size to the fifth power, so halving the step cuts error roughly by a factor of 32. At the step this tool uses, one loop closes on itself to within a fraction of a percent, which is why the orbit looks like a clean closed curve rather than a slow spiral.