There are several equivalent alternative ways of representing the Second Law of Thermodynamics. One is in terms of entropy, S, a state function which is a measure of the molecular disorder of a system.
The law states that in the course of a spontaneous change, the entropy of an isolated system must increase. Note that since the universe is itself an isolated system, we can extend the law to any system within the universe by noting that for any spontaneous change, the total entropy of the universe must increase:
Stot , the total entropy of the universe, can be broken into two components. Ssys, the entropy of the system under consideration, and Ssur , the entropy of the system’s surroundings. Thus any change in the total entropy, ΔStot , may be broken into components corresponding to the change in the entropy of the system , ΔSsys , and the change in the entropy of the surroundings, ΔSsur . In general
Note that the Second Law permits either ΔSsys or ΔSsur (but not both) to be negative, so long as their sum is greater than zero. i.e. the entropy of a system is permitted to decrease, provided that the surroundings show an entropy increase greater than the magnitude of the decrease of the system. Likewise, the entropy of the surroundings may decrease, if there is a sufficiently large increase in the entropy of the system.
It should also be mentioned that, by definition, ΔSsur = 0 for an isolated system. Thus the total change in the entropy of the universe for a process occurring in any isolated system within the universe is equal to the entropy change of that system.
Note also that the First Law of Thermodynamics (formulated in terms of the state function U), told us which processes were permitted to occur (those in which the internal energy of an isolated system, such as the universe, is conserved). The Second Law uses the state function S to identify which of these permitted processes is spontaneous.