Why does nature prefer hexagons?

The best ratio of surface to volume in three dimensional space is the ball.

This can be easily observed with soap-bubbles, rain-drops and so on. They "choose" this shape naturally.

Given restricted space, soap-bubbles "choose" the hexagon shape. The hexagon can be observed on other examples, too, like honeycombs.

Is there a mathematical reason for that? Why are there not seven, eight, nine edges? (anything that comes closer to a circle)

-
Maybe related: math.stackexchange.com/questions/10648/… – Jonas Meyer Sep 29 '13 at 18:21
This might be true for honeycombs, but not for soap-bubbles. There seems to be an intrinsic reason for the hexagon shape. – Mare Infinitus Sep 29 '13 at 18:22
Can't comment on the "intelligence" of things that choose hexagon but Hexagonal Close Packing has the maximum Packing fraction in a lattice packing scenario. – Sudarsan Sep 29 '13 at 18:22
I never wanted to ascribe intelligence to things. It is just because I have no better description on how those things come to the shape. – Mare Infinitus Sep 29 '13 at 18:25
The basalt columns at the Giants' Causeway are mostly hexagonal also, probably for the same reason: the columns start out circular, and as they grow they tend to pack into a hexagonal lattice because that's the lowest-energy packing. Then they continue to grow into the spaces left over between the circles, thus becoming hexagons. – MJD Sep 29 '13 at 18:51

Hexagonal patterns occur in two dimensions essentially. Consider an infinte set of points (vertices) in the plane joined by edges, forming an infinite graph.

We can ignore vertices of degree 1 (dead ends) and of degree 2 (not distinguished from a point of an edge). We can also ignore the case of degree $\ge 4$ as so many edges incident with one vertex would be highly coincidental. Thus all vertices have degree $3$. Now if we cut out some large but finite portion of this infinite graoh with $v$ vertices, $e$ edges and $f$ faces, then Euler says that $v+f=e+2$. The cutting will turn about $\sqrt v$ vertices (say $c\sqrt v$ for some small $c$) into degree $2$ vertices. By counting edge-vertex incidences, we find $3v-c\sqrt v=2e$. The cutting produced one outer face that is a $c'\sqrt v$-gon for some small $c'\ge c$. For $\nu=3,4,\ldots$, let $f_\nu$ be the number of $\nu$-gonal faces apart from that outer face. Then $1+\sum f_\nu=f$ and $c'\sqrt v+\sum\nu f_\nu=2e$. Plug this into Euler to obtain $$12 = 6f+6v-6e=\sum(6-\nu)f_\nu+6+(2c-c')\sqrt v.$$ Especially, $f\approx \frac12v$ as $v$ gets large and each $\nu$-gon with $\nu>6$ must be "cancelled" by a $5$-gon or lower. In fact, any $\nu>10$ requires at least two small-gons and thus should be somewhat unusual.

So even in irregular patterns (as oppoesed to honeycombs), the (irregular) hexagon is the average and (though that does not follow immediately from the above) the dominant/typical shape.

-
Perhaps I'm being thick and missing the point here...when I look at the image of the cracked dirt, I see lots of 3, 4, and 5-gons, but I can't find a single shape that is unambiguously an irregular hexagon. Is this a counterexample, or is it a subtle illustration of your argument that's going over my head? – Brionius Dec 25 '15 at 22:21