### Theory:

From the early $$17th$$ century, the gas laws have been around to help scientists find the amount of gas, volumes, pressures, and temperature when coming to gas matters.

The gas laws consist of three primary laws:
1. Charles' Law
2. Boyle's Law and
Fundamental gas laws

The three fundamental gas laws are used to find the relationship between pressure, temperature, volume, and the amount of gas.
1. Boyle's law describes that the volume of gas increases as the pressure decreases.
2. Charles' law states that the volume of gas increases as the temperature increases.
3. Avogadro's law says that the volume of gas increases as the amount of gas increases.
The ideal gas law is the combination of the three simple gas laws.

Boyle's Law:
In 1662, Robert Boyle investigated the relationship between volume and pressure of a gas of a fixed amount at a constant temperature. He found that the volume of a given mass of a gas is inversely proportional to its pressure at a constant temperature.

A statement of Boyle's law is as follows:
When the temperature of a gas is kept constant, the volume of a fixed mass of gas is inversely proportional to its pressure.
$\begin{array}{l}P\phantom{\rule{0.147em}{0ex}}\propto \phantom{\rule{0.147em}{0ex}}\frac{1}{V}\\ \mathit{or}\\ V\phantom{\rule{0.147em}{0ex}}\propto \phantom{\rule{0.147em}{0ex}}\frac{1}{P}\end{array}$

Relation between pressure and volume

Volume vs Pressure, at constant temeperature

In other words, at a constant temperature, the product of the pressure and volume of a given mass of an ideal gas in a closed system is always constant.

$\mathit{PV}\phantom{\rule{0.147em}{0ex}}=\phantom{\rule{0.147em}{0ex}}k$

Where,
P - Pressure
V - Volume occupied by a gas
k - Constant

Boyle’s Law can be used to determine the current pressure or volume of gas and can be represented also as,

${P}_{1}{V}_{1}={P}_{2}{V}_{2}$

Where,

$\begin{array}{l}{P}_{1}\phantom{\rule{0.147em}{0ex}}-\phantom{\rule{0.147em}{0ex}}\mathit{Initial}\phantom{\rule{0.147em}{0ex}}\mathit{pressure}\phantom{\rule{0.147em}{0ex}}\mathit{of}\phantom{\rule{0.147em}{0ex}}\mathit{the}\phantom{\rule{0.147em}{0ex}}\mathit{gas}\\ {V}_{1}\phantom{\rule{0.147em}{0ex}}-\phantom{\rule{0.147em}{0ex}}\mathit{Initial}\phantom{\rule{0.147em}{0ex}}\mathit{volume}\phantom{\rule{0.147em}{0ex}}\mathit{of}\phantom{\rule{0.147em}{0ex}}\mathit{the}\phantom{\rule{0.147em}{0ex}}\mathit{gas}\\ {P}_{2}\phantom{\rule{0.147em}{0ex}}-\phantom{\rule{0.147em}{0ex}}\mathit{Final}\phantom{\rule{0.147em}{0ex}}\mathit{pressure}\phantom{\rule{0.147em}{0ex}}\mathit{of}\phantom{\rule{0.147em}{0ex}}\mathit{the}\phantom{\rule{0.147em}{0ex}}\mathit{gas}\\ {V}_{2}-\phantom{\rule{0.147em}{0ex}}\mathit{Final}\phantom{\rule{0.147em}{0ex}}\mathit{volume}\phantom{\rule{0.147em}{0ex}}\mathit{of}\phantom{\rule{0.147em}{0ex}}\mathit{the}\phantom{\rule{0.147em}{0ex}}\mathit{gas}\end{array}$