However, if the substance is not pure or is a mixture of different components, the density can vary depending on the composition and proportions of the components. For instance, if you mix water with salt, the density of the resulting solution will increase compared to pure water due to the presence of dissolved salt.
Therefore, the density of a substance is constant for a pure substance under specified conditions, but it can vary for mixtures or impure substances depending on their composition.