section_path: Theoretical foundation/Second law of thermodynamics
section_name: Second law of thermodynamics
paragraph_text: Second law of thermodynamics
  
  As an alternative to considering or defining the zeroth law of thermodynamics, it was the historical development in thermodynamics to define temperature in terms of the second law of thermodynamics which deals with entropy. The second law states that any process will result in either no change or a net increase in the entropy of the universe. This can be understood in terms of probability.
  
  For example, in a series of coin tosses, a perfectly ordered system would be one in which either every toss comes up heads or every toss comes up tails. This means the outcome is always 100% the same result. In contrast, many mixed (disordered) outcomes are possible, and their number increases with each toss. Eventually, the combinations of ~50% heads and ~50% tails dominate, and obtaining an outcome significantly different from 50/50 becomes increasingly unlikely. Thus the system naturally progresses to a state of maximum disorder or entropy.
  
  As temperature governs the transfer of heat between two systems and the universe tends to progress toward a maximum of entropy, it is expected that there is some relationship between temperature and entropy. A heat engine is a device for converting thermal energy into mechanical energy, resulting in the performance of work. An analysis of the Carnot heat engine provides the necessary relationships. According to energy conservation and energy being a state function that does not change over a full cycle, the work from a heat engine over a full cycle is equal to the net heat, i.e. the sum of the heat put into the system at high temperature, q > 0, and the waste heat given off at the low temperature, q < 0.
  
  The efficiency is the work divided by the heat input:
  
  where w is the work done per cycle. The efficiency depends only on | q |/ q. Because q and q correspond to heat transfer at the temperatures T and T, respectively, | q |/ q should be some function of these temperatures:
  
  Carnot's theorem states that all reversible engines operating between the same heat reservoirs are equally efficient. Thus, a heat engine operating between T and T must have the same efficiency as one consisting of two cycles, one between T and T, and the second between T and T. This can only be the case if
  
  which implies
  
  Since the first function is independent of T, this temperature must cancel on the right side, meaning f (T, T) is of the form g (T)/ g (T) (i.e. f (T, T) = f (T, T) f (T, T) = g (T)/ g (T) · g (T)/ g (T) = g (T)/ g (T)), where g is a function of a single temperature. A temperature scale can now be chosen with the property that
  
  Substituting (6) back into (4) gives a relationship for the efficiency in terms of temperature:
  
  For T = 0 K the efficiency is 100% and that efficiency becomes greater than 100% below 0 K. Since an efficiency greater than 100% violates the first law of thermodynamics, this implies that 0 K is the minimum possible temperature. In fact, the lowest temperature ever obtained in a macroscopic system was 20 nK, which was achieved in 1995 at NIST. Subtracting the right hand side of (5) from the middle portion and rearranging gives
  
  where the negative sign indicates heat ejected from the system. This relationship suggests the existence of a state function, S, whose change characteristically vanishes for a complete cycle if it is defined by
  
  where the subscript indicates a reversible process. This function corresponds to the entropy of the system, which was described previously. Rearranging (8) gives a formula for temperature in terms of fictive infinitesimal quasi-reversible elements of entropy and heat:
  
  For a constant-volume system where entropy S (E) is a function of its energy E, d E = d q and (9) gives
  
  i.e. the reciprocal of the temperature is the rate of increase of entropy with respect to energy at constant volume.