We now introduce the following postulate, that will allow us to solve the general problem of thermodynamics:
Given a thermodynamic system there exists a state function
called entropy, depending on the variables
and which is extensive, convex, monotonically increasing with respect to the internal energy
and such that the equilibrium states of the system are its maxima, compatibly with the constraints put on the system itself.
The assumption that
is a monotonically increasing function of the internal energy
implies (Dini's theorem) that it is locally invertible; namely we can write at least locally
as a function of
and the other thermodynamic variables:

From now on we will consider systems characterized by the internal energy

, the volume

and the temperature

(also called
systems).
It can also be shown that

vanishes if and only if

, and since

we have:

These derivatives of

are intensive quantities
[1], defined as:

where

is the temperature of the system,

its pressure and

its
chemical potential (note that from what we have previously stated,

if and only if

).
We thus have:

and the equations:

are called
state equations, which are the relations we were looking for that bound the thermodynamic variables of a system.
Let us note that once the entropy
of a system is known, all its thermodynamics can be straightforwardly derived: it is in fact sufficient to invert
and express
as
and then take some derivatives in order to obtain all the state equations of the system.
Let us also briefly see that, for example,
is indeed the temperature of a system, namely that if two systems with different temperatures are allowed to exchange internal energy they will finally reach an equilibrium where both have the same temperature. Let us call 1 and 2 these systems, which can be represented for example by two compartments of a box, each of volume
, containing
particles of gas (not necessarily of the same kind), at temperature
and with internal energy
(with
), separated by a wall that allows the exchange of heat (namely internal energy), but not particles (it's impermeable) or volume (it's fixed).
Once the systems are in thermal contact, they will reach a new equilibrium, which will be a maximum for the entropy, namely
in the final state. However, since the whole system is isolated the total internal energy
must remain constant in the process. Thus (remembering that
):


and since

is an arbitrary (non null) quantity, in the final state we have:

and so the two systems will have the same temperature.
It can also be shown that the flow of heat goes, as intuition suggests, from the hotter to the colder system.
- ↑ Since they are derivatives of a homogeneous function of degree one, they are homogeneous functions of degree zero.