question: Why does soap and other chemicals cause water to form bubbles and why are they in a spherical shape?
comment: The shape is because there is no prefered direction of forming , forces are applied evenly in all direction
passages: Section::::Types of pattern.:Bubbles, foam.
  
  A soap bubble forms a sphere, a surface with minimal area — the smallest possible surface area for the volume enclosed. Two bubbles together form a more complex shape: the outer surfaces of both bubbles are spherical; these surfaces are joined by a third spherical surface as the smaller bubble bulges slightly into the larger one.
   Surface tension is visible in other common phenomena, especially when surfactants are used to decrease it:
  
  BULLET::::- Soap bubbles have very large surface areas with very little mass. Bubbles in pure water are unstable. The addition of surfactants, however, can have a stabilizing effect on the bubbles (see Marangoni effect). Note that surfactants actually reduce the surface tension of water by a factor of three or more.
   When a soap bubble is in contact with a solid or a liquid surface wetting is observed. On a solid surface, the contact angle of the bubble depends on the surface energy of the solid., A soap bubble has a larger contact angle on a solid surface displaying ultrahydrophobicity than on a hydrophilic surface – see Wetting. On a liquid surface, the contact angle of the soap bubble depends on its size - smaller bubbles have lower contact angles.
  
  Section::::Medicine.
  
  Section::::Medicine.:Contact dermatitis.
  
  The composition of soap bubbles' liquid has many recipes with slightly different ingredients. The most common one contains:
   At the stem of the bubble, the shape of the bubble is nearly cylindrical; consequently, either R or R is large while the other radius of curvature is small. As the stem of the bubble grows in length, it becomes more unstable as one of the radius grows and the other shrinks. At a certain point, the vertical length of the stem exceeds the circumference of the stem and due to the buoyancy forces the bubble separates and the process repeats.
  
  Section::::Stability.
  
  Section::::Stability.:Stabilization.
   When two bubbles merge, they adopt a shape which makes the sum of their surface areas as small as possible, compatible with the volume of air each bubble encloses. If the bubbles are of equal size, their common wall is flat. If they aren't the same size, their common wall bulges into the larger bubble, since the smaller one has a higher internal pressure than the larger one, as predicted by the Young–Laplace equation.
   BULLET::::- It follows from isoperimetric inequality. These properties define the sphere uniquely and can be seen in soap bubbles: a soap bubble will enclose a fixed volume, and surface tension minimizes its surface area for that volume. A freely floating soap bubble therefore approximates a sphere (though such external forces as gravity will slightly distort the bubble's shape).
  
  BULLET::::8. "The sphere has the smallest total mean curvature among all convex solids with a given surface area."
   While it has been known since 1884 that a spherical soap bubble is the least-area way of enclosing a given volume of air (a theorem of H. A. Schwarz), it was not until 2000 that it was proven that two merged soap bubbles provide the optimum way of enclosing two given volumes of air of different size with the least surface area. This has been dubbed the "double bubble conjecture".
   Section::::Thermodynamics.:Thermodynamics of soap bubbles.
  
  The pressure inside an ideal (one surface) soap bubble can be derived from thermodynamic free energy considerations. At constant temperature and particle number, , the differential Helmholtz energy is given by
  
  where is the difference in pressure inside and outside of the bubble, and is the surface tension. In equilibrium, , and so,
  
  For a spherical bubble, the volume and surface area are given simply by
  
  and
  
  Substituting these relations into the previous expression, we find
   For the Marangoni effect to occur, the foam must be indented as shown in the first picture. This indentation increases local surface area. Surfactants have a larger diffusion time than the bulk of the solution—so the surfactants are less concentrated in the indentation.
   Deviations are due to the Marangoni effect and capillary pressure, which affect the assumption that the bubbles are spherical.
  
  For laplace pressure of a curved gas liquid interface, the two principal radii of curvature at a point are R and R. With a curved interface, the pressure in one phase is greater than the pressure in another phase. The capillary pressure P is given by the equation of:
   where R and R are the radii of curvature and are set as positive. At the stem of the bubble, R and R are the radii of curvature also treated as positive. Here the hydrostatic pressure in the liquid has to take in account z, the distance from the top to the stem of the bubble. The new hydrostatic pressure at the stem of the bubble is "p"("ρ" − "ρ")"z". The hydrostatic pressure balances the capillary pressure, which is shown below:
  
  Finally, the difference in the top and bottom pressure equal the change in hydrostatic pressure:
   The above explanation only holds for bubbles of one medium submerged in another medium (e.g. bubbles of gas in a soft drink); the volume of a membrane bubble (e.g. soap bubble) will not distort light very much, and one can only see a membrane bubble due to thin-film diffraction and reflection.
  
  Section::::Physics and chemistry.:Applications.
  
  Nucleation can be intentionally induced, for example to create a bubblegram in a solid.
  
  In medical ultrasound imaging, small encapsulated bubbles called contrast agent are used to enhance the contrast.
   Section::::In nature.
  
  Section::::In nature.:Bubbles.
  
  Like a droplet, bubbles are round because cohesive forces pull its molecules into the tightest possible grouping, a sphere. Due to the trapped air inside the bubble, it is impossible for the surface area to shrink to zero, hence the pressure inside the bubble is greater than outside, because if the pressures were equal, then the bubble would simply collapse. This pressure difference can be calculated from Laplace's pressure equation,
  
  For a soap bubble, there exists two boundary surfaces, internal and external, and therefore two contributions to the excess pressure and Laplace's formula doubles to
   Section::::Background.:Theory.
  
  Section::::Background.:Theory.:Young-Laplace equation.
  
  As vapor bubbles form in a liquid solvent, interfacial tension causes a pressure difference, Δ"p", across the surface given by the Young-Laplace equation. The pressure is greater on the concave side of the liquid lamellae (the inside of the bubble) with radius, R, dependent on the pressure differential. For spherical bubbles in a wet foam and standard surface tension , the equation for the change in pressure is as follows:
   At a point where three or more bubbles meet, they sort themselves out so that only three bubble walls meet along a line. Since the surface tension is the same in each of the three surfaces, the three angles between them must be equal to 120°. Only four bubble walls can meet at a point, with the lines where triplets of bubble walls meet separated by cos(−1/3) ≈ 109.47°. All these rules, known as Plateau's laws, determine how a foam is built from bubbles.
  
  Section::::Physics.:Stability.
   Section::::Recreation.:Freezing.
   Using a whisk on certain liquids, notably cream or egg whites, can also create foams through mechanical action. This is the method employed in the making of sponge cakes, where an egg protein matrix produced by vigorous whipping provides almost all the structure of the finished product.
   Shaving cream is an example of a complex fluid. Without stress, the foam appears to be a solid: it does not flow and can support (very) light loads. However, when adequate stress is applied, shaving cream flows easily like a fluid. On the level of individual bubbles, the flow is due to rearrangements of small collections of bubbles. On this scale, the flow is not smooth, but instead consists of fluctuations due to rearrangements of the bubbles and releases of stress. These fluctuations are similar to the fluctuations that are studied in earthquakes.
  
  Section::::Dynamics.
   Foam
  
  Foam is an object formed by trapping pockets of gas in a liquid or solid.
  
  A bath sponge and the head on a glass of beer are examples of foams. In most foams, the volume of gas is large, with thin films of liquid or solid separating the regions of gas. Soap foams are also known as suds.
   Since, the density of the gas is less than the density of the liquid the left hand side of the equation is always positive. Therefore, the inverse of R must be larger than the R. Meaning that from the top of the bubble to the bottom of the bubble the radius of curvature increases. Therefore, without neglecting gravity the bubbles cannot be spherical. In addition, as z increases, this causes the difference in R and R too, which means the bubble deviates more from its shape the larger it grows.
   At lower scale than the bubble is the thickness of the film for metastable foams, which can be considered a network of interconnected films called lamellae. Ideally, the lamellae connect in triads and radiate 120° outward from the connection points, known as Plateau borders.
  
  An even lower scale is the liquid–air interface at the surface of the film. Most of the time this interface is stabilized by a layer of amphiphilic structure, often made of surfactants, particles (Pickering emulsion), or more complex associations.
  
  Section::::Formation.
   The structures that soap films make can not just be enclosed as spheres, but virtually any shape, for example in wire frames. Therefore, many different minimal surfaces can be designed. It is actually sometimes easier to physically make them than to compute them by mathematical modelling. This is why the soap films can be considered as analog computers which can outperform conventional computers, depending on the complexity of the system.
  
  Section::::Bubbles in education.
   As the vapor bubbles distort and take the form of a more complex geometry than a simple sphere, the two principal radii of curvature and would be used in the following equation:
  
  As pressure grows inside the bubbles, the liquid lamellae shown in the figure above will forced to move toward plateau borders causing a collapse of the lamellae.
  
  Section::::Background.:Theory.:Gibbs adsorption isotherm.
   BULLET::::- Evaporation: This can be slowed down by blowing bubbles in a wet atmosphere, or by adding some sugar to the water.
  
  BULLET::::- Dirt and fat: When the bubble touches the ground, a wall, or our skin, it usually ruptures the soap film. This can be prevented by wetting these surfaces with water (preferably containing some soap).
  
  Section::::Physics.:Wetting.
   An example of a non-Boussinesq flow is bubbles rising in water. The behaviour of air bubbles rising in water is very different from the behaviour of water falling in air: in the former case rising bubbles tend to form hemispherical shells, while water falling in air splits into raindrops (at small length scales surface tension enters the problem and confuses the issue).
  