As most people know from experience, oil and water do not mix. As a result, oils cannot be removed from soiled dishes, laundry, or other household items by water alone. Soap must be added to the water to dissolve the oils. In order to understand how soap works its magic, one must understand what an ionic surfactant is.
"Surfactant" is short for surface-active agent. It acts as an emulsifying agent, providing a means for polar water molecules and nonpolar oil molecules to interact. It works because of the molecular structure of a surfactant, which is polar on one end and nonpolar on the other. Imagine a bar magnet held up against a stationary magnet. One end of the bar magnet repels the other magnet, and the other end attracts it. The polar end of a surfactant is hydrophilic, which means it attracts water and repels oil. The nonpolar end, alternatively, is hydrophobic, which means it repels water and attracts oil. Therefore, the surfactant molecule acts as an emulsifier, a kind of glue that holds oil and water molecules, which normally repel one another, together. This interaction happens at the interface between the oil and water phases, at the surface of the water, which is how the name "surfactant" is derived. As the molecules attract one another, the surface area of the interface increases, eventually resulting in dispersion of the oil throughout the water phase.
So, what is an "ionic" surfactant? An ionic molecule is one that separates into two charged particles in solution, which are called the cation and the anion. In the case of an ionic surfactant, only one portion acts as the emulsifier. If the anion is the emulsifying agent, the surfactant is called an anionic surfactant, and it has a negatively charged water-attracting end in solution. If the cation is the emulsifying agent, the surfactant is called a cationic surfactant, and it has a positively charged water-attracting end in solution. A nonionic surfactant, then, is one that does not separate into charged particles in solution, and therefore has no charge at all.
Each type of surfactant, cationic, anionic, and nonionic, behaves differently and has different properties than the others. As a result, each is marketed for different purposes. Cationic surfactants are commonly found in fabric softener, and anionic surfactants are excellent at removing dirt particles. However, because ionic surfactants are charged, they attract oppositely charged molecules, which weakens their ability to disperse oil in water. Nonionic surfactants are not subject to weakening by charged molecules, and are therefore the best at removing grease stains. In many commercial products, two or more types of surfactants are combined together.
Ionic surfactants have been in use since long before chemists understood how they worked. Today, the array of commercial surfactants available the forms of soaps, detergents, and fabric softeners is a testament to the time and resources spent on improving the technology.