Flexi Says: Vinegar reacts with baking soda to yield carbon dioxide gas and water. The carbon dioxide gas creates the bubbling effect of this reaction. If a small amount of dish soap is added, the bubbles will become trapped to form a thick foam. This happens because dish soap reduces the surface tension of water. Usually, water molecules attract together as they form, and the carbon dioxide bubbles easily push around the groups of water molecules and escape into the air. Reducing the surface tension of water causes the molecules to be more evenly distributed, and the gas bubbles become trapped.