1.8.24Electromagnetism

Magnetic field of straight wire, circular loop, solenoid, toroid

2,001 words9 min readdifficulty · medium

The two master laws (WHY they exist)

WHY this form? It is the magnetic analogue of Coulomb's 1/r21/r^2 law, but the cross product dl×r^d\vec{l}\times\hat r encodes the fact that magnetic field circulates around the current rather than pointing away from it.

WHEN to use which? Use Ampère's law when the symmetry lets you pull BB out of the integral (straight wire, solenoid, toroid). Use Biot–Savart when there's no helpful symmetry (point on the axis of a loop).


1. Straight Wire — Ampère's Law (HOW)

Derivation from scratch: Bdl=Bdl=B(2πr)\oint \vec B\cdot d\vec l = B\oint dl = B(2\pi r) Why this step? BB is constant in magnitude on the circle and parallel to dld\vec l everywhere, so the dot product is just BdlB\,dl.

Set equal to μ0Ienc=μ0I\mu_0 I_{\text{enc}} = \mu_0 I: B(2πr)=μ0I    B=μ0I2πrB(2\pi r) = \mu_0 I \;\Rightarrow\; \boxed{B = \frac{\mu_0 I}{2\pi r}}

Finite wire (Biot–Savart result) — for a segment subtending angles θ1,θ2\theta_1,\theta_2 at the point: B=μ0I4πr(sinθ1+sinθ2)B = \frac{\mu_0 I}{4\pi r}(\sin\theta_1 + \sin\theta_2) For an infinite wire θ1=θ2=90°\theta_1=\theta_2=90°, giving back μ0I2πr\dfrac{\mu_0 I}{2\pi r}. ✓


2. Circular Loop (on axis) — Biot–Savart (HOW)

No simple Amperian loop works, so integrate.

Derivation: Each element: dlr^d\vec l \perp \hat r, so dl×r^=dl|d\vec l \times \hat r| = dl. Distance r=a2+x2r=\sqrt{a^2+x^2}. dB=μ0Idl4π(a2+x2)dB = \frac{\mu_0 I\,dl}{4\pi (a^2+x^2)} Axial part: multiply by cosα=aa2+x2\cos\alpha = \dfrac{a}{\sqrt{a^2+x^2}}. B=dBcosα=μ0I4πa(a2+x2)3/2dlB = \int dB\cos\alpha = \frac{\mu_0 I}{4\pi}\frac{a}{(a^2+x^2)^{3/2}}\oint dl Why this step? dl=2πa\oint dl = 2\pi a, the circumference. B=μ0Ia22(a2+x2)3/2\boxed{B = \frac{\mu_0 I a^2}{2(a^2+x^2)^{3/2}}}


Figure — Magnetic field of straight wire, circular loop, solenoid, toroid

3. Solenoid — Ampère's Law (HOW)

Derivation: Take a rectangular Amperian loop of length LL, one side inside (field BB, parallel), opposite side far outside (field ≈ 0), two short sides perpendicular (contribute 0). Bdl=BL\oint \vec B\cdot d\vec l = BL Current enclosed = (turns in length LL) × I=nLII = nL\cdot I, where n=N/Ln=N/L turns per metre. BL=μ0(nL)I    B=μ0nIBL = \mu_0 (nL) I \;\Rightarrow\; \boxed{B = \mu_0 n I}


4. Toroid — Ampère's Law (HOW)

Derivation: Amperian loop = circle of radius rr inside the core. By symmetry BB constant on it: Bdl=B(2πr)\oint \vec B\cdot d\vec l = B(2\pi r) Enclosed current = NIN I (loop crosses all NN turns once). B(2πr)=μ0NI    B=μ0NI2πrB(2\pi r) = \mu_0 N I \;\Rightarrow\; \boxed{B = \frac{\mu_0 N I}{2\pi r}}



Recall Feynman: explain to a 12-year-old

Electricity flowing in a wire is like water rushing through a pipe, and it makes invisible "wind" that swirls around the pipe in circles. If you bend the pipe into a ring, the wind blows straight through the ring's hole. Stack lots of rings into a tube (a solenoid) and the wind inside becomes a strong, steady breeze — that's why it acts like a magnet. Bend that tube into a doughnut (a toroid) and the breeze gets trapped going round and round inside, with no wind escaping outside. How strong the breeze is just depends on how much current flows and how tightly the rings are packed.


Forecast-then-Verify checkpoint

