It is possible for the entropy of a system to decrease as long as the entropy of the surroundings increases. The entropy of a system indicates its disorder. A gas is less ordered than a liquid, which is less ordered than a solid. The degrees of freedom associated with the atoms have changed. The greater the freedom of movement and the number of degrees of freedom, the greater the entropy of the system.
Individual molecules have degrees of freedom associated with motions within the molecule.
Vibrational motion . Rotational motion . Energy is required to get a molecule to translate, vibrate, or rotate. The entropy changes dramatically at a phase change. Gases are formed from solids or liquids.