Liouville’s theorem states that the density of systems in the neighborhood of some given system in phase space remains constant over time. This is a fundamental theorem of statistical mechanics, stating that it is often impractical to calculate an exact solution for complex systems. It would not be efficient to calculate completely the motion of, for example, 10^{18} atoms or molecules in a volume of gas. Statistical mechanics makes no attempt to obtain a complete solution for systems containing many particles. Instead, the aim of statistical mechanics is to make predictions about certain average properties by looking at the motion of a large number of identical systems. Since each system is represented by a single point in phase space (position q_{i} vs momentum p_{i}), the ensemble of systems correspond to a swarm of points in phase space.

The density, D, in Liouville’s theorem can vary with time through two separate mechanisms. For example, if this density is in the neighborhood of a given system point, then there will be an implicit dependence as the coordinates of the system (q_{i}, p_{i}) vary with time, and the point works its way through phase space. There could also be an explicit dependence on time. The density may still vary with time even when evaluated at a fixed point in phase space. The total time derivative od D, due to both types of variation with time, is defined as:

dD/dt = [D,H] + ∂D/∂t

where the Poisson bracket arises from the implicit dependence, this equation also has the form of Hamilton’s equation. The ensemble of system points moving through phase space behaves much like a fluid. The total derivative is a derivative of the density of the motion of a particular particle of the ensemble fluid in time. The partial derivative is at fixed (q, p), it is as if you position yourself at a particular spot in phase space and measure the time variation of the density as the ensemble of system points flows by. These two derivatives correspond to tow viewpoints when considering fluid flow.

Consider an infinitesimal volume in phase space surrounding a given system point, with the boundary of the volume formed by some surface of neighboring system points at time t = 0. Over time, the system points defingin the volume move about in phase space and the volume contained by them will take on different shapes. Figure 1 describes this motion and shows the evolution of the infinitesimal volume with time.

The number of systems within the volume remains constant. The system can never leave the volume, and a system outside of this system can never enter the volume. Poincare’s integral invariant says that a volume element in phase space is invariant under a canonical transformation. Therefore, the size of the volume element about the system point cannot vary with time. Thus, both the number of systems in the infinitesimal region, dN, and volume, dV, are constants, and the density:

D = dN/dV

must also be constant in time:

dD/dt = 0

thus proving Liouville’s theorem. To summarize, an ensemble of states occupies a particular volume of phase space at one moment, then subsequent evolution of that volume by the flow described by Hamilton’s equation may distort the ensemble but does not change the volume the ensemble occupies.