In Ensemble theory we have seen how the tools of statistical mechanics allow us to interpret and explain in a new and elegant way the statistical "origin" of thermodynamics, and how to derive all the interesting properties of a thermodynamic system. Very briefly, in general terms the whole philosophy of what we have seen can be summarized as follows: given a finite-sized system, in general its Hamiltonian can be written in the form:

where are called coupling constants (which generally are external parameters that can be controlled experimentally) and local operators, which are combinations (normally linear or quadratic, but in general they can be any function) of the degrees of freedom of the system considered (such as the positions and momenta of the particles in a gas, for example). Then, we define the (canonical) partition function of a system as:
where the trace is a general way to express the sum (or integral, depending on the discrete or continuous nature of the system) over all the degrees of freedom, and then the free energy is defined as:
The thermodynamic properties of the system can be obtained taking appropriate derivatives of once the thermodynamic limit has been taken.

We now stop for a moment in order to study this concept, since we have not seen it explicitly before. We know that the free energy of a system is an extensive quantity; if we call a characteristic length of our system and its dimensionality we will have that the volume and the surface of the system will be proportional to appropriate powers of :

Therefore we expect that for a finite system:
where is the bulk free energy density and the surface free energy density. The thermodynamic limit of the bulk free energy density is defined as:
when this limit exists and is independent of the region where we have defined our system. Similarly, the thermodynamic limit of the surface free energy density is defined as:
when this limit exists and is independent of the region where the system is defined. Of course, sometimes some other constraints must be put in order to take meaningful limits: for example, for a fluid system the limit per se would be rather unreasonable unless we simultaneously take the limit so that the density of the system remains constant. The existence of the thermodynamic limit for a system is absolutely not trivial, and its proof can sometimes be really strenuous. In particular, it can be shown that in order for a thermodynamic limit to exist the forces acting between the degrees of freedom of the system must satisfy certain properties, for example being short ranged. For example, if a -dimensional system is made of particles that interact through a potential of the form:

where is the distance between two particles, then it can be shown that the thermodynamic limit of the system exists if .