The relationship between the internal energy of a system and its heat and work exchange with the surroundings is: E = q + w (The form of work will be restricted to gaseous, PV-type for this discussion.) Interestingly, both q and w are not state functions.