Why a pot of boiling water will not boil over when pasta is added if olive oil is added to the water beforehand?
Water molecules are polar and they strongly attract one another at the surface of the water. This makes the surface harder to pierce or expand. Pure water doesn’t foam when it boils, because it’s hard to stretch the surface out to make bubbles. The scientist is called “surface tension”.
Now drop some pasta in the pot. As it cooks, organic materials are released into the cooking water. Some of these organics materials have hydrocarbon parts that don’t dissolve in water, and polar parts that do dissolve. They collect on the surface of the cooking water, with the polar pieces sticking into the water and the hydrocarbon pieces pointing upwards. The tight mesh of attracting water molecules is disrupted. It becomes much easier to expand the surface into bubbles. As the water boils, foam starts to form on the surface.
How it Works?
Drop a teaspoon of olive oil into the pot. The oil won’t mix well with the water, and many tiny oil droplets are formed. The oil droplets at the surface act as bubble breakers. When a bubble of foam starts to form, it encounters an oil droplet. The part of the bubble that encountered the oil droplet has a much different surface tension than the rest of the bubble, and the stress pops the bubble before it gets very large.