A Lyapunov exponent measures how fast two nearby trajectories separate. A positive exponent means they separate exponentially, which is the working definition of chaos, and its inverse tells you how long a prediction stays useful. It is the number I reach for to answer “is this parameter set actually chaotic, or just wiggly?”
Mental Model
- Two states a distance apart drift to a distance . The exponent is the growth rate.
- means chaos, a neutral direction (a flow always has one along its own trajectory), contraction.
- An -dimensional system has exponents, called the spectrum. The largest one sets predictability.
- The sum of all exponents is the average rate at which phase-space volume shrinks.
1. Definition
For a one-dimensional map , a small error is multiplied by each step. After steps it is multiplied by , and the average log growth per step is
For a flow, compare two trajectories directly:
In higher dimensions the derivative becomes the Jacobian, and the exponents come from the growth of its product along the orbit. For the largest exponent it is enough to follow one perturbation.
2. Worked Example: Logistic Map at r=4
With we have . Averaging along an orbit of 200,000 points (after dropping 100) gives
which agrees to four digits. At the invariant density is known in closed form and the integral gives exactly : each step doubles errors on average, losing one bit per iteration. A double has 53 bits of mantissa, so a logistic-map orbit at computed in floating point is meaningful for roughly 50 iterations before the rounding error has grown to order one.
The same average at (a stable 2-cycle) is negative, and at (the period-3 window) it is also negative. The sign of along traces the bifurcation diagram, see The Logistic Map and Bifurcations.
3. Lorenz by Two-Trajectory Renormalization

Two runs that start a hundred-millionth apart look identical, then suddenly don't. On a log scale the gap grows along a straight line, and its slope is the Lyapunov exponent. Rendered from the equations on this page.
You cannot let two chaotic trajectories run apart for long: the separation saturates at the size of the attractor, and the exponential law stops. The fix is renormalization. Advance both for a short time, record the log growth, and pull the second trajectory back to distance along the line to the first.
import numpy as np
def f(s, sg=10, r=28, b=8/3):
return np.array([sg*(s[1]-s[0]), s[0]*(r-s[2])-s[1], s[0]*s[1]-b*s[2]])
def rk4(s, dt):
k1 = f(s); k2 = f(s+dt/2*k1); k3 = f(s+dt/2*k2); k4 = f(s+dt*k3)
return s + dt/6*(k1 + 2*k2 + 2*k3 + k4)
dt, d0, n = 0.01, 1e-8, 300_000
a = np.array([1.0, 1.0, 1.0])
for _ in range(5000): a = rk4(a, dt) # settle onto the attractor
b = a + np.array([d0, 0, 0])
total = 0.0
for _ in range(n):
a, b = rk4(a, dt), rk4(b, dt)
d = np.linalg.norm(b - a)
total += np.log(d / d0)
b = a + (b - a) * d0 / d # renormalize
print(total / (n * dt))For the classic constants (, , ) this prints about 0.907 over 3000 time units. The accepted value is 0.9056. Both numbers are per unit of model time, which depends on your integration scale, not seconds.
4. Lyapunov Time and the Prediction Horizon
The Lyapunov time is . For Lorenz it is about model time units, the time in which an error grows by a factor of .
If the initial error is and you tolerate an error , the prediction horizon is
With and (the size of the attractor features) this is time units. The dependence on is only logarithmic, which is the practical punchline: making a measurement a million times more precise buys you more units, about 14 Lyapunov times, not a million times longer.
Common mistake
The horizon formula uses the average exponent. Locally, errors can shrink for a while (where the attractor folds) and then grow quickly, so individual forecasts beat or miss the estimate.
5. The Spectrum and Kaplan-Yorke Dimension
The three Lorenz exponents are about . The zero is the direction along the flow. The sum equals the average divergence of the vector field, which for Lorenz is constant:
so the third exponent follows from the first two: . That constraint is what makes the attractor thin: volumes contract by per time unit while one direction stretches.
The Kaplan-Yorke dimension turns the spectrum into a fractal dimension. Sort the exponents from largest to smallest, let be the largest index for which , and set
For Lorenz, and , in line with the direct estimates of the attractor’s dimension (see Fractals and Fractal Dimension).
Related
- The Lorenz Attractor: the system measured above
- Strange Attractors Beyond Lorenz: more systems to compute exponents for
- The Logistic Map and Bifurcations: where the sign of changes
- Numerical Integration: why RK4 and small steps matter for these runs
- Dynamical Systems Basics: Jacobians and divergence