How do you measure whether a system is chaotic?

A practitioner’s guide to the Lyapunov exponent — what it is, how to read it, and the three mistakes that make people misread it. Worked through a concrete rotational-dynamics example, with the actual numbers.


The question behind the question

“Is this system chaotic?” is asked far more often than it is answered correctly, because the word chaotic gets used for three different things that need to be kept apart:

  1. It looks complicated. Lots of motion, hard to follow by eye.
  2. It is unstable. Small disturbances grow — at least locally, near some equilibrium.
  3. It is genuinely unpredictable. Errors in the initial state grow exponentially, so long-term prediction has a hard horizon.

Only the third is what “chaos” means technically, and the first two are routinely mistaken for it. A system can look wild and be perfectly predictable; a system can have an unstable equilibrium and still be globally regular. The instrument that separates the three is the Lyapunov exponent, and the point of this article is to make you fluent in reading it.

The definition you can actually use

Take the system, and take a virtual second copy starting an infinitesimal distance δ0 away. Evolve both. Measure the separation δ(t). The Lyapunov exponent λ is the average exponential growth rate:

δ(t) ∼ δ0 eλt.

  • λ > 0 → chaotic. Prediction horizon ~ 1/λ: that is the timescale on which an initial error grows by a factor of e. Past a few multiples of it, the forecast is worthless no matter how good your model.
  • λ = 0 (with bounded motion) → regular / integrable. Errors grow slowly (polynomially), prediction stays tractable indefinitely.
  • λ < 0 → the system is settling onto an attractor (dissipative).

For a conservative (energy-preserving) mechanical system the exponents come in  ± λ pairs that sum to zero — a useful sanity check we’ll come back to.

The number is computed, not guessed: the standard method (Benettin et al., 1980) propagates a small set of perturbation vectors alongside the trajectory and periodically re-normalises them, accumulating their stretching rates. It is robust and decades-old; the engineering challenge is reading the output correctly, not producing it.

A worked example: a tumbling body near a planet

Take a rigid body — think of a small spacecraft — tumbling near a much larger mass. Three configurations, three answers. The numbers below are from an open reference implementation (links at the end); they’re real, not illustrative.

Case 1 — free tumble (the wing-nut). An asymmetric body spun near its middle axis, no external torque. This is the famous flip-flip-flip instability (the tennis-racket effect). It looks chaotic. Measured Lyapunov exponent: ≈ 0 (a residual 2.3 × 10 − 4 s − 1 that keeps shrinking the longer you integrate). Verdict: not chaotic. The tumble has a closed-form solution; it is fully predictable. This is mistake #1 — looks complicated — caught red-handed.

Case 2 — gentle rocking (libration). The body rocking back and forth about a stable orientation, like a pendulum that never goes over the top. Measured exponent: 2.4 × 10 − 6 s − 1, more than 200× below the rocking frequency. Verdict: not chaotic. Oscillating is not diverging. This is mistake #2 — confusing oscillation frequency with instability rate.

Case 3 — tumble + gravity-gradient coupling. The same near-middle-axis tumble, but now with the orientation-vs-position coupling (the gravity gradient) switched on. Measured exponent: 1.5 × 10 − 5 s − 1 > 0. Verdict: chaotic — weakly. The prediction horizon 1/λ is about 18 hours; the chaos is a thin layer, not a violent storm, but it is real and positive. Only when the coupling destroyed a conserved quantity did genuine unpredictability appear.

That is the diagnostic in action: same body, three regimes, and the Lyapunov exponent is the only one of the three “is it chaotic?” intuitions that gets all three cases right.

The three mistakes, stated plainly

A field-guide you can keep:

Symptom Wrong reading Right reading
Motion looks wild/complex “It’s chaotic” Complexity ≠ chaos. The wing-nut is integrable. Measure λ.
There’s an unstable equilibrium “It’s chaotic” Local instability ≠ global chaos. The torque-free middle-axis is unstable yet the motion is integrable.
Something oscillates fast “λ ≈ that frequency” Oscillation frequency and λ are different observables. A librating system has λ ≈ 0 at any rocking rate.

How to read a computed Lyapunov spectrum without fooling yourself

Three practical cautions, learned the hard way on the example above:

1. Integrable systems converge slowly — don’t over-tighten the threshold. For a regular system the finite-time exponent decays to its true value 0 only as O(log T/T). You will see something like 2 × 10 − 4 at a run length where you hoped for 10 − 8. That is not your code failing; it is the physics. Judge “is this zero?” against the relevant dynamical frequency of the system, not against literal zero — and set your pass/fail gate accordingly (we use 10 − 3, not 10 − 8).

2. The slow convergence is usually intrinsic, not a coordinate artefact. It is tempting to blame your choice of variables for slow convergence and assume a fancier method will fix it. On our example it did not: a geometry-respecting reformulation gave the same slow decay, proving the effect was in the dynamics, not the bookkeeping. Test that assumption before you act on it — the fancier method may be solving a different problem than the one you blamed it for.

3. Check the spectrum sums to ~0 (conservative systems). If you compute the full spectrum and it doesn’t sum to zero, you probably have spurious non-physical directions polluting it (in our case, two artificial modes from an over-large coordinate space). The fix is to compute in the genuinely dynamical subspace. The  ± λ pairing and the zero-sum are free, built-in sanity checks — use them.

The takeaway for an engineering audience

If you take one operational rule from this: before calling a system chaotic, compute λ, and before trusting λ, check it against a case whose answer you already know. Calibrate on the integrable limit (should give ~0), on a known-oscillatory limit (should give ≪ frequency), and on a known-chaotic limit (should give a stable positive value). A Lyapunov pipeline that has only ever been run on the system under study is a thermometer that has never seen ice or boiling water. The three-case calibration above is the whole discipline in one habit.

And the deeper lesson, the one worth carrying past the spacecraft: a system can be fully deterministic — governed by exact, known equations — and still be unpredictable in practice, because the information needed to forecast it grows faster than any instrument can supply. Knowing the law is not the same as being able to use it indefinitely. The Lyapunov exponent is the number that tells you, precisely, where that line falls.


Going further. This article is the practitioner’s-eye view. For the first-principles derivation — the Lyapunov algorithm, the integrability criterion, and the full three-case calibration with every number — see the canonical chapter: docs/canonical/en/07-lyapunov-spectrum.md in https://github.com/lege-artis/jwst-l2-coupled-dynamics (Czech translation: docs/canonical/cs/07-ljapunovovo-spektrum.md). To run the tools yourself — which function to call, how to read the output, the gotchas above in code form — see the engineer-tier how-to: docs/engineer/en/07-lyapunov-howto.md in the same repository.

References

  • G. Benettin, L. Galgani, A. Giorgilli & J.-M. Strelcyn, “Lyapunov Characteristic Exponents…,” Meccanica 15, 9–30 (1980).
  • C. Skokos, “The Lyapunov Characteristic Exponents and Their Computation,” Lecture Notes in Physics 790 (2010).
  • L. D. Landau & E. M. Lifshitz, Mechanics Vol. 1, 3rd ed., 1976, §37.
  • P. C. Hughes, Spacecraft Attitude Dynamics, 2004.

Part of an applied-mathematics teaching series: tools that turn a vague engineering question into a number you can compute and check.