Thermodynamics is a branch of physics that studies the relationship between energy and the work of a system. It shows how heat energy can be converted into other forms of energy while affecting the matter as well.