Magnetic Fields of Magnets and Currents

A 45-minute guided lesson: students map the field of a bar magnet, discover how fast it fades with distance, compare it with the circular field of a current-carrying wire (right-hand rule), and use superposition to explain why parallel currents and facing magnets attract or repel.

Level: Grades 9–11 · AP Physics 2 · IB Physics SL45 minSimulator used in this lesson: Magnetic Field

Learning objectives

  • Describe the field of a bar magnet with field lines: direction (N → S outside the magnet), closed loops, strength from line density.
  • Show with measurements that a dipole field falls roughly as 1/r^3 while the field of a long straight wire falls as 1/r.
  • Apply the right-hand rule to find the direction of the field around a current.
  • Use superposition to predict where fields of two sources cancel or reinforce, and link this to attraction and repulsion.

Students should already know

  • Magnets have two poles; like poles repel, unlike poles attract.
  • Electric current as a flow of charge; the idea of a vector field (from the electric-field lesson, if taught).

Standards

  • NGSS HS-PS2-5
  • NGSS HS-PS3-5
  • AP Physics 2 · Unit 4 (Magnetism)
  • IB Physics · Topic D.3
Warm-up

1.What does the field of a magnet look like?

~5 min

You have probably seen iron filings around a bar magnet. Before opening the simulator, sketch what you remember and answer:

In the simulator pink arrows show vec B (length and opacity ≈ strength), gold curves are field lines, ⊙ marks a current coming out of the screen and ⊗ a current going in. The readout |B| at center samples the field exactly at the middle of the canvas, so by placing sources at known distances from the centre you can measure how the field falls off.

Explore 1

2.Mapping a bar magnet

~8 min

A single bar magnet sits a little left of the centre of the canvas with its north pole pointing right.

Your task

  1. Follow one gold field line with your finger. Where does it leave the magnet and where does it re-enter? Does it ever stop in empty space?
  2. Compare the pink arrows close to a pole with those far away. Where is the field strongest? Where do the field lines bunch together?
  3. Use Rotate all magnets (⟲ / ⟳). Does the pattern change shape, or only turn with the magnet?
  4. Drag the magnet to a corner. Does the field pattern follow it unchanged?

Outside the magnet the field lines run from the north pole to the south pole; inside (not drawn here) they continue from S back to N, so every line is a closed loop. Unlike electric field lines, magnetic field lines have no start or end: there are no isolated magnetic charges (no “monopoles”). The field is strongest at the poles, where the lines are densest, and fades quickly with distance.

Explore 2

3.How fast does a magnet’s field fade?

~10 min

Here the magnet is placed 0.20 units to the left of the canvas centre, so the centre lies on the magnet’s axis beyond its north pole. The readout gives |B| there.

Your task

  1. Record |B| at center for the magnet at distance r = 0.20.

Now the same magnet is 0.30 units from the centre — 1.5 times farther.

Your task

  1. Record |B| at r = 0.30 and compute the ratio B(0.20) / B(0.30).
  2. Compare with the candidates: 1.5 = 1.5^1, 2.25 = 1.5^2, 3.375 = 1.5^3. Which power of the distance describes a magnet’s field?

Finally the magnet is again 0.20 units away, but now below the centre, so the centre is beside the magnet rather than on its axis.

Your task

  1. Record |B| at the centre and compare with the on-axis value at the same distance. What is the ratio?
  2. Look at the arrow direction at the centre. Is it parallel or antiparallel to the magnet’s N direction?

You should find |B| = 15.0 on the axis at r = 0.20, 4.44 at r = 0.30 (ratio 3.375 = 1.5³) and 7.5 beside the magnet at r = 0.20. A small magnet is a magnetic dipole: its field falls as 1/r³ — far faster than the 1/r² of a point charge — and is twice as strong on the axis as at the same distance to the side, where it also points the opposite way.

Dipole field on the axis

