 It does not hold for most substances, although it is true that temperature is a monotonic (non-decreasing) function of internal energy.When two otherwise isolated bodies are connected together by a rigid physical path impermeable to matter, there is spontaneous transfer of energy as heat from the hotter to the colder of them.Eventually, they reach a state of mutual thermal equilibrium, in which heat transfer has ceased, and the bodies' respective state variables have settled to become unchanging.