Entropy in thermodynamics is a measure of the disorder or randomness of a system and a measure of how much energy is not available to do work. It is central to the second law of thermodynamics, which states that the total entropy of a system either increases or remains constant in any spontaneous process. Entropy is also related to the unavailability of energy to do work and is described by two principal approaches: the macroscopic perspective of classical thermodynamics and the microscopic description central to statistical mechanics. From a thermodynamic viewpoint, entropy is used to describe the behavior of a system in terms of thermodynamic properties such as temperature, pressure, and heat capacity