The density of gas is more complicated than solids because gases are highly affected by temperature and pressure. This lesson will lead you through two equations to calculate the density of a gas.

## Definition of Density

The density of solid objects are easy to understand because you can physically feel it.

If you have a rock and a piece of foam that are exactly the same size, the rock will feel heavier. This heaviness is due to the rock having a higher density than foam.**Density** is a physical property of matter and is defined as the mass of the object divided by volume.

Remember that **mass** is the measure of the amount of matter in an object and is measured in grams. **Volume** is the 3-dimensional space that an object occupies and is measured in cubic meters. If we have two objects of the same volume, the one with greater mass will have a higher density than the one with the lesser mass.

In solids, density remains mostly constant because the subatomic bonds keep the molecules tightly packed. However, in gases, the bonds are much weaker, which makes them responsive to temperature and pressure.

Gases will assume the shape of whatever container they are in. Assuming we have a fixed mass of gas, meaning that we haven’t added or taken away any of the gas, when we change the volume of the container, we are changing the density of the gas. A smaller container means a smaller volume.

According to our equation, density is inversely related to volume. So, a smaller volume will produce a denser gas. This is because you are packing the same amount of molecules into a smaller space.

## Calculating Density

So, how do we actually measure the density of a gas? An easy way to visualize gas density is to observe its behavior compared to air.

Think of helium-filled balloons. These balloons rise because they are less dense than the surrounding air. This density is so much lower that it causes the rubber balloon and string to float in the air.

While observing the floating balloon tells us that helium is less dense than air, it doesn’t give us a quantitative measure of what the density of helium actually is.If we know the mass of the gas and the volume, we can easily calculate density. Let’s assume we have a gas with a mass of 500 g in a volume of 2m^3. Dividing 500 by 2 will give you a density of 250 g/m^3.

## Density ; the Ideal Gas Law

Gases are highly responsive to changes in both temperature and pressure. In fact, car tire manufacturers recommend that you check your tires frequently if you live in climates that experience large temperature variations. Gases expand in high temperatures and condense in low temperatures.

Thus, when temperatures drop, you could experience dangerously low tire pressures due to the low volume of air in your car tires. This is the same phenomenon that causes hot air balloons to fly. The gas burner heats the air inside the balloon making it less dense than the surrounding air. The less dense air rises compared to the surrounding air.

We can calculate how the density of air changes with changing temperature using the ideal gas law. The **ideal gas law** is defined as *PV* = *nRT*. *P* is pressure, *V* is volume, *n* is the number of gas moles, *R* is the ideal gas constant and *T* is temperature.

The **ideal gas constant** is 0.0821 L * atm/mol * K. Generally, constants are values that have been previously verified by scientists, and we can insert directly into equations.You’ll notice that volume is a variable in the ideal gas law, but neither density nor mass is a variable. To find density, we have to solve the equation for volume, or *V*. *V* = *nRT* / *P*. To incorporate mass, we can use the number of moles, or *n*.

The number of moles equals the mass of the gas divided by the molecular mass. **Molecular mass** is the mass calculated by adding atomic masses in the chemical formula. For instance, CO2 is composed of one carbon and two oxygen atoms. The atomic mass of carbon is 12.

01 g/mol and oxygen is 15.999 g/mol. So, the molecular mass of CO2 is 12.01 + (15.

999 * 2) = 44.01 g/mol.We can substitute for *n* into the ideal gas law in order to get mass into the equation. Since *n* equals mass divided by molecular mass, this would insert into our equation as *V* = *mRT* / *MM* * *P*.

Remember our original equation for density is mass divided by volume. Since we have volume on one side, we divide both sides by *m*: *V* / *m* = *mRT* / *MM* * *P* * *m*.Since mass is on the top and bottom of the fraction on the right, they cancel each other out. On the left, the equation is the inverse of density. Thus, if we flip the fractions on both sides of the equation, the left will be density.

*V*/*m*=*RT*/*MM***P**m*/*V*=*MM***P*/*RT*- Density =
*MM***P*/*RT*

Using this equation, we are now ready to calculate the density of gas using temperature and pressure.

Let’s use CO2, as we were discussing earlier.

- The molecular mass of CO2 is 44.01 g/mol.
*R*is 0.0821 L * atm/mol * K.*T*is 273.15 K.*P*is 1 atm.

Note that the temperature in this equation must be in Kelvin. 273.15 K is 0 degrees Celsius and the freezing point of water.

- Density =
*MM***P*/*RT* - Density = (44.01 g/mol * 1 atm) / ((0.0821 L * atm/mol * K) * 273.15 K)
- Density = (44.01 g * atm/mol) / (22.4 L * atm/mol)
- Density = 1.
96 g/L

The density of the gas is 1.96 g/L. You can tell by this equation if you vary the gas or pressure, you will also change the density of the gas.

## Lesson Summary

In this lesson, we learned that the **density of the gas** is equal to the mass divided by volume of a gas. Because gases are greatly affected by changing temperature and pressure, we can also use the **ideal gas law** to solve for density. The ideal gas law states that **PV = nRT**.

This equation explains why car tires become under-inflated during winter. When the temperature (*T*) drops, the volume (*V*) of the air must drop as well.While the ideal gas law is extremely useful in describing the behavior of gases in changing conditions, it does not have density as a variable.

In order to insert density into the equation, we must use the relationship that the number of moles (*n*) is equal to the mass divided by molecular mass. This substitution will allow us to calculate the density of a gas with respect to temperature and pressure.

## Learning Outcomes

Watch and review this lesson’s content to make sure that you can:

- Recollect the definitions of density and volume
- State the equation for calculating the density of a gas and the ideal gas law
- Interpret the purpose of the ideal gas law and understand when to use it
- Go through the process of calculating the density of a gas