The Lorenz Attractor, Explained

After reading this you will be able to write down the three Lorenz equations, integrate them by hand for a few steps, understand why nearby trajectories peel apart onto opposite wings, and read the butterfly picture the tool draws.

What the Lorenz system is

In 1963 Edward Lorenz was modelling convection in a layer of fluid heated from below. He kept just three numbers: one for the speed of the rolling motion, and two for the temperature pattern. The result was three coupled ordinary differential equations. He integrated them on an early computer and found a solution that never settled to rest, never repeated, and never flew off to infinity. Instead it looped forever on a thin surface shaped like a pair of butterfly wings.

That surface is a strange attractor. "Attractor" means nearby starting points get pulled toward it. "Strange" means the motion on it is chaotic: deterministic, bounded, and yet impossible to predict far ahead. The tool integrates the equations and draws the trajectory as a ribbon you can rotate.

Here is the hook. Start two points a millionth of a unit apart. For a while they trace the same curve and you cannot tell them apart. Around t = 20 in the classic settings they sit on opposite wings, fully separated. Nothing random happened. The same equations, run from almost the same place, produced almost opposite answers.

When this model helps and when it misleads

Use the Lorenz system to build intuition about three ideas: sensitive dependence on initial conditions, the difference between "deterministic" and "predictable", and how a smooth flow can fold space into a fractal. It is the cleanest concrete example of each.

Do not use it as a weather model. Lorenz threw away almost everything real weather contains. The three variables have no direct meaning as wind or rain. The lesson that transfers is the negative one: because real atmospheric models share the sensitive dependence you can watch here, small measurement errors grow, and forecasts past roughly two weeks are worthless no matter how good the computer.

The Lorenz attractor is a toy. Its value is that every claim it makes can be checked with a few multiplications, so the mechanism of chaos is visible rather than hidden inside a supercomputer.

The three equations and what each term does

\frac{dx}{dt} = \sigma (y - x)
\frac{dy}{dt} = x (\rho - z) - y
\frac{dz}{dt} = x y - \beta z

The three state variables x, y, z together give a single point in space. As time t advances, that point moves, and the path it draws is the attractor.

The parameters set the character of the flow:

\sigma (sigma)
The Prandtl number. It controls how fast x chases y. The classic value is 10.
\rho (rho)
The Rayleigh number, the strength of the heating. This is the interesting dial. The classic value is 28.
\beta (beta)
A geometric factor. The classic value is 8/3 \approx 2.667.

Read the terms as feedback. The first equation says x is pulled toward y at rate \sigma. The second says y grows in proportion to x but is suppressed once z exceeds \rho. The third says z is fed by the product xy and drained at rate \beta. The nonlinear products xz and xy are what make the system fold and give chaos its room.

Fixed points: where the flow could stand still

Set all three derivatives to zero and you find the resting states. The origin (0, 0, 0) is always one. For \rho \gt 1 two more appear, one in each future wing:

x = y = \pm \sqrt{\beta (\rho - 1)}, \quad z = \rho - 1

With the classic numbers this gives \sqrt{(8/3)(27)} = \sqrt{72} \approx 8.485 and z = 27. So the two centres sit near (8.485, 8.485, 27) and (-8.485, -8.485, 27). The trajectory circles one of these, then flips to circle the other. Those centres are the eyes of the two wings.

The key fact: above \rho \approx 24.74 all three fixed points are unstable. The flow is repelled from every resting place it has, yet cannot leave a bounded region. Trapped and pushed at once, it wanders forever. That is the mechanical origin of the chaos.

A worked example reproducing the demo

Four Euler steps from the default start

The demo uses the classic parameters \sigma = 10, \rho = 28, \beta = 8/3, starting near (1, 1, 1). Integrate with the plain forward Euler rule and a step of h = 0.01. The tool uses a smaller step and a better integrator, but Euler is easy to check by hand.

x_{n+1} = x_n + h \cdot \sigma (y_n - x_n)
  1. Start: (1, 1, 1). Derivatives: dx = 10(1-1) = 0, dy = 1(28-1) - 1 = 26, dz = 1·1 - (8/3)(1) = -1.667.
  2. Step 1: x = 1 + 0.01·0 = 1.000, y = 1 + 0.01·26 = 1.260, z = 1 + 0.01·(-1.667) = 0.9833.
  3. Now dx = 10(1.260 - 1.000) = 2.600, dy = 1.000(28 - 0.9833) - 1.260 = 25.76, dz = 1.000·1.260 - 2.667·0.9833 = -1.362.
  4. Step 2: x = 1.026, y = 1.518, z = 0.9697.
  5. Step 3 derivatives: dx = 10(1.518 - 1.026) = 4.920, so x = 1.075; y rises to about 1.788; z drifts to 0.958.

