The nature of the interaction between the molecules of the sodium dodecyl sulfate surfactant forming two crystal phases, one anhydrous, NaC 12 H 25 O 4 S and the other, NaC 12 H 25 O 4 S.H 2 O, hydrated with one water molecule for unit cell, has been studied in detail using the quantum theory of atoms in molecules and a localized electron detector function. It was found that for the anhydrous crystal, the head groups of the surfactant molecules are linked into a head-to-head pattern, by a bond path network of Na-O ionic bonds, where each Na þ atom is attached to four SO À 4 groups. For the hydrated crystal, in addition to these four bonds for Naþ, two additional ones appear with the oxygen atoms of the water molecules, forming a bond paths network of ionic Na-O bonds, that link the Na þ atoms with the SO À 4 groups and the H 2 O molecules. Each H 2 O molecule is bonded to two SO À 4 groups via hydrogen bonds, while the SO À 4 groups are linked to a maximum of four Naþ atoms. The phenomenon of aggregation of the sodium dodecyl sulfate molecules at the liquid water/vacuum interface was studied using NVT molecular dynamics simulations. We have found that for surfactant aggregates, the Naþ ions are linked to a maximum of three SO 4 groups and three water molecules that form Na-O bonds. Unlike hydrated crystal, each of the O atoms that make these Na-O bonds is linked to only one Naþ ion. Despite these differences, like the crystal phases, the surfactant molecules tend to form a head-to-head network pattern of ionic Na-O bonds that link their heads. The present results indicate that the clustering of anionic surfactant at the water/vacuum interface is a consequence of the electrostatic alignment of the cationic and anionic groups as occurs in the crystalline phases of sodium dodecyl sulfate.