They come out of the can in a gleaming 6 × 6 × 6 cubic crystal. It took me a day to figure out how to get them back into the can. But that’s not the deepest mystery about these curiously powerful little ferromagnetic balls.

A web search turns up lots of sites that sell the magnets under various brand names, and a few more web pages that warn of their dangers. There are also videos and picture galleries of interesting constructions, such as polyhedra or a Möbius band. But I haven’t been able to find anything on the questions that intrigue me most: For a set of *N* magnet balls, what is the ground-state configuration—the geometric arrangement of lowest energy? How about the state of lowest *free energy*? Informally: Given a handful of magnet balls, what is the shape they most “want” to assume?

You can get some rough intuition about these matters by using your fingertips. Take a random clump of magnet balls and try to pull them apart. How much force do you have to apply when you tug in various directions? How does the cluster break apart? I find that the balls usually peel off in long strings of pearls, going directly from a three-dimensional aggregate to a one-dimensional chain. This behavior is not entirely surprising. After all, the magnets are dipoles, and so they can reduce their total energy by lining up north-south-north-south-north-south….

Once you have a long chain, you can reduce its energy a little bit further by connecting head to tail to form a closed loop. But then, when you play around with the resulting bracelet of beads, you soon discover that the circular configuration is not at the bottom of the energy spectrum. The loop—if it’s long enough—tends to collapse on itself, with the strands on opposite sides zipping together in the middle, forming what RNA chemists would call a double-ended hairpin structure.

Note the alignment of the beads in the zippered region: The arrangement is rectilinear, as in a square lattice. By bringing together more strands of beads, we can grow this zippered arrangement into a fully two-dimensional, planar pattern. However, when you try this experiment with half a dozen short strands, you quickly discover that there’s more than one way of combining them. The dipoles give each strand an orientation, and so adjacent chains can be either parallel or antiparallel. The rectilinear habit of the zippered loop comes from antiparallel alignments. Parallel strands assume a quite different pattern, with triangular or hexagonal symmetry. It’s the difference between Kansas and Tennessee:

It might look as though you could convert one of these arrangements into the other just by squeezing and skewing, but that’s not the case at all. If you could see the north and south poles of each ball magnet, they would look something like this:

Which of these arrangements lives in the deeper energy well? Kansas is stabilized by a multitude of local rectangular flux loops, which link adjacent antiparallel rows. (There may be weak longer-range attractions as well.) The parallel strands in Tennessee, in contrast, form one big global flux tube, with highly favorable interactions within the fabric of the layer but with nothing to help close the flux loops that exit one end of the state and re-enter the other.

Both kinds of planar sheets are happy to roll up into hollow cylinders. The resulting tubes (which can also be made by stacking rings) are notably sturdy, stable and stiff. More than any other structures I’ve discovered in playing with the magnet balls, the tubes seem to have the quality that Buckminster Fuller used to call *tensegrity*. The Tennessee roll-up is slightly stronger than the Kansas model. (I’ve tried constructing hemispherical endcaps for the tubes, without success.)

What about a fully three-dimensional, space-filling lattice? We already know about the simple cubic lattice, because that’s the configuration that comes out of the shipping container. But my attempts to build multiple layers of the hexagonal close-packed lattice have all failed. A two-layered Tennessee will not lie flat. Or, looking at it another way, magnetic cannonballs cannot be stored in the classic Keplerian heap. Even a tetrahedral pile with just four balls is violently unstable and spontaneously rearranges itself into a linear chain or a flat square.

Looking at all these forms, I see an analogy with carbon chemistry. [Warning: half-baked ideas ahead!] According to the analogy, the cubic lattice of magnet balls is like diamond. Not that it has the same geometry as diamond, but it is the most symmetrical arrangement, and the only one that fills three-dimensional space. The Tennessee pattern with its hexagonal symmetry is analogous to graphene or graphite—a substance that is actually more stable than diamond but has reduced symmetry. Continuing in this scheme, the Tennessee roll-up has to be a buckytube.

• • •

Whatever the true identity of the lowest-energy configuration, it’s a state you would expect to see emerge spontaneously only after an eternity of gradual cooling toward zero temperature. For those of us with a shorter attention span, the state of lowest *free energy* might be of greater interest. Let’s define free energy as

*A = U – TS*

where *U* is the ordinary internal energy—the stuff we were trying to minimize in the paragraphs above—*T* is the temperature and *S* is entropy. In this context, temperature is not what the thermometer in the room reads. It’s a measure of how vigorously we agitate the system of balls, for example by shaking them in a box. As for the entropy, let’s think of it as counting the number of microstates per macrostate. The free-energy formula, as I understand it, implies the following: If we take random samples from a population at temperature *T*, then the configurations we’re most likely to see are those that balance the imperatives to minimize *U* and to maximize *S*. The value of *T* determines the relative weight assigned to energy and entropy.

I tried the obvious experiment. I put some magnet balls in a Tupperware box and shook vigorously. The result was noisy and uninformative. The magnetic forces are so strong that it would take a whole lot of shaking to have any observable effect. Indeed, I think the box might disintegrate before the cluster of magnet balls did.

