Step 1 (Molality): Molality (m) is the number of moles of solute dissolved per kilogram of solvent. It is expressed in mol kg-1:
\[ m = \frac{\text{moles of solute}}{\text{mass of solvent in kg}} \]
Because it is based on mass, molality does not change with temperature.
Step 2 (Molarity): Molarity (M) is the number of moles of solute dissolved per litre of solution. It is expressed in mol L-1:
\[ M = \frac{\text{moles of solute}}{\text{volume of solution in litres}} \]
Since volume expands or contracts with temperature, molarity changes slightly with temperature.
Step 3 (Note): Molality uses mass of the solvent, whereas molarity uses the volume of the whole solution, which is the key difference between the two.