Today, as a bonus of my comment of the day I am going to talk about “because when the water turns to ice the temperature rises”.
And, as you know, matter is composed of atoms and atoms are composed of neutrons, protons (the nucleus, some without charge and another with positive charge) and electrons (orbiting around the nucleus).
The electrons, their orbits depend on the electromagnetic attraction with the nucleus and this depends on the energy. Thus electrons with more energy will take more orbits away from the nucleus arriving, if they have much energy to leave the nucleus (you can see it with the photoelectric effect if you are interested, but I will not give more the plate with it).
All this comes to that energy can be seen in many areas and one of them is heat energy, heat, let’s go. By this rule, the less heat, less energy and therefore, the electron has a lower orbit.
So, any chemist can tell you how chemical reactions work, indicating something crucial, whether they are exergonic (release heat) or endoergomic (requiring heat). All this because of a thing called the “Gibbs energy”, a thermodynamic term that indicates that a reaction happens as long as the result causes it to need less energy. That is, from the initial set to the final set it has to be of lower energy or contain less energy together.
Normally any material in liquid state occupies much more than in solid state because molecules, because of the energy they have for temperature, need their “space” to live; However with water this does not happen occupying more in solid state than in liquid. Why?.
To know, we have to look at a molecule of water. The water molecule has one hydrogen and two oxygens. The hydrogen atom is composed of a proton and an electron in its valence layer (the outermost orbit) that makes this element quite electrically neutral, while the oxygen atom is more “electric” because in its layer of Valence has a lack of 2 electrons, which makes it quite “positive” and, therefore, tends to tend “bridges” with anyone. That is, oxygen is very electropositive and tends to rob anyone who sees the electrons in order to complete their valence layer (and by the way because it has too many protons in the nucleus, by the way, six, I can’t remember correctly).
When oxygen is bound with two hydrogens, the simple and simple hydrogen, as it has to share its electron with the oxygen that has more protons (the oxygen) than the hydrogen, passing this more time orbiting the oxygen than the hydrogen, has a Problem, which becomes a bit too electronegative.
Thus, when the water is in liquid, this is usually (temporarily) joined with other water molecules by the hydrogens. All because this way, two hydrogens can have a little more time the electron they share with their corresponding oxygen. This is called a “hydrogen bridge”.
Hydrogen bridges help water molecules to have two very important things, cohesion (bonding together) and adhesion (bonding with other molecules or atoms out there). Basis of detergents.
Returning to the topic, when the temperature is lowered, the hydrogen bonds become stronger causing the water molecules to be placed in a certain way (forming hexahedrons or tetrahedrons, I do not remember well, I’m sorry) and make the molecules occupy more That when they are loose and temporary hydrogen bridges are created (when it is liquidated).
Solid water, being tidier but less compacted than liquid water, releases heat energy. That is to say, being the best shared electrons do not need to move so much and not having to move as much (or when they are shared among the hydrogens) have to release that extra energy they had before. The result is that the water, the solidification is exergonic which causes that, when it is frozen, raise the temperature. So, if the freezing of water happens to 0 degrees, actually, the temperature rises to 4 degrees. This is due to the densities and it is a reaction that releases heat (exergonic, remember). All because of the hydrogen bridges.
Actually the fact is the following. The temperature goes down to zero degrees, at which point the hydrogen bridges and Van der Waals forces (that is, the repulsive or attractive electromagnetic forces between the elements of the atom) leave the electrons quiet that have to release their extra energy In the form of heat. This causes the global temperature to rise to 4 degrees.
Obviously, if the environment continues at a low temperature, after all the water has solidified, the temperature continues to fall, reaching extremes where, even if heat is released, at low ambient temperatures the solidification is instantaneous and the increase is not noticed about temperature.