AnyLearn
All lessons
Mathintermediate

Chaos: The Lorenz System, Sensitive Dependence, and Strange Attractors

Three variables are enough for deterministic equations to become unpredictable. Work through the Lorenz system's fixed points and loss of stability, the shrinking volume behind its strange attractor, Lyapunov exponents and the predictability horizon, a measurement you can run yourself, and the period-doubling route to chaos in the logistic map.

Updated · AI-authored, review-gated · how lessons are made

Progress1 / 10

Three variables and a new kind of motion

In 1963 Edward Lorenz published "Deterministic Nonperiodic Flow" in the Journal of the Atmospheric Sciences: a drastic truncation of fluid convection down to three variables,

x˙=σ(y−x),y˙=x(ρ−z)−y,z˙=xy−βz\dot{x} = \sigma(y - x), \qquad \dot{y} = x(\rho - z) - y, \qquad \dot{z} = xy - \beta z

In the paper, xx measures the intensity of the convective rolling, yy the temperature difference between rising and falling fluid, and zz how far the vertical temperature profile is distorted from a straight line. With the values Lorenz used, σ=10\sigma = 10, β=8/3\beta = 8/3 and ρ=28\rho = 28, the solution never settles, never repeats, and yet stays inside a bounded region.

Three dimensions are the minimum. In the plane, the Poincare-Bendixson theorem forces a bounded trajectory without fixed points onto a closed orbit. In three dimensions trajectories can pass over and under one another without ever crossing, and that freedom is what chaos uses.

Sign in free to save your progress and earn certificates.

Full lesson text

All 10 steps on one page, for reading, reference, and search.

Show

1. Three variables and a new kind of motion

In 1963 Edward Lorenz published "Deterministic Nonperiodic Flow" in the Journal of the Atmospheric Sciences: a drastic truncation of fluid convection down to three variables,

x˙=σ(y−x),y˙=x(ρ−z)−y,z˙=xy−βz\dot{x} = \sigma(y - x), \qquad \dot{y} = x(\rho - z) - y, \qquad \dot{z} = xy - \beta z

In the paper, xx measures the intensity of the convective rolling, yy the temperature difference between rising and falling fluid, and zz how far the vertical temperature profile is distorted from a straight line. With the values Lorenz used, σ=10\sigma = 10, β=8/3\beta = 8/3 and ρ=28\rho = 28, the solution never settles, never repeats, and yet stays inside a bounded region.

Three dimensions are the minimum. In the plane, the Poincare-Bendixson theorem forces a bounded trajectory without fixed points onto a closed orbit. In three dimensions trajectories can pass over and under one another without ever crossing, and that freedom is what chaos uses.

2. The rounding that revealed it

The discovery came from a shortcut. According to the accounts published by APS News and MIT Technology Review, in the winter of 1961 Lorenz restarted a weather simulation from a printed midpoint. The printout showed three digits, so he typed 0.506 where the computer had held 0.506127, a change of about one part in four thousand. The rerun tracked the original for a while, then diverged until the two bore no resemblance.

Nothing was wrong with the machine. The equations themselves amplify small differences.

Definition: sensitive dependence on initial conditions means that nearby states separate exponentially fast, on average, so any error in the initial state, however small, eventually grows to the full size of the region the motion occupies.

Sensitivity alone is not chaos: x˙=x\dot{x} = x separates nearby starts exponentially too, but by running off to infinity. Chaos is sensitivity combined with confinement, so that trajectories keep diverging while folding back into the same bounded region forever.

3. Fixed points, and where they lose stability

The origin is always a fixed point: no motion, heat carried by conduction alone. For ρ>1\rho > 1 two more appear, C±=(±β(ρ−1), ±β(ρ−1), ρ−1)C^{\pm} = \left(\pm\sqrt{\beta(\rho - 1)},\ \pm\sqrt{\beta(\rho - 1)},\ \rho - 1\right), steady convection rolls turning one way or the other. At ρ=28\rho = 28 they sit at (±8.49,±8.49,27)(\pm 8.49, \pm 8.49, 27).

Range of ρ\rho, with σ=10\sigma = 10 and β=8/3\beta = 8/3Long-run behaviour
ρ<1\rho < 1origin globally stable: conduction, no convection
1<ρ<24.741 < \rho < 24.74origin unstable; steady rolls C±C^{\pm} stable
about 24.0624.06 to 24.7424.74a chaotic attractor already coexists with the stable rolls
ρ>24.74\rho > 24.74C±C^{\pm} unstable; trajectories wander on the strange attractor

The threshold is ρH=σ(σ+β+3)/(σ−β−1)≈24.74\rho_H = \sigma(\sigma + \beta + 3)/(\sigma - \beta - 1) \approx 24.74, where a pair of complex eigenvalues of the Jacobian at C±C^{\pm} crosses into the right half-plane: a subcritical Hopf bifurcation, the two-dimensional cousin of the subcritical pitchfork. The thresholds follow Strogatz's analysis in Nonlinear Dynamics and Chaos, chapter 9. With no stable fixed point and no stable cycle nearby, the motion has nowhere simple to go.

