In fluid mechanics, the Cheerios effect is the phenomenon that occurs when floating objects that don't normally float attract one another. Wetting, an example of the "Cheerios effect," is when breakfast cereal clumps together or clings to the sides of a bowl of milk. It is named after the common breakfast cereal Cheerios and is due to surface tension. The same effect governs the behavior of bubbles on the surface of soft drinks.
This clumping behaviour applies to any small macroscopic object that floats or clings to the surface of a liquid. Examples of such objects are hair particles in shaving cream and fizzy beer bubbles. The effect is not noticeable in boats and other large floating objects because the force of surface tension is relatively small at that scale.
At the interface between a liquid and air, molecules of the liquid are subject to greater attractive forces from those below than from air molecules. Opposing these forces is the attraction of the liquid molecules to the surface of the container. The result is that the liquid's surface forms a meniscus which exhibits surface tension and acts as a flexible membrane. This membrane may be curved with the center either higher or lower than the edges.
The attraction isn't created by the depression or hills per se, but the objects are just following the path of least resistance.
The object that creates the hill does so because it's less dense than water but more dense than air. The object is actually creating a depression, not in the water but in the air above it. Like a heavy ball on a hill of air, the object will fall "down", because all the heavy water "above" it is pushing it.
The attraction between objects that create depressions can be seen as 2 balls in a trampoline, which have a kind of hill between them but they still fall into each other because the "hill" at the opposite side is larger than that in the middle. You only see the depression around the object where the bend is enough to be noticeable, but it reaches the edges of the container.
A floating object will seek the highest point of the membrane and thus will find its way to either the center or the edge. A similar argument explains why bubbles on surfaces attract each other: a single bubble raises the liquid level locally causing other bubbles in the area to be attracted to it. Dense objects, like paper clips, can rest on liquid surfaces due to surface tension. These objects deform the liquid surface downward. Other floating objects that are seeking to sink but are constrained by surface tension will be attracted to the first. Objects with an irregular meniscus also deform the water surface forming "capillary multipoles". When such objects come close to each other they rotate in the plane of the water surface until they find an optimum relative orientation. Subsequently, they are attracted to each other by surface tension. 
Writing in the American Journal of Physics, Dominic Vella and L. Mahadevan of Harvard University discuss the Cheerios effect and suggest that it may be useful in the study of the self-assembly of small structures. They calculate the force between two spheres of density and radius floating distance apart in liquid of density as
is a nondimensional factor in terms of the contact angle . Here is a convenient meniscus length scale.
- "Scientists explain the 'Cheerio Effect'". NBC News. Retrieved 2006-08-28.
- Chan, D.Y.C.; Henry, J.D.; White, L.R. (1979). "The interaction of colloidal particles collected at the fluid interface". Journal of Colloid and Interface Science. 79 (9): 410–418.
- Stamou, D.; Duschl, C.; Johannsmann, D. (2000). "Long-range attraction between colloidal spheres at the air–water interface: The consequence of an irregular meniscus". Physical Review E. 62 (4): 5263–5272. Bibcode:2000PhRvE..62.5263S. doi:10.1103/PhysRevE.62.5263.
- Lucassen, J. (1992). "Capillary forces between solid particles in fluid interfaces". Colloids and Surfaces. 65 (2–3): 131–137. doi:10.1016/0166-6622(92)80268-7.
- Vella, D.; Mahadevan, L. (September 2005). "The Cheerios effect". American Journal of Physics. 73 (9): 817–825. arXiv:cond-mat/0411688. Bibcode:2005AmJPh..73..817V. doi:10.1119/1.1898523.