So I tried a different approach. I looked at very small clusters, typically two or three balls, and watched what happened when they collided. I arranged the collisions by having the balls slide or roll down the walls of a large china bowl, meeting at the bottom. In effect, the height and steepness of the walls play the role of temperature in this procedure. Here are my notes from the first series of experiments, in which each pairing was repeated 20 times:

I thought I noted a bias toward small, open rings. To explore this possibility a little further, I tried colliding individual balls with progressively larger rings or ringlike clusters.

These results also suggested a preference for symmetrical *n*-gons, especially pentagons and hexagons, with diminishing effects as *n* gets smaller than 5 or larger than 6. Again it’s tempting to interpret the results in light of organic chemistry, where the bond angles of carbon atoms favor 5- or 6-member rings (cyclopentane, cyclohexane, benzene); smaller rings are very hard to make, while larger ones are floppy and fragile.

But perhaps I’m a little too eager to believe these chemical analogies. After all, when you start with ring-shaped ingredients, you might expect to get ring-shaped products. Here’s what I saw after colliding various small linear chains:

The preference for rings has largely disappeared; noncyclic clusters predominate. Bashing together five-bead strands produces quite a zoo of exotic shapes, hinting at still more diversity as the size of the molecules increases.

Performing these experiments is tedious, and the results are probably not trustworthy. When dumping balls into a bowl, many factors are hard to control, and some of them cannot easily be randomized either. An important example is the impact geometry when two chains meet in a collision. Coming together end-to-end might well produce a different outcome than meeting broadside.

Rather than work on refining my experimental techniques, I would like to try simulating the system. Doing all this inside a computer allows for greater control, better statistics and better randomness; besides, we can do some tricks that would be difficult in the physical world, such as turning magnetism on and off whenever it’s convenient. However, creating an accurate simulation looks difficult and messy. Magnetic forces are harder to calculate than the simple inverse-square-law forces of most *n*-body simulations. Moreover, the program might also have to include friction and angular momentum. (Some clusters of beads can roll, whereas others slide.)

I’ve been able to find just one example of such a program, mentioned in a thread at Physics Forum. Perhaps there are others.

I have the persistent sense that I am retracing the footsteps of others, but I have not been able to spot their tracks. The arXiv, the *American Journal of Physics* and the IOP journals all seemed like good prospects, but my searches have come up empty. I’ll be grateful for any pointers.

I think the keywords you need to find the paper trail are “dipolar hard sphere”.

It is a well known statistical mechanical model of polarizable liquids, and in particular is sometimes used as the simplest model of water available.

Very interesting post. Keep up the path of discovery.

Fun stuff.

But you can do 3D hex packing. Here’s a picture : http://goo.gl/JGfJ6 .

Starting small (like a tetrahedral clump of 4) doesn’t work; the edge effects make things unstable. That’s true of cubic packing too. A 6x6x6 cube is stable; a 2x2x2 is not.

Instead start with several large 6×6 or so hex pack planar sheets. With a bit of trial and error you’ll find that they can be aligned on top of each other in several different ways, with different sorts of symmetry.

See for example http://youtu.be/Rm-i1c7zr6Q for a nice video on 3D lattice sphere packing.

How big are these balls? There’s nothing to show their scale.

John Cowan: 5 mm diameter, generally.

My thanks for very helpful pointers and other comments.

@Alemi: That’s the magic incantation I was looking for! (Most of what I’ve found so far deals with polar fluids and colloids, whereas I think the magnet balls might better be treated as jammed granular matter. But at least now I have a point of entry into the literature. Thanks.

@Jim Mahoney: Inspired by your comment and the linked photo, I’ve wasted a few more hours trying to create an fcc or hcp crystal out of magnet balls. Partial success: I get some lumpy blobs that appear to be locally close-packed in some regions, but with lots of defects. Fascinating. By the way, I find that a 2 x 2 x 2 cube is indeed stable–or metastable enough that I can make one and let it sit on the table without spontaneous rearrangement. I can’t make it by folding an octagon, but I can stack two squares.

@john Cowan: I splurged and bought the 6mm size.

You can easily make hemispherical endcaps for your tubes, if your tube circumference is a multiple of 5. The end-cap is based on the dodecahedron, which is easily constructed by making 12 loops of 5 balls, then attaching the loops together Kansas-style, with 5 loops bordering any given loop, cupping the center loop a bit.

Taking slices of that dodecahedron will give you caps for 5, 10, or 15 balls circumference tubes… you can make larger by interspersing loops of 6 balls in among the loops of 5 balls.

“You can easily make hemispherical endcaps for your tubes, if your tube circumference is a multiple of 5″ How to do that?

This should be of interest!

http://arxiv.org/pdf/1011.5412v2.pdf

Deriving Finite Sphere Packings

Arkus, N., Manoharan, V. N., & Brenner, M. P.

SIAM Journal on Discrete Mathematics, 25(4), 1860 (2011). d

I remember to have seen a theoretical study of magnetic-compass lattices:

http://arxiv.org/abs/cond-mat/0512563

Fantástico ! You could use a GPU to crack the problem :)

I loved the post,

There’s one here you’ve not tried maybe?

https://m.facebook.com/ElectricFieldLines/photos/a.934281463354354.1073741828.934262486689585/1167386623377169/?type=3&source=54