# Ideal Gas Law and Density of a Gas

The Ideal Gas Law can also be used to determine the density of a gas. To derive that equation, we begin with the ideal gas law:

Density is defined as mass per unit volume.

Recall that we also derived the equation for the molar mass of a gas in the post Ideal Gas Law and Molar Mass of a Gas as:

To solve for *g*, we multiply each side by *PV/RT*:

The resulting equation is:

Plugging equation (5) into our equation for density (2):

Notice that volume *V* cancels out:

We now can use equation (7) to solve gas law problems for density.

**Sample Problem**

What is the density of SO_{2} gas at 1.18 atm and 26 °C?

The gas law equation (7) for density is:

Wanted: ? Density

Given:

Molar mass of SO_{2} gas = 64.06 g/mol

P = 1.18 atm

T = 26 °C

We need to convert degrees Celsius to Kelvin:

Plugging these values into equation (7):

*The density of of SO _{2} gas is 3.08 g/L.*