1.8.24 · D3Electromagnetism

Worked examples — Magnetic field of straight wire, circular loop, solenoid, toroid

2,994 words14 min readBack to topic

This page drills the parent topic until no case can surprise you. We first lay out every kind of question the four formulas can produce, then work an example for each cell — including zero cases, limiting cases, a real-world word problem, and an exam twist.

Everything below uses only four boxed results and two master laws (Biot-Savart Law, Ampere's Law). If a symbol appears, it was defined in the parent note; where a new one enters, I define it here first.


The scenario matrix

Read this as a checklist. Each row is a class of problem; the last column names the worked example that covers it. Note that Ex 4 covers two separate cells (D and E) — the same coil is used to illustrate the on-axis/far-field case and the degenerate centre case.

# Geometry Case class it tests Covered by
A Straight wire Basic magnitude + direction (sign of field around wire) Ex 1
B Straight wire Superposition of two wires — same vs opposite current sense Ex 2
C Straight wire Finite wire, and the degenerate "point on the wire's line" () Ex 3
D Circular loop Centre vs on-axis; limiting case (far field) Ex 4 (part b, c)
E Circular loop Zero/degenerate point ( recovered) + -turn coil Ex 4 (part a)
F Solenoid Interior field, end (), radius-independence Ex 5
G Toroid Inner edge vs outer edge (the variation), outside = 0 Ex 6
H Real-world Word problem: sizing a coil to hit a target field Ex 7
I Exam twist Combining loop + straight wire; when fields can and cannot cancel Ex 8

Throughout, , so the handy combo .


Ex 1 — Straight wire, magnitude + direction (Cell A)

Forecast: Guess the order of magnitude — micro-tesla? milli-tesla? And point your right thumb up: which way do your fingers sweep on your east side — toward you or away?

  1. Pick the formula. Infinite straight wire → . Why this step? One wire, full circular symmetry ⇒ Ampère's law already did the integral for us in the parent note.
  2. Convert units. . Why this step? is in metres; mixing cm gives a error.
  3. Plug in. Why this step? The cancels cleanly.
  4. Direction (right-hand grip). Thumb points up (current up), fingers curl counter-clockwise seen from above. On your east side the fingers point north. Why this step? Direction is not optional — half of a field answer is the direction.
Figure — Magnetic field of straight wire, circular loop, solenoid, toroid

Verify: Units: ✓. Magnitude is comparable to Earth's field () — sensible for 10 A at a hand's width.


Ex 2 — Two parallel wires, superposition (Cell B)

Forecast: In which case does the midpoint field vanish? Trust your right hand before reading.

  1. Field of each wire at the midpoint. Each is away: Why this step? Superposition: total field = vector sum of each wire's field. First get each piece.
  2. Same direction (a) — track each field's direction explicitly. Let both currents point up, out of the page-plane. Apply the grip rule to each wire at the midpoint:
    • The left wire's field there circulates and points upward (call it ): .
    • The right wire's field there points downward (): . Because the midpoint sits on opposite sides of the two wires, the same counter-clockwise circulation gives opposite local directions. Adding the vectors: Why this step? The subtraction is not arbitrary — it comes from the two field vectors literally pointing along and . Same magnitudes, opposite directions ⇒ genuine zero (matrix cell "net zero").
  3. Opposite direction (b). Flip the right wire's current to point down. That flips its field at the midpoint from to , so now and the two align: Why this step? Reversing one current reverses its field direction, turning the cancelling subtraction into a reinforcing addition.
Figure — Magnetic field of straight wire, circular loop, solenoid, toroid

Verify: Sanity: for the same-direction case the two wires' fields must cancel by symmetry (the midpoint sits equidistant with opposite local field directions) — and they do. See Magnetic force on a current-carrying conductor for why same-direction currents nonetheless attract each other even though the midpoint field is zero.


Ex 3 — Finite wire and the degenerate on-line point (Cell C)

Forecast: Should a finite wire give more or less field than an infinite one at the same ? Guess the direction of the inequality.

New tool — the finite-wire result from Biot-Savart Law: where are the angles the two ends make, measured from the perpendicular dropped onto the point. Why these angles? They record how much of the wire "wraps around" the point; an infinite wire fills both to . Note the constant here is (not ) — we will use consistently throughout this example.

  1. Find the angles. Symmetric point ⇒ with Why this step? = (half-length)/(distance to end); pure geometry of the right triangle end–foot–point.
  2. Plug in — one consistent constant. Using throughout: Then multiply by : Why this step? Biot–Savart's finite-wire formula carries the constant; we keep it fixed to avoid mixing factors of 2.
  3. Compare to infinite wire. The infinite-wire formula uses the other combo : The finite wire gives less (), because . Why this step? Confirms the forecast: a shorter wire has less "wrap," so weaker field. (The two formulas use different constants only because one has and the other baked in; they agree in the limit — see Verify.)
  4. Degenerate point on the line. If the field point lies on the wire's extension, then and are parallel, so . Why this step? The cross product kills contributions from a point staring straight down the wire — a case students forget.
Figure — Magnetic field of straight wire, circular loop, solenoid, toroid

Verify: Limit check: let , recovering the infinite wire — the two constants reconcile exactly. ✓


Ex 4 — Loop: centre, on-axis, far-field limit, turns (Cells D & E)

Forecast: Will the centre or the point be stronger? By how rough a factor?

  1. Centre (), turns — this is Cell E. Why this step? collapses the axis formula to (the degenerate on-axis point). Multiply by for turns.
  2. On-axis at — this is Cell D. Here , so . Why this step? Off the centre we must use Biot–Savart's axial result — no Amperian shortcut exists here.
  3. Far-field limit — also Cell D. When , drop under the root: , giving Why this step? This is the fingerprint of a magnetic dipole — the loop is one from far away.
Figure — Magnetic field of straight wire, circular loop, solenoid, toroid

Verify: Ratio check: , and directly ✓.


Ex 5 — Solenoid: interior, end, radius-independence (Cell F)

Forecast: Which is bigger — the deep-inside field or the end field? By what factor exactly?

  1. Turns per metre. . Why this step? The solenoid formula needs , not .
  2. Interior. Why this step? Ampère's rectangular loop gave a field independent of position inside — this single number holds everywhere in the bulk.
  3. End of a (semi-infinite) solenoid. Why this step? At the mouth, only "half" the solenoid lies on each side, so exactly half the field — a limiting/degenerate boundary case.
  4. Double the radius. unchanged: contains no . Why this step? The formula has no radius in it, so widening the coil (at fixed and ) does not change the bulk field — the field depends only on how tightly the turns are packed, not on the tube's width.

Verify: Ratio exactly ✓. Units: ✓.


Ex 6 — Toroid: inner vs outer edge, outside zero (Cell G)

Forecast: Where is the field strongest — inner or outer edge? Recall .

  1. Inner edge. Why this step? Ampère's circular loop inside the core encloses all turns; smaller ⇒ larger .
  2. Outer edge. Why this step? Same enclosed current, larger ⇒ weaker field — the non-uniformity in action.
  3. Just outside the toroid. An Amperian circle outside the core encloses zero net current (each turn crosses it twice, in and out) ⇒ . Why this step? This zero is the toroid's signature — the field is trapped inside.
Figure — Magnetic field of straight wire, circular loop, solenoid, toroid

Verify: Ratio , and ✓. Inner is indeed stronger, confirming the forecast.


Ex 7 — Real-world word problem (Cell H)

Forecast: Will the required current be "a few amps" or "hundreds of amps"? Guess before computing.

  1. Solve for . Why this step? The demo fixes ; we invert the solenoid formula to get the unknown current.
  2. Supply-limited version. With capped, solve for : Why this step? Now is fixed and is the design knob — same equation, different unknown.

Verify: Both answers land at essentially the same operating point (, ), a self-consistency check. A ~2 A demo current is very reasonable — matches the forecast "a few amps." The uniform field produced could then drive a demo via flux through a pickup coil (Faraday's law of induction).


Ex 8 — Exam twist: loop + wire, when fields cancel (Cell I)

Forecast: The wire's field circles around the axis; the loop's centre field points along it. Are these two fields even parallel? That single fact decides whether cancellation is possible — guess now.

  1. Loop centre field (its magnitude and direction). Why this step? Establish the loop's contribution and, crucially, its direction — it is axial.
  2. Wire current that matches that magnitude. Set the straight-wire field equal to : Why this step? Invert the straight-wire law for the current that reproduces the target magnitude. (Numerically the same digits as appear here only by coincidence of the chosen numbers.)
  3. Can they cancel? — the trap, resolved by geometry. The wire's field is perpendicular to the wire: it circles around the axis, so it lies in the loop's plane. The loop's centre field points along the axis. Two vectors at can never be anti-parallel, so they cannot cancel. The net magnitude is directed at to the axis — never zero. Why this step? The exam bait is "make them cancel." Cancellation requires anti-parallel vectors; here they are orthogonal, so the answer is a firm "no matter what is, the net is non-zero."

Verify: With the two magnitudes are equal, so the net is at to the axis — decidedly non-zero, confirming step 3.


Recall Rapid self-test (cover the right side)

Field of infinite wire, 10 A at 5 cm ::: Midpoint of two 6 A wires, same direction, 20 cm apart ::: (fields point opposite, cancel) Same, opposite direction ::: Point lying on a wire's own line ::: (since ) Loop far-field means the loop behaves like a ::: magnetic dipole Field just outside a toroid ::: (zero enclosed current) Can a wire-on-axis field cancel a loop's centre field? ::: No — they are perpendicular