The entropy of the system increases when a solid melts or sublimes, but it decreases when a gas liquifies.
The entropy, which is a measure of disorder in a system, changes during phase transitions. When a solid melts into a liquid, the entropy increases because the molecules in the liquid state have more freedom to move compared to their fixed positions in the crystalline lattice of the solid.
In the case of sublimation, where a solid turns directly into a gas, there is also an increase in entropy (ΔS > 0) since the state change bypasses the liquid phase and the molecules transition from a highly ordered state to a very disordered one.
However, when a gas liquifies, its molecules become less free, leading to a decrease in entropy or disorder.
During phase transitions, the entropy of a system increases when a solid melts into a liquid, a liquid gasifies into a gas, and when a solid sublimes directly into a gas.