4. Shrinking volume, endless motion: the strange attractor

Add up how fast each variable's own rate responds to it, the divergence of the vector field:

∇⋅f=∂x˙∂x+∂y˙∂y+∂z˙∂z=−(σ+1+β)≈−13.67\nabla \cdot \mathbf{f} = \frac{\partial \dot{x}}{\partial x} + \frac{\partial \dot{y}}{\partial y} + \frac{\partial \dot{z}}{\partial z} = -(\sigma + 1 + \beta) \approx -13.67

It is constant and negative, so any blob of initial conditions shrinks in volume by a factor of e−13.67≈1.2×10−6e^{-13.67} \approx 1.2 \times 10^{-6} per unit time. The attractor must have zero volume. Yet trajectories on it neither converge to a point nor settle on a cycle. The resolution is a repeated geometric operation:

  1. Stretch: nearby trajectories separate along one direction.
  2. Squeeze: the flow contracts much harder in another direction.
  3. Fold: the stretched sheet bends back into the bounded region.

Repeat forever and you get a set with fractal layering, a strange attractor. From the computed Lyapunov spectrum, J. C. Sprott reports a Kaplan-Yorke dimension of about 2.06: slightly more than a surface. Whether this attractor truly exists, rather than being a numerical artefact, was settled by Warwick Tucker's computer-assisted proof, published in full in 2002.

5. Lyapunov exponents and the predictability horizon

Track a tiny separation δ\delta between two trajectories. On average it grows as

∥δ(t)∥≈∥δ0∥ eλt,thorizon≈1λln⁡a∥δ0∥\|\delta(t)\| \approx \|\delta_0\|\, e^{\lambda t}, \qquad t_{\text{horizon}} \approx \frac{1}{\lambda}\ln\frac{a}{\|\delta_0\|}

where λ\lambda, the largest Lyapunov exponent, is the separation rate averaged over the attractor, and aa is the largest error you can tolerate. For the standard Lorenz parameters, Sprott's Chaos and Time-Series Analysis (Oxford University Press, 2003) gives λ≈0.906\lambda \approx 0.906 per unit time. A positive largest exponent is the working definition of chaos.

Predict first

You improve the measurement of the initial state a millionfold. How much longer can you forecast the Lorenz system?

6. Measuring the exponent yourself

Integrate two copies of the system from states 10−810^{-8} apart and watch the gap.

import numpy as np
from scipy.integrate import solve_ivp

def lorenz(t, u, s=10.0, r=28.0, b=8/3):
    x, y, z = u
    return [s*(y - x), x*(r - z) - y, x*y - b*z]

# settle onto the attractor first
u0 = solve_ivp(lorenz, (0, 50), [1, 1, 1], rtol=1e-12, atol=1e-12).y[:, -1]

ts = np.arange(0, 41, 4.0)
kw = dict(t_eval=ts, method="DOP853", rtol=1e-12, atol=1e-12)
A = solve_ivp(lorenz, (0, 40), u0, **kw)
B = solve_ivp(lorenz, (0, 40), u0 + [1e-8, 0, 0], **kw)

sep = np.linalg.norm(A.y - B.y, axis=0)
print(np.log10(sep / 1e-8).round(2))
slope = np.polyfit(ts[:7], np.log(sep[:7]), 1)[0]
print(f"growth rate ~ {slope:.2f} per unit time")

Run as written, it reports a growth rate of 0.91 per unit time, in line with Sprott's 0.906 from a far more careful method. The tolerances matter: at SciPy's default rtol of 10−310^{-3} the per-step error allowed on values of order 10 would be around a million times larger than the 10−810^{-8} offset, and you would be measuring the solver, not the system.

7. Watching an error grow

Growth of a 1e-8 error in the Lorenz system
Orders of magnitude of growth0246810t=0t=4t=8t=12t=16t=20t=24t=28t=32t=36t=40
Source: Computed with the code in the previous step: SciPy solve_ivp, DOP853, rtol and atol 1e-12

The error grows by about nine orders of magnitude in 24 time units, close to a straight line on this logarithmic scale, which is what exponential growth looks like. Then it stops growing. A separation of 10−8×109.510^{-8} \times 10^{9.5}, about 30, is the width of the attractor itself, and two states on the attractor cannot be farther apart than that.

Key idea: after the horizon, the two runs are not slightly different forecasts. They are as unrelated as two points picked at random on the attractor. Deterministic equations have produced practical randomness.

8. Deterministic is not predictable, and unpredictable is not random

Periodic or quasiperiodicChaoticRandom noise
Ruledeterministicdeterministicstochastic
Nearby startsstay closeseparate exponentiallyno fixed trajectory to compare
Largest Lyapunov exponentzero or negativepositivenot the right tool
Short-term forecastgood indefinitelygood up to the horizonlimited to statistical correlations
Long-run statisticspredictablepredictable, from the attractorpredictable, from the distribution

