All simulations中文
Magnetic field lab

Explore field direction

N-end angle 0.0°Outside the magnet · N → S
N endS endField lines

Drag the gold ring or tap an empty spot

Arrows show field direction along each line
How it works ↓

Which way does the magnetic field point?

The north-seeking end of a freely rotating compass needle points along the local magnetic field when it settles. Drag the needle around a magnet and compare its angle with the nearby field line. Outside the magnet, field lines point from N to S. They continue through the magnet from S to N, forming closed loops.

Why use both a compass and iron filings?

A field line is tangent to the magnetic field at each point. The field also exists between the drawn lines. Where the field has a definite direction, two lines cannot cross. A crossing would assign two directions to the same point.

Iron filings become magnetized and align with the field. The simulation shows that alignment with short marks at fixed positions. Reverse the poles and the marks keep the same alignment, while the red N end of each needle turns through 180°.

What each view tells you

What you seeWhat it showsWhat you would still need to measure
Compass needleThe N end gives the local field direction.Field strength
Iron filingsThe marks show the shape of the field pattern.Which way the field points along each mark
Field-line arrowsOutside a magnet, the arrows point from N to S.Field strength in physical units
Earth near geographic northThe external field points into Earth, as it does near a magnet’s S pole.The local compass bearing in the real field

Try it

  1. Start with the bar magnet. The N end points right (0°) above the center. Move the needle onto the centerline to the left of the magnet. It points left (about 180°). Compare the needle at each spot with the tangent to a nearby field line.
  2. Record an angle, reverse the poles without moving the probe, and record again. The angles are half a turn apart.
  3. Hide the field lines and enable iron filings. Predict what you’ll see when you reverse the poles. Then enable the needle array to compare the marked N ends with the filings.
  4. Select the horseshoe magnet. Compare the needle in the gap with one outside the arms. In the gap the field points from the upper N pole toward the lower S pole.
  5. Select Earth. Near the equator on the right, the N end points up. Above geographic north it points down toward Earth. The needle rotates in a meridian section, so it can show the field’s vertical component.

Model assumptions and references

The bar and horseshoe scenes approximate the external field with a pair of effective poles. These poles are a mathematical representation. The model leaves out the effect of the horseshoe’s curved back and the detailed field at the pole faces. Use the view to compare directions qualitatively. The grid has no physical length scale. The display traces a finite set of lines and clips them at the magnet or the edge of the drawing.

Earth is modeled as a dipole with its magnetic and rotation axes aligned. Dashed lines inside Earth indicate how the field loops close. In reality, currents in the core generate Earth’s field. Its magnetic axis is tilted relative to the rotation axis, and the field varies with location and time. A horizontal navigation compass responds to the horizontal component of that field. Here the needle reaches equilibrium instantly at the chosen spot, and the model leaves out other magnets, background fields, needle motion toward the magnet, and the buildup of filings.

See the direction and loop conventions in OpenStax, Magnetic Fields and Lines and the description of Earth’s field in OpenStax, Magnetism and Its Historical Discoveries.

Are magnetic field lines real?

Field lines are a way to draw a magnetic field. Each line is tangent to the field at every point, and arrows give its direction. The lines do not represent particle paths.

Which end of a compass needle points along the magnetic field?

The north-seeking end of a freely rotating needle points along the local field at equilibrium. The south-seeking end points in the opposite direction.

Can iron filings tell you which way a magnetic field points?

Filings show the shape of the field pattern. Each mark has two indistinguishable ends, so an aligned mark alone cannot tell you which way along its axis the field points. Place a marked compass needle at the same spot to tell the two directions apart.

Why does the north end of a compass point toward geographic north?

Near geographic north, the external field enters Earth, as it does near the south pole of a bar magnet. The simulation aligns the magnetic and geographic axes. In the real field, a horizontal compass can point at an angle to geographic north.

Classroom use

Designed for middle school electricity and magnetism lessons. Ask students to predict what each view will show when you reverse the poles. The Earth scene extends the lesson to field direction in a vertical section.