We know that heat is a form of energy which flows from a hotter body to a colder body. It is the energy produced due to the total kinetic energy produced by the vibrating molecules of a body. We can provide heat to a system either by performing mechanical work on the system or by supplying heat to that system . Let us consider that we have an ideal gas in a cylindrical container which is fitted with a piston (figure 1). Let’s suppose that the piston is fixed in its position and the walls of the cylinder are kept at a temperature higher than that of the gas. Then the gas molecules hit the wall and rebound. The average kinetic energy of a wall molecule is larger than the average kinetic energy of a gas molecule. Therefore, on collision, wall molecules provide energy to the gas molecules. Then the other gas molecules share the kinetic energy and hence the total internal energy of the gas increases.

Next, let us consider the same initial condition but now let us suppose that the walls are at the same temperature as the gas. Then, suppose the piston is pushed slowly in order to compress the gas. After that, the speed of the gas molecule increases after collision with the piston coming towards it We can assume that elastic collision, v2 = v1 + 2u in figure 1. Hence, as the piston is pushed in, the internal energy of the molecules increases.

We can see that the total internal energy of the gas may be increased due to the difference in temperature between the gas and the walls (heat transfer) or due to the motion of the piston (work done on the gas).

In a general condition, both modes of energy transfer may take place. For example, let us consider that a gas is kept in a cylindrical can which is fitted with a movable piston. If the cylindrical can is kept on a hot stove, heat is supplied by the hot bottom side to the gas and the piston is pushed out to some extent. As the piston moves outwards, work is done by the gas on it and the begins to lose energy. Thus, when heat is provided to the gas, the gas gains energy and when work is done by it, it loses energy.

Suppose, in a process, ΔQ amount of heat is provided to the gas and ΔW amount of work is done by it. The total energy of the gas must increase by ΔQ – ΔW. Due to this, the gas along with its container may start moving in systematic motion or the internal energy of the gas may increase. If the energy does not appear as a systematic motion of the gas then this net energy ΔQ – ΔW must go in the form of its internal energy. Here, if we denote the change in internal energy by using ΔU, we get,

ΔU = ΔQ – ΔW
or, ΔQ = ΔU + ΔW …… (i)

The above equation (i) is the statement of the first law of thermodynamics. In an ideal monoatomic gas, the translational kinetic energy of all its molecules is the factor which creates the internal energy in the gas. In simple words, the internal energy may be contributed by the kinetic energy of the molecules produced by their vibration, by the potential energy corresponding to the molecular forces or the rotational kinetic energy of the molecules. The equation (i) represents a statement of conservation of energy and is usable in any system.