( B_textaxis = dfracμ_04π\,dfrac2 mr^3\)

Dipole field beside the magnet (equatorial)

( B_perp = dfracμ_04π\,dfracmr^3 (opposite direction)\)

Scaling

( r to 1.5\,r \;Rightarrow\; B to B / 3.375\)

Explore 3

4.The field of a current

~8 min

A long straight wire carrying current out of the screen (⊙) is placed 0.10 units to the left of the centre. No magnets.

Your task

  1. Describe the shape of the field lines. Which way do the arrows circulate — clockwise or counter-clockwise?
  2. Point the thumb of your right hand out of the screen (along the current). Which way do your fingers curl? Does it match the arrows?
  3. Record |B| at center for r = 0.10.
  4. Switch the wire to the opposite current direction: in Wire (I) mode choose ⊗ In, click to place a new wire and drag the old one off to a corner. What changes about the arrows? What stays the same?

The same wire, now 0.20 units from the centre — twice as far.

Your task

  1. Read |B| at the centre. By what factor did it drop when r doubled? Compare with the magnet in Explore 2, where doubling the distance would divide B by 8.

Around a straight current the field lines are concentric circles, with the direction given by the right-hand rule: thumb along the current, fingers curl along vec B. For current out of the screen the field circulates counter-clockwise. The readouts give |B| = 1.20 at r = 0.10 and 0.60 at r = 0.20: doubling the distance halves the field — a 1/r law, much gentler than the magnet’s 1/r³.

Long straight wire

( B = dfracμ_0 I2π r\)

Direction

Right-hand rule: thumb → current, curled fingers → ( vec B\)

Permeability of free space

( μ_0 = 4π × 10^-7\ textT·m/A\)

Explore 4

5.Superposition: two wires, two magnets

~9 min

Two parallel wires, both carrying current out of the screen, sit 0.15 units left and right of the centre.

Your task

  1. Before reading the number: at the midpoint, which way does the left wire’s field point? The right wire’s? Use the right-hand rule for each.
  2. Read |B| at center. Does it agree with your prediction?
  3. Look at the field lines far from both wires — what single object do they resemble?

Now the right-hand wire carries its current into the screen (⊗).

Your task

  1. Repeat the right-hand-rule prediction at the midpoint, then read |B|. Why is it now large?
  2. Each wire sits in the field of the other. Using vec F = I vec L × vec B (or simply “a current is pushed sideways by a field”), decide: do parallel currents attract or repel? Antiparallel?

Between parallel currents the two circular fields point in opposite directions and cancel at the midpoint (|B| = 0); the combined pattern far away looks like that of one wire with double the current. Between antiparallel currents the fields reinforce (|B| = 1.60 — each wire contributes 0.80 at r = 0.15). The force on each wire follows: parallel currents attract, antiparallel currents repel — the effect that defined the ampere.

Now two bar magnets, 0.15 units left and right of the centre, both with N pointing right — so the N of the left one faces the S of the right one.

Your task

  1. Read |B| at the centre. Look at the gold lines in the gap: do they run straight through from one magnet into the next?
  2. Predict: if the right magnet is turned around so that N faces N, will |B| at the centre go up or down?

Your task

  1. Here the right magnet has been turned by 180°. Read |B| at the centre and compare. Where do the lines from the two north poles go now?
  2. Which arrangement attracts and which repels? Connect your answer to what the lines do in the gap.

With N facing S the two axial fields point the same way, |B| at the midpoint is large (≈ 71) and the lines run straight through the gap — the magnets attract. With N facing N each pole pushes its field *away* from itself, so at the midpoint the fields cancel (|B| = 0) and the lines are forced out sideways — the magnets repel.

Worked example

6.A real wire

~5 min

Field of a household current

