P1V1 = P2V2
Where: P1 = initial pressure V1 = initial volume P2 = final pressure V2 = final volumeAccording to Boyle's Law, as the volume of a gas decreases, the pressure of the gas increases, and vice versa. This means that if you decrease the volume of a gas, the molecules are forced closer together, which results in more frequent collisions with the walls of the container, leading to an increase in pressure.