Alex Dainis explains the science of foggy mirrors and how you can stop them. By applying a small amount of shaving cream and rubbing it onto the glass, you can prevent fog from forming the next time you take a shower. The fog on a mirror occurs when the warm water vapor from the shower condenses into droplets upon contact with the cold mirror surface. These droplets stick to the mirror due to the adhesive and cohesive properties of water. However, shaving cream contains surfactant molecules that disrupt the cohesion of water, preventing the formation of large droplets and ensuring a clear view. That’s science!