Researchers may have cracked the code for the perfect head on a glass of beer, and perhaps much more in the process. The key lies in a long sought equation for the growth and shrinkage of individual bubbles in foam and crystalline grains in metals, semiconductors and other materials.

The finding extends a formula that specifies how the area of two-dimensional shapes will change, discovered in part by famed mathematician John von Neumann in 1952. Researchers say the new math may help improve a wide range of industrial processes, from treating metals with heat to controlling the amount of foam in poured beer.

Metals, foams and multicellular organisms are all mosaics of microscopic spaces or domains that jostle with each other, grow or shrink, cave in or bulge out. The driving force behind this evolution is surface tension, the same property that lets a bug sit on water and draws liquid up a narrow straw.

According to the new equation, the change in volume of such a tension-driven domain is essentially the sum of the lengths of the domain's edges (imagine a honeycomb) minus six times the mean width of the domain, all multiplied by a constant that is particular to the material in question.

The key to the discovery was applying the pure math concept of mean width, which is trickier to measure than its cousins—surface area and volume, says materials scientist David Srolovitz of Yeshiva University in New York City, who, along with mathematician Robert MacPherson of the Institute for Advanced Study in Princeton, N.J., published the finding online today in Nature.

"It's exhilarating," Srolovitz says. "I've always found this problem very sexy." He says he does not know where it will be applied, but "the ideas are so general it's going to really change the way we think about geometric objects."

"It's very universal. It will touch everything" in materials design, says mathematician David Kinderlehrer of Carnegie Mellon University in Pittsburgh, who studies materials. He predicts it may lead to longer lasting, more efficient materials for everything from airplane wings to nuclear reactors to microprocessors.

For that to happen, researchers must learn to crunch numbers on groups of domains. That is no problem in two dimensions, but the 3-D case adds a new twist, Kinderlehrer says, because the domains have more edges that can shorten or lengthen affecting their neighbors.

"It's a very complicated type of evolution," he says. "It's going to be much harder to figure out how the network behaves."