A straight cable carries 10 A. (a) Find the magnetic field 2.0 cm from the cable. (b) At what distance does the field drop to the strength of the Earth’s field, about 5 × 10⁻⁵ T? (c) By what factor is the field weaker 8.0 cm away than 2.0 cm away?

  1. (a) B = dfracμ_0 I2π r = dfrac4π × 10^-7 · 102π · 0.020 = dfrac2 × 10^-7 · 100.020 = 1.0 × 10^-4\ textT — twice the Earth’s field.
  2. (b) Solve for r: r = dfracμ_0 I2π B = dfrac2 × 10^-65 × 10^-5 = 0.040\ textm = 4.0\ textcm.
  3. (c) B propto 1/r: going from 2.0 cm to 8.0 cm (×4 in distance) divides B by 4, giving 2.5 × 10⁻⁵ T. A small magnet’s field would have dropped by 4³ = 64 over the same ratio.

(a) 1.0 × 10⁻⁴ T; (b) 4.0 cm; (c) a factor of 4 (2.5 × 10⁻⁵ T).

Quiz

7.Check your understanding

Answer each question, then press Check. Numeric answers from the simulator are accepted within the stated tolerance.

1.Outside a bar magnet, magnetic field lines run…

2.A current flows straight up out of the page. Its magnetic field lines are…

3.The field 0.10 units from a straight wire reads 1.20 (arbitrary units). What will it read 0.30 units away?

±3 % accepted

4.On the axis of a small magnet the field at 0.20 units reads 15.0. What does it read at 0.40 units?

±3 % accepted

5.Two long parallel wires carry currents in the same direction. Which statements are true? (Select all that apply.)

6.Two bar magnets are placed end to end with north facing north. At the midpoint between them…

8.Homework

  1. Place a wire carrying current out of the screen 0.15 units left of the centre and a second wire with current into the screen 0.15 units right. Then add a third wire so that |B| at the centre becomes as small as you can make it. Sketch the final arrangement and explain it with the right-hand rule. Open simulator with these settings ↗
  2. Four wires at the corners of a square, all carrying current out of the screen. Predict the field at the centre of the square before you look at the readout, then explain the field-line pattern you see. What does it start to resemble — and why is this the idea behind a solenoid? Open simulator with these settings ↗
  3. Measure |B| at the centre for a magnet on its axis at r = 0.20, 0.25, 0.30 and 0.40 (drag it along the horizontal grid line, or edit the m= value in the “Open full simulator” link). Plot B against 1/r³. Is the graph a straight line through the origin? Open simulator with these settings ↗

Notes for teachers

  • Pacing: Warm-up 5 min, Explore 1 8 min, Explore 2 10 min, Explore 3 8 min, Explore 4 9 min, worked example and quiz 5 min. Explore 4’s magnet part can be made a demonstration on the projector if time is short.
  • The simulator treats a magnet as a point dipole and draws only the exterior field; the interior S → N return path is not shown. Say this explicitly in Explore 1 so students do not conclude that lines “start at N”.
  • Field values are in arbitrary units and the |B| readout is sampled at the canvas centre, which is not marked. All measurements therefore use presets that place a source at a known distance from the centre; the text gives the exact expected values (15.0 / 4.44 / 7.5 for the magnet, 1.20 / 0.60 for the wire, 0 / 1.6 for the wire pairs, 71.1 / 0 for the magnet pairs). Values students obtain by dragging will be within ~10 %.
  • Every quantitative step uses its own preset embed, so students only read numbers; positions set by dragging are approximate. For extra data points (homework 3) students can edit the m= or w= value in the “Open full simulator” link — the format is x,y,angle for magnets and x,y,current for wires.
  • Misconceptions targeted: (1) magnetic field lines have ends like electric ones — Explore 1; (2) all fields fall as 1/r² — Explore 2 vs 3; (3) parallel currents repel “because like things repel” — Explore 4.
  • Extension: the force between parallel wires defined the ampere until 2019; strong students can look up the 2 × 10⁻⁷ N per metre figure and derive it from the wire formula with I = 1 A, r = 1 m.