When mg(no3)2 is reacted with naoh a ppt is formed that is magnesium hydroxide. After heating the solution the solubility of the ppt increased and the heat caused bond cleavage after increase in the vibration of the particles in the components thus making it easier for ppt to dissolve.