# What's the most stable crystal lattice for a collection of spherical toy magnets?

I recently found a bunch of tiny spherical toy magnets, and I've been having fun sticking them into various shapes.

In two dimensions, there are only two possible packings of the magnets: a square and a hexagonal lattice. There's some interesting physics going on between these two phases.

• In the square phase, alternating lines of magnets need to have opposite polarity. In the hexagonal phase, they need the same polarity. As a result, the phases really don't want to coexist; trying to build a crystal alternating between the two falls apart.
• The hexagonal lattice appears marginally more stable. When I construct a 'random' 2D lattice by quickly smushing a ball of magnets, it usually looks more hexagonal.
• Despite this, the square lattice is kinetically stable for large lattices. The transition point seems to be about $2 \times 2$. I was able to build a large tower with a $2 \times 2$ square lattice cross section, but it spontaneously turned hexagonal with a little tap.

I haven't been able to analyze the 3D case, where the structures are more complicated, because I don't have enough magnets. What physical models are behind this toy? What are the most stable structures in 3D?

• Regarding your second question: According to this video, in the 3D case, 'the balls are closest together (hcp) which makes it the most stable' Aug 19 '16 at 8:11
• @lemon I'm not totally sure. That's true for, say, a system of particles with some suitable attractive interaction. But the magnets are more complicated than that; they each have a North and a South pole. The most stable arrangement is what gets opposite poles closest together, and that might not be the same as what gets the centers closest. Aug 19 '16 at 8:12
• Well he is describing the same magnetic system that you are. Aug 19 '16 at 8:35
• Could you upload some pictures ? Aug 30 '16 at 9:17