The Science of Magnetic Field Lines

Iron filings show magnetic field lines.
Iron filings show magnetic field lines. Spencer Grant / Getty Images

A magnetic field surrounds any electric charge in motion. The magnetic field is continuous and invisible, but its strength and orientation may be represented by magnetic field lines. Ideally, magnetic field lines or magnetic flux lines show the strength and orientation of a magnetic field. The representation is useful because it gives people a way to view an invisible force and because mathematical laws of physics easily accommodate the "number" or density of field lines.

  • Magnetic field lines are a visual representation of the invisible lines of force in a magnetic field.
  • By convention, the lines trace the force from the north to south pole of a magnet.
  • The distance between the lines indicates relative strength of the magnetic field. The closer the lines are, the stronger the magnetic field is.
  • Iron filings and a compass may be used to trace the shape, strength, and direction of magnetic field lines.

A magnetic field is a vector, which means it has magnitude and direction. If electric current flows in a straight line, the right hand rule shows the direction invisible magnetic field lines flow around a wire. If you imagine gripping the wire with your right hand with your thumb pointing in the direction of the current, the magnetic field travels in the direction of the fingers around the wire. But, what if you don't know the direction of current or simply want to visualize a magnetic field?

How to See a Magnetic Field

Like air, a magnetic field is invisible. You can view wind indirectly by throwing small bits of paper into the air. Similarly, placing bits of magnetic material in a magnetic field lets you trace its path. Easy methods include:

Use a Compass

A group of compasses can show the directions of magnetic field lines.
A group of compasses can show the directions of magnetic field lines. Maciej Frolow / Getty Images

Waving a single compass around a magnetic field shows the direction of the field lines. To actually map the magnetic field, placing many compasses indicates the direction of the magnetic field at any point. To draw magnetic field lines, connect the compass "dots." The advantage of this method is that it shows the direction of magnetic field lines. The disadvantage is that it doesn't indicate magnetic field strength.

Use Iron Filings or Magnetite Sand

Iron is ferromagnetic. This means it aligns itself along magnetic field lines, forming tiny magnets with north and south poles. Tiny bits of iron, such as iron filings, align to form a detailed map of field lines because the north pole of one piece orients to repel the north pole of another piece and attract its south pole. But, you can't just sprinkle the filings onto a magnet because they are attracted to it and will stick to it rather than trace the magnetic field.

To solve this problem, iron filings are sprinkled onto paper or plastic over a magnetic field. One technique used to disperse the filings is to sprinkle them onto the surface from a height of a few inches. More filings can be added to make the field lines more clear, but only up to a point.

Alternatives to iron filings include steel BB pellets, tin-plated iron filings (which won't rust), small paper clips, staples, or magnetite sand. The advantage to using particles of iron, steel, or magnetite is that the particles form a detailed map of magnetic field lines. The map also gives a rough indication of magnetic field strength. Closely-spaced, dense lines occur where the field is strongest, while widely-separated, sparse lines show where it is weaker. The disadvantage of using iron filings is that there's no indication of magnetic field orientation. The easiest way to overcome this is to use a compass together with iron filings to map both orientation and direction.

Try Magnetic Viewing Film

Magnetic viewing film is a flexible plastic containing bubbles of fluid laced with tiny magnetic rods. The films appears darker or lighter depending on the orientation of the rods in a magnetic field. Magnetic viewing film works best mapping complex magnetic geometry, such as that produced by a flat refrigerator magnet.

Natural Magnetic Field Lines

The lines in the aurora follow Earth's magnetic field lines.
The lines in the aurora follow Earth's magnetic field lines. Oscar Bjarnason / Getty Images

Magnetic field lines also appear in nature. During a total solar eclipse, the lines in the corona trace the Sun's magnetic field. Back on Earth, the lines in an aurora indicate the path of the planet's magnetic field. In both cases, the visible lines are glowing streams of charged particles.

Magnetic Field Line Rules

Using magnetic field lines to construct a map, some rules become apparent:

  1. Magnetic field lines never cross.
  2. Magnetic field lines are continuous. They form closed loops that continue all the way through a magnetic material.
  3. Magnetic field lines bunch together where the magnetic field is strongest. In other words, the density of field lines indicates magnetic field strength. If the field lines around a magnet are mapped, its strongest magnetic field is at either pole.
  4. Unless the magnetic field is mapped using a compass, the direction of the magnetic field may be unknown. By convention, direction is indicated by drawing arrowheads along magnetic field lines. In any magnetic field, the lines always flow from the north pole to the south pole. The names "north" and "south" are historical and may have no bearing on the geographical orientation of the magnetic field


  • Durney, Carl H. and Curtis C. Johnson (1969). Introduction to Modern Electromagnetics. McGraw-Hill. ISBN 978-0-07-018388-9.
  • Griffiths, David J. (2017). Introduction to Electrodynamics (4th ed.). Cambridge University Press. ISBN 9781108357142.
  • Newton, Henry Black and Harvey N. Davis (1913). Practical Physics. The MacMillan Co., USA.
  • Tipler, Paul (2004). Physics for Scientists and Engineers: Electricity, Magnetism, Light, and Elementary Modern Physics (5th ed.). W. H. Freeman. ISBN 978-0-7167-0810-0.
mla apa chicago
Your Citation
Helmenstine, Anne Marie, Ph.D. "The Science of Magnetic Field Lines." ThoughtCo, Aug. 27, 2020, Helmenstine, Anne Marie, Ph.D. (2020, August 27). The Science of Magnetic Field Lines. Retrieved from Helmenstine, Anne Marie, Ph.D. "The Science of Magnetic Field Lines." ThoughtCo. (accessed March 20, 2023).