Density = mass / volume
If the mass increases while the volume stays the same, the density increases. Conversely, if the mass decreases while the volume remains constant, the density decreases.
Mathematically, we can represent this relationship as follows:
ΔDensity = (ΔMass / Volume) or
ΔDensity = (Final Mass - Initial Mass) / Volume
Therefore, when there is a change in the mass of an object, it directly affects its density, causing it to either increase or decrease accordingly.