Boyle's Law - Animation
At constant temperature the pressure of a gas is inversely proportional to the volume, it advocates Boyle-Mariotte’s Law.
The temperature of the system remains constant (note that the temperature indicator does not move) and an external force exerts a work on the gas (increases the number of masses on the piston). Thus, as the volume decreases the pressure increases proportionally. The mass of the gas inside the cylinder remains constant and at the same temperature. Considering an ideal gas, the equation P.V = n.R.T is used for this description. Note that the term nRT does not change when the temperature is constant (the number of moles (n) does not change and R is, by definition, constant). Thus, for the volume pressure product to remain constant, it is necessary that the volume decrease be compensated for by the increase in pressure.