Why Is Milk White?: & 200 Other Curious Chemistry Questions (2013)
3. Household Chemistry
What chemicals in washing soap make it clean your clothes?
The chemicals that clean your clothes work a lot like ordinary soap (see page 25): they’re made up of molecules that stick to oil or grease on one end and to water on the other end, allowing them to pick up dirt and grime and then be washed away. But unlike soap, these chemicals are specially formulated to avoid causing what we call soap scum.
Soap scum forms when soaps reacts with hard water, which is water that contains too much magnesium and calcium. Soap is a fatty acid chain with the acid end neutralized by sodium. Sodium has 11 electrons, and the one outer electron is only loosely held by the atom. Its other 10 electrons are held very tightly by the sodium atom’s nucleus. Sodium loses its outer electron to the oxygen atom in the fatty acid, which pulls strongly on electrons. The oxygen becomes negatively charged, the sodium is left positively charged, and opposites attract, so the sodium hangs around the fatty acid.
Right after sodium with its 11 electrons comes magnesium with 12 electrons. Magnesium has two outer electrons it can lose to fatty acids. So when magnesium reacts with soap, it replaces the sodium, hanging on to two fatty acids instead of one. Calcium also has two outer electrons, and it does the same thing. Unfortunately for people who use soap, the resulting molecule does not dissolve in water and instead forms soap scum. The scum sticks to clothes and hands and forms a dirty ring in the bathtub.
Chemists found out a long time ago that they could change the acid part of the fatty acid from a carboxylic acid to a sulfuric acid, and the result was a molecule that could dissolve in hard water, so it doesn’t form soap scum.
Molecules like these are called detergents. You use them to wash your clothes, and you use them to wash your hair. Even some bars of “soap” are actually detergent bars.