The last row is the useful one. Chaos destroys individual trajectories, not statistics: the shape of the attractor and how often each region is visited are stable features of the system.

In practice: this is the logic of ensemble forecasting. Weather centres run many forecasts from slightly perturbed initial states, and the spread of the ensemble estimates how far the forecast can be trusted. A tight ensemble means a predictable situation; a fanned-out one means the horizon is near.

9. Chaos from one line: the logistic map

Lorenz noticed that successive peaks of zz obey a simple rule, zn+1=F(zn)z_{n+1} = F(z_n) for a single-humped function FF: the flow reduces to a map. Maps are where chaos is easiest to study. The canonical one, popularized by Robert May in Nature (1976), is

xn+1=r xn(1−xn)x_{n+1} = r\,x_n(1 - x_n)
Parameter rrLong-run behaviour
1 to 3a single stable fixed point at 1−1/r1 - 1/r
3 to 3.449a stable cycle of period 2
3.449 to 3.5699period 4, 8, 16 and onward, at ever closer spacing
about 3.5699accumulation point: onset of chaos
3.5699 to 4chaos, interrupted by periodic windows such as period 3 near 3.83

Mitchell Feigenbaum showed in 1978 that the ratio of successive period-doubling intervals converges to δ≈4.669\delta \approx 4.669, and that the same constant appears for any map with a single smooth, quadratic hump. That universality is why period doubling in a real fluid experiment and in a one-line equation share the same arithmetic.

10. Claiming chaos honestly

Chaos is a precise property, and the word is often used loosely. Before calling a system chaotic, check for:

  • Determinism: a model or strong evidence that the future follows from the present by a fixed rule. Noise and slow parameter drift mimic many signatures of chaos.
  • Boundedness without settling: the motion stays in a finite region but does not converge to a fixed point, a cycle, or a quasiperiodic torus.
  • A positive largest Lyapunov exponent, estimated in a way that is stable when you change the amount of data and the method.
  • Sensible numerics: tolerances tight enough that the solver's own error is far below the effect being measured.

Gotcha: a computed chaotic trajectory departs from the exact trajectory with the same starting point once round-off has grown past the horizon, because round-off is just another initial error. Long simulations are still useful for the attractor's statistics, but no simulation reproduces a specific chaotic trajectory far beyond its horizon.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. Why does chaos in a continuous-time autonomous system need at least three dimensions?
    • The Poincare-Bendixson theorem confines bounded planar trajectories to fixed points, closed orbits and connections between them
    • Two-dimensional systems cannot have fixed points
    • Two-dimensional systems are always linear
    • Three variables are needed to conserve energy
  2. A system's largest Lyapunov exponent is 0.9 per unit time. Measuring the initial state 1000 times more precisely extends the forecast horizon by about how much?
    • 1000 times
    • 3 times
    • 7.7 time units
    • Nothing at all
  3. The Lorenz flow shrinks phase-space volume at the constant rate sigma + 1 + beta. What does that imply about its attractor?
    • It fills a three-dimensional region
    • It has zero volume, even though trajectories on it never settle
    • It must be a single fixed point
    • It must be a limit cycle
  4. Which statement about chaotic systems is correct?
    • They are driven by random noise
    • Their long-run statistics cannot be predicted
    • Nearby trajectories stay close forever
    • They are deterministic, yet forecast errors grow exponentially
  5. In the logistic map, the ratio of successive period-doubling intervals converges to about 4.669. Why is this number significant?
    • It equals the parameter r at the onset of chaos
    • It is the Lyapunov exponent of the map
    • It is universal: the same for any one-hump map with a quadratic maximum
    • It is the period of the first chaotic window

Related lessons

Math
intermediate

The Phase Plane: Linear Systems, Eigenvalues, and Limit Cycles

Two variables make oscillation possible. Classify every fixed point of a linear system from its eigenvalues or from trace and determinant, linearize nonlinear systems with the Jacobian, analyse the Lotka-Volterra predator-prey model and its conserved quantity, and see why limit cycles are the robust oscillators and why the plane cannot be chaotic.

10 steps·~15 min
Math
intermediate

Flows on a Line: Fixed Points, Stability, and Bifurcations

Read a one-dimensional differential equation without solving it. Find fixed points, judge their stability from a slope, see why a line cannot oscillate, and classify the bifurcations that make a system tip. A harvested fishery shows a collapse threshold, hysteresis, and the slow recovery that warns before the jump.

10 steps·~15 min
Math
intermediate

What a Differential Equation Says: Rates, Solutions, and Slope Fields

A differential equation is a local rule for change, not a formula for the answer. Learn to read and classify one, solve the exponential and logistic cases, know when a unique solution exists, turn any order into a first-order system, and step forward numerically with Euler and Runge-Kutta.

10 steps·~15 min
Robotics
advanced

The Mathematics of Coupled Oscillators

How a handful of phase oscillators produce coordinated gaits: limit cycles and why they resist disturbance, phase coupling that locks oscillators into fixed relationships, and the travelling waves that swim a robot.

8 steps·~12 min