Why does soapy water bubble up in baths and dishwashers, while regular water stays flat? It's all connected to the foam in root beer.
Everyone knows that, when the bubble solution runs out, there's a quick fix. Just put a little dish soap in the jar, add a little soap, de-slime the wand so it doesn't fall out of a kid's chubby fingers, and start all over again. Although regular water is drinkable, only soapy water makes bubbles. But why? What is it about soap that makes the water suds-up? In fact, what makes water-based liquids bubble up in general?
The origin of soapy water's bubbling ability is the same as the origin as soap's cleaning ability. It's a surfactant. A surfactant is something that lowers the surface tension and cohesion of water - the properties of water that make one water molecule stick to another water molecule. These allow water molecules to interact more strongly with other molecules like dirt and grime - lifting them away when regular water won't do the job.
Regular water can form bubbles, or course, but only when a lot of air (or some other gas) is mixed into it harshly. Even then, these bubbles tend to only be half-bubbles, floating on the surface of the water. Any attempt to plump them up further generally results in the bubble breaking. This is because of the high surface tension of the water. The layer of water molecules need to pull together enough to keep the bubble of air trapped inside them from pushing free. If they pull together too much, though, they rip the bubble apart. Soap lowers the surface tension of water enough to let it relax around a bubble.
Soap isn't the only material to use surfactants. Some commercial root beers do, to make the root beer foamy enough to have a 'head' like regular beer. Note: The surfactant that root beer manufacturers uses probably isn't soap. Probably.