Temperature and density share an inverse relationship. As temperature increases, the space between water molecules increases—also known as density, which therefore decreases. If the temperature of water decreases its density increases, but only to a point. At a temperature of 4°C pure water reaches its maximum or peak density, cooled further it expands and becomes less dense than the surrounding water which is why when water freezes at 0°C it floats.
Salinity and density share a positive relationship. As density increases, the amount of salts in the water—also known as salinity, increases. Various events can contribute to change in the density of seawater.
Salinity can decrease from the melting of polar ice or increase from the freezing of polar ice. Evaporation increases salinity and density while the addition of freshwater decreases salinity and density.