Thermodynamics/Applications of the first law

Energy is conserved in an isolated system.

This is equivalent to saying that for an isolated system (for example, gas contained in well insulated thermos flask) that neither loses or gains energy by any means, the energy of the system is constant.

However, in reality this bottle cannot be perfectly isolated. The only truly isolated system is our universe. The bottle will have energy exchange through the transfer of heat (conduction, convection and radiation) and potentially some transfer of matter (gas exchange through the porosity of the metal) with the outside world.

An extension of the first law is to state that the energy of an non-isolated system (since an isolated system cannot physically exist) is equal to the sum of its initial energy plus the energy it gained minus the energy it lost.

Note that any measurement of a system's energy disturbs the system. For example, measuring the temperature of an ocean changes its temperature, because by immersing (for example) a thermometer in the water, a thermal equilibrium is reached through the exchange of energy between the two systems. In this case, the influence of the thermometer on the water is minuscule, and generally negligible, but not zero.

The first law of thermodynamics is intuitive (what goes in, must stay in or go out), but can involve complex reasoning.