Before reading answers, predict:

  1. Double the current in a wire → field? (doubles)
  2. Move twice as far from wire → field? (halves)
  3. Pull a solenoid twice as long with same total turns → field inside? (halves, since nn halves)
  4. Toroid field at inner vs outer edge → which bigger? (inner, since B1/rB\propto1/r)

Flashcards

Biot–Savart law formula
dB=μ04πIdl×r^r2d\vec B = \dfrac{\mu_0}{4\pi}\dfrac{I\,d\vec l\times\hat r}{r^2}
Ampère's law
Bdl=μ0Ienc\oint \vec B\cdot d\vec l = \mu_0 I_{\text{enc}}
Field of infinite straight wire at distance rr
B=μ0I2πrB=\dfrac{\mu_0 I}{2\pi r}
Why use Ampère's law for a wire but Biot–Savart for a loop's axis?
Wire has circular symmetry letting BB leave the integral; the loop axis has no Amperian path of constant BB, so you must integrate.
Field at centre of circular loop radius aa
B=μ0I2aB=\dfrac{\mu_0 I}{2a}
Field on axis of loop, distance xx
B=μ0Ia22(a2+x2)3/2B=\dfrac{\mu_0 I a^2}{2(a^2+x^2)^{3/2}}
Why do off-axis components cancel for a loop on its axis?
Diametrically opposite elements give perpendicular dBd\vec B components that are equal and opposite; only axial parts add.
Field inside a long solenoid
B=μ0nIB=\mu_0 n I, with n=N/Ln=N/L
Does solenoid field depend on radius?
No — uniform and radius-independent for an ideal long solenoid.
Field at the end of a semi-infinite solenoid
12μ0nI\tfrac12\mu_0 n I
Field inside a toroid at radius rr
B=μ0NI2πrB=\dfrac{\mu_0 N I}{2\pi r}
Is the toroid field uniform?
No — it varies as 1/r1/r, stronger near the inner edge.
Field outside a toroid / in its hole
Zero (no enclosed current for those Amperian loops).
Right-hand grip rule
Thumb points along current, curled fingers give the magnetic field direction.
Finite straight wire field
B=μ0I4πr(sinθ1+sinθ2)B=\dfrac{\mu_0 I}{4\pi r}(\sin\theta_1+\sin\theta_2)
Value of μ0\mu_0
4π×107 T⋅m/A4\pi\times10^{-7}\ \text{T·m/A}

Connections

Concept Map

generate

generate

analogue of

use when no symmetry

use when symmetric

use when symmetric

use when symmetric

gives

axial components add

stack many loops

bent into doughnut

uniform B inside

field trapped inside

Moving charges make B fields

Biot-Savart Law

Ampere's Law

Coulomb 1/r^2 with cross product

Circular loop on axis

Straight wire

Solenoid

Toroid

B = mu0 I / 2 pi r

B on axis of loop

Acts like bar magnet

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, basic idea simple hai: jab current chalta hai, uske aas-paas magnetic field ban jaata hai jo wire ke chaaron taraf circle mein ghoomta hai. Direction nikalne ke liye right-hand grip rule lagao — angootha current ki direction mein, ungliyan jis taraf mudein wahi field. Field ki strength nikalne ke do hathiyaar hain: Biot–Savart law (jab koi symmetry nahi, integration karna padta hai) aur Ampère's law (jab symmetry ho, shortcut mil jaata hai).

Straight wire ke liye Ampère's law se ek circle Amperian loop banao, aur seedha aa jaata hai B=μ0I/(2πr)B=\mu_0 I/(2\pi r) — yaani distance double karoge toh field aadha. Circular loop ke axis par symmetry nahi banti theek se, isliye Biot–Savart se integrate karna padta hai; off-axis components cancel ho jaate hain, sirf axial bachta hai, aur centre par B=μ0I/2aB=\mu_0 I/2a milta hai.

Solenoid matlab bahut saare loops ek line mein — inside field uniform ho jaata hai, B=μ0nIB=\mu_0 n I, aur yaad rakho yeh radius par depend nahi karta. Bahar field almost zero. Toroid matlab solenoid ko mod ke doughnut bana do — field poora andar hi trapped rehta hai, B=μ0NI/(2πr)B=\mu_0 N I/(2\pi r), lekin yeh uniform nahi hai, inner edge par zyada strong hai kyunki 1/r1/r hai.

Exam tip: chaaron formula ka pattern yaad rakho — straight aur toroid mein 2πr2\pi r hai (circle wala), loop mein simple 2a2a, aur solenoid "naked" hai bina rr ke. Aur multi-turn coil ho toh NN se multiply karna mat bhoolna!

Go deeper — visual, from zero

Test yourself — Electromagnetism

Connections