Part 2 The First Law of ThermodynamicsPart 2 The First Law of Thermodynamics

The amount of work done in one direction is the same as the amount of heat transferred in the other, or, the internal energy of an isolated system is constant.

Because of this, a perpetual motion machine cannot exist, and all systems come to an end.