To add, it’s also simply due to Impurities in the water. Most commonly soap residue will push bubbles to edges due to weaker surface tension. But any salts or minerals will cause additional gas to separate out. Distilled water in sterile beaker will have few bubbles compared to your tap or dirty glass. Also look up Nucleation
Latest Answers