Why does a magnetic field generate clearly visible separation? I have noticed that when particles of metal are captured by a magnetic field. They separate into clearly visible patterns of lines. Why don't the particles form a more even distributed pattern?
Do these gaps/lines exist in the magnetic field itself?
Can someone explain why this happens?
As illustrated by this images.



 A: Each particle of iron  in a magnetic field becomes  a tiny  magnet, following the field lines. A small dipole. This means it will attract at its two poles and be neutral in the middle. This is a way of making a line. 
The pictures you show are made for the purpose of displaying the field lines . If the whole area were filled with iron dust the effect would be much less visible, though there would be a direction, a type of flow of the dust, due to the gradual orientation of the dipoles along the field lines . The field lines themselves fill the space continuously.
A: The presence of the magnet's field magnetizes each little strip so that, as Anna says, each strip becomes itself a tiny magnet. This has two consequences:


*

*The energy of each strip is minimal when it is aligned with the field. This causes all filings to turn where they are and face (preferentially) the local direction of the field, which will already create a picture of the field.

*The filings now interact with each other and are therefore attracted or repelled from each other depending on their relative alignment, as shown in the image below. This makes the head-to-tail configuration much more favourable than the side-to-side configuration (from the two that have $\mathbf{m}_1$ and $\mathbf{m}_2$ parallel; the others are discouraged by the original field from the magnet which is of course stronger) and the filings will therefore move around to achieve this as far as possible. This is what causes the lines you ask about.



(of course, to get an intuitive feel for how the dipole-dipole interaction really works, grabbing a pair of bar magnets and moving them about definitely beats staring at pictures!)
