# A bridge between the microscopic and the macroscopic

The fundamental question from which statistical mechanics has risen is the following: *where does thermodynamics come from?*
In fact, we know that fluids and gases are made of particles (atoms or molecules) and in principle we could use the tools of classical mechanics in order to study their motion; therefore, we could theoretically describe the system at least from a microscopic perspective. We can however wonder how this microscopic point of view is related to the macroscopic description of systems given by thermodynamics. In other words: how do the thermodynamic laws we know come from the microscopic motion of particles?
What we want to do now is exactly to establish this link, i.e. to derive the thermodynamics of a macroscopic system at equilibrium from its microscopic properties. This is the final purpose of equilibrium statistical mechanics.
We now therefore outline the general theoretical framework that will be needed in order to develop this theory.

Let us consider an isolated system composed of particles, with volume and energy . Since it is isolated its energy, momentum and angular momentum are conserved; however, considering the system as fixed and still we can set and so that the energy is its only non null conserved quantity. If we call and , respectively, the position and momentum of the -th particle the dynamics of the system can be obtained from its Hamiltonian:

- The number of particles in the system is insanely huge, in general of the order of Avogadro's number, i.e. . We therefore should solve a system of approximately coupled differential equations, which is rather impossible (also from a computational point of view)

- Even if we could solve them the solutions of Hamilton's equations would give no significant information about the system; for example it is much more interesting to know the average number of particles that hit a wall of the system per unit time than knowing exactly which particle hits the wall at a given instant

Furthermore a lot of interesting systems exhibit chaotic behaviours, namely their time evolution depends strongly on initial conditions making essentially useless any exact solution of Hamilton's equations.

Therefore, it is clear how a *statistical* treatment of many-particle systems is essential in order to obtain relevant information and ultimately derive their thermodynamics.
The fundamental concept that allows one to develop such statistical description is that of *ensemble*, which we now introduce.
Consider the generic many-particle system that we have introduced earlier, and for the sake of simplicity call and the set of all the coordinates and momenta of the particles. The -dimensional spaces where and live are called, respectively, *configuration* and *momentum space*, while the -dimensional space where lives is called *phase space* of the system, often referred to as .
Once all the positions and momenta of the particles have been given (i.e. once we have all the possible information about its microscopic configuration) the whole system is identified with a unique point in phase space, sometimes called *microstate* or *representative point* of the system, and as the system evolves (i.e. the particles move, thus changing their positions, and interact with each other, thus changing their momenta) this point moves in phase space describing a trajectory. The exact solution of Hamilton's equations for this system would give us the expression of this trajectory, but as we have seen before this is not a really useful information.
We therefore change point of view: if we look at our system under a "macroscopic perspective", in general it will be subjected to some constraints like the conservation of energy (in case it is isolated) or the conservation of volume etc., and therefore the macroscopic properties of a system have precise values. This suggests that we can define a *macrostate* of the system, i.e. describe it only with some of its bulk properties (which is exactly the approach of thermodynamics).
We thus have two substantially different ways to describe the same system: a macroscopic and a microscopic one.
Now, for a given macrostate of the system there will be multiple microstates which are compatible with the first one, namely there are many microscopic configurations of the system that satisfy the same macroscopic constraints (have the same energy, volume etc.) and obviously they are all equivalent from a macroscopic point of view.
The set of all the possible microstates which are compatible with a given macrostate of the system is called *ensemble*.

The approach of statistical mechanics consists, essentially, in studying the *average* behaviour of the elements of an ensemble rather than the *exact* behaviour of a single particular system.

Depending on the constraints set on a system its ensemble changes name, and in particular there are three kind of ensembles:

**microcanonical ensemble**: when the system is completely isolated and has fixed values of energy , volume and number of particles**canonical ensemble**: when the system can exchange energy with its surroundings

**grand canonical ensemble**: when the system can exchange energy and particles with its surroundings

We will now proceed to study the properties of such ensembles and see how we can link them with thermodynamics.