Density is a measure of the mass in a specific volume. Density is equal to the mass of an object divided by the volume, which can be expressed by the symbol ρ. In the international system of units and China's legal units of measurement, the unit of density is kg/m3.
Density reflects a characteristic of matter itself, so it can be influenced by external factors. Generally speaking, the main physical quantities that affect the density of matter are pressure and temperature.
Gas density is obviously influenced by pressure and temperature. Usually, gas only gives the density under standard conditions or normal temperature and pressure, and the density under other conditions can be calculated by the state equation of gas (such as ideal gas state equation or van der Waals equation).
The density of liquid mainly depends on the composition of liquid, and it is less affected by temperature (but sometimes it can't be ignored). Very high pressure will also have a significant impact. The characteristics that the density of a solid changes under the influence of temperature and pressure are similar to those of a liquid, and are generally less obvious.