Notice how y shoots up first (the heating term \rho x dominates), then x starts to follow, then z begins to climb as the product xy grows. Repeat a few thousand times and the point spirals out to one wing, then flips to the other. Doing this by hand is tedious but every line is one multiplication you can verify.

The z coordinate over time. It oscillates between two bands, one for each wing, jumping across at irregular intervals. There is no period: the sequence of jumps never repeats.

Reading the butterfly and the parameter dial

Rotate the ribbon and you see two nearly flat spiral discs joined at a saddle. Each disc is a wing, wrapped around one of the fixed points near (±8.485, ±8.485, 27). The trajectory spirals outward on one wing, and when it gets far enough out it crosses the middle and drops onto the other wing. The number of loops before a crossing looks random. It is not: it is fully determined, just too sensitive to predict.

The single most instructive move is dragging \rho. The behaviour changes in stages:

How the classic system behaves as \rho changes (with \sigma = 10, \beta = 8/3)
Range of ρBehaviour
0 to 1Everything decays to the origin. The fluid does not roll.
1 to 24.74Settles to one of the two off-centre fixed points. Steady rolling.
24.74 to about 30Chaos on the full butterfly. This includes the classic 28.
Above 30Mostly chaos, with narrow windows of periodic orbits mixed in.

Set \rho = 22 and release a swarm of points. They all spiral into one fixed point and stop. Now nudge \rho up to 28. The same swarm never rests. Watching that switch is the fastest way to feel what the number 24.74 means.

Two trajectories start 0.000001 apart at (1, 1, 1) with the classic parameters. Their separation stays near a millionth until about t = 8, then grows roughly tenfold every 1.4 time units, reaching order 10 (the size of the attractor itself) by about t = 20, after which they are effectively independent.

Common mistakes

Confusing chaotic with random. Every point on the ribbon follows from the previous one by three fixed equations. Run the tool twice from the exact same start and you get the exact same curve. The unpredictability is about sensitivity to the start, not about any dice.

Blaming the integrator for the divergence. Two trajectories separate because of the mathematics, not because of rounding. But a coarse step does add its own error. With forward Euler at h = 0.05 the drawn curve visibly drifts off the true attractor within a few dozen steps. Use a small step or a Runge-Kutta method for a faithful shape.

Do not read meaning into the exact (x, y, z) values at large t. Past the point where trajectories have diverged, those digits reflect your starting guess and your step size, not the physics. Only the statistics of the attractor (its shape, the fraction of time on each wing, the average number of loops per crossing) are reproducible.

Expecting a period. People watch for a few minutes and think they see the pattern about to repeat. It never does. The trajectory is confined to a set of zero volume yet infinite length, and it fills that set without ever closing into a loop.

Related tools on this site

The Lorenz system is the continuous-time face of chaos. To meet the same ideas in other forms, try the Logistic map bifurcation, where a single parameter splits order into chaos through period doubling, the discrete cousin of the \rho dial here. The Magnetic pendulum fractal shows sensitive dependence painted across a whole plane of starting points. For fractal geometry generated by simple rules, see the Mandelbrot explorer and the Chaos game. Discrete deterministic systems that still surprise live in Conway's Game of Life and Elementary cellular automata. And for the contrast of genuine randomness, the Random walk explorer shows what motion driven by real dice looks like.

Frequently asked questions

Why is it called the butterfly effect?

Two reasons overlap. The attractor is shaped like a butterfly, and Lorenz gave a 1972 talk titled around the question of whether a butterfly's wings in Brazil could set off a tornado in Texas. Both point at the same fact: a tiny change in the starting state grows into a large change later. At \rho = 28 a separation of a millionth grows to the full size of the attractor in about 20 time units.

Does the trajectory ever repeat exactly?

No. For the classic parameters the motion is chaotic and never closes into a loop. If it did repeat, it would be periodic and therefore predictable. The absence of any period is part of the definition of the strange attractor.

What is a Lyapunov exponent?

It measures the average rate at which nearby trajectories separate. For the classic Lorenz system the largest exponent is about 0.9 per time unit, meaning a separation multiplies by roughly e^{0.9} \approx 2.46 each unit of time. A positive largest exponent is the numerical signature of chaos.

Can I get a fixed point instead of the butterfly?

Yes. Lower \rho below 24.74 (with the classic \sigma and \beta) and the trajectory spirals into one of the two off-centre fixed points and stops. Below \rho = 1 everything decays to the origin.

Why do long-range weather forecasts fail?

Real atmospheric models share the sensitive dependence you see here: small errors in the initial measurements grow exponentially. Once that growth reaches the scale of the weather itself, the forecast carries no information. For the atmosphere that limit is roughly two weeks, no matter how powerful the computer or how fine the grid.