In statistical thermodynamics, entropy (usual symbol S) is a measure of the number of microscopic configurations Ω that a thermodynamic system can have when in a state as specified by some macroscopic variables. Specifically, assuming that each of the microscopic configurations is equally probable, the entropy of the system is the natural logarithm of that number of configurations, multiplied by the Boltzmann constant kB (which provides consistency with the original thermodynamic concept of entropy discussed below, and gives entropy the dimension of energy divided by temperature). Formally,
For example, gas in a container with known volume, pressure, and temperature could have an enormous number of possible configurations of the collection of individual gas molecules. Each instantaneous configuration of the gas may be regarded as random. Entropy may be understood as a measure of disorder within a macroscopic system. The second law of thermodynamics states that an isolated system's entropy never decreases. Such systems spontaneously evolve towards thermodynamic equilibrium, the state with maximum entropy. Non-isolated systems may lose entropy, provided their environment's entropy increases by at least that amount. Since entropy is a function of the state of the system, a change in entropy of a system is determined by its initial and final states. This applies whether the process is reversible or irreversible. However, irreversible processes increase the combined entropy of the system and its environment.
The change in entropy (ΔS) of a system was originally defined for a thermodynamically reversible process as