Lorenz Attractor

2025

Lorenz Attractor

Overview

The Lorenz system was developed in the early 1960s by Edward Lorenz, a mathematician and meteorologist attempting to model atmospheric convection. He formulated a simplified system of three coupled, nonlinear differential equations to describe the motion of fluid under temperature variation. What he found was surprising: even though the system was deterministic, it was extremely sensitive to initial conditions. This sensitivity became a key concept in chaos theory, showing how very small differences at the start can lead to vastly different outcomes. The resulting structure, now called the Lorenz attractor, is a well-known example of chaotic behavior in a low-dimensional dynamical system. Its characteristic butterfly-like shape traces trajectories that never settle into equilibrium and never repeat, yet always remain bounded.

The equations that define the Lorenz system are as follows:

dx/dt = σ(y − x)
dy/dt = x(ρ − z) − y
dz/dt = xy − βz

These describe the rate of change of a point moving through three-dimensional space over time. The constants σ, ρ, and β are system parameters, typically set to σ = 10, ρ = 28, and β = 8/3 to produce the classic chaotic regime. To visualize this attractor, I numerically integrated these equations using small time steps. Starting from an initial point, the system evolves in three-dimensional phase space by updating the point’s position according to the computed derivatives. By applying this process iteratively, a continuous trajectory is formed, revealing the complex internal structure of the attractor.

The trajectory is generated by computing each new point using the current position and its corresponding rate of change. This is done using the Euler method, where each step forward is calculated by adding a scaled version of the derivative to the current point. The equations do not define a path directly; they define how the system changes, and the path emerges over time. To make the attractor visible, I computed thousands of points, each one based on the system's differential rules. The resulting set of points forms a flow that spirals around two unstable fixed points, never converging, never diverging completely, but instead looping endlessly in a constrained, non-repeating orbit.

To better visualize the system, I created multiple trajectories with slightly different starting conditions. This reveals the system’s sensitivity: even points that begin close together quickly diverge, tracing out distinct paths within the same global structure. By assigning color gradients to these paths based on time, I can emphasize the flow and evolution of the system. The attractor is not just a figure, but a record of how change propagates in a nonlinear system. Each line represents a solution to the Lorenz equations, and together they form a window into the mathematics of instability, revealing the hidden order that arises when simplicity meets complexity.

You can find my code repository here.