Oersted's accidental discovery — a compass needle twitching near a current-carrying wire — led to the entire science of electromagnetism. From the Biot-Savart law to the cyclotron, with animated field visualisations, interactive simulators, and 20+ real-life examples.
Before diving in, here's the entire chapter on one page. This is your mental map — every topic is a link in this chain.
Moving charges create magnetic fields (Biot-Savart). Fields are perpendicular to current. Ampere's law computes B for symmetric configurations (solenoid, toroid). A moving charge in a B-field feels a Lorentz force F=qv×B. When many charges move (current), the wire feels a force too. Two parallel wires attract/repel. A current loop becomes a magnetic dipole (τ = m×B). The moving-coil galvanometer uses all these ideas — it's the ancestor of every electric motor and meter.
In 1820, Hans Christian Oersted noticed that a compass needle deflected when placed near a current-carrying wire. For the first time, a link between electricity and magnetism was demonstrated. Within weeks, Ampère and Biot-Savart quantified the effect.
The magnetic field at point P due to a small current element I dl:
dB = (μ₀/4π) · (I dl × r̂) / r²
Where:
Magnitude: dB = (μ₀/4π) · (I dl sinθ) / r²
Direction: given by the right-hand rule (curl fingers from dl toward r̂; thumb points along dB).
Biot-Savart law: dB = (μ₀/4π)(I dl×r̂)/r². Moving charges create magnetic fields. Direction by right-hand rule. Field strength ∝ I, ∝ sinθ, ∝ 1/r². Foundation of all magnetostatics.
B = μ₀I / (2πr)
Direction: tangent to circles centered on the wire (right-hand grip rule — thumb along I, fingers curl in direction of B).
Falls as 1/r (not 1/r² like point source!).
For a wire extending from angle α to β (measured from the perpendicular to P),
B = (μ₀I/4πr) · (sinα + sinβ)
For infinite wire (α = β = 90°): B = μ₀I/(2πr) ✓
At midpoint of a finite wire of angular half-width α: B = (μ₀I/2πr) · sinα
Right hand: point thumb along current direction. Fingers curl in the direction of magnetic field lines.
Alternative: "Right-hand screw" rule — rotate a screw in current direction; the direction it advances is the B-field direction. Useful for loops.
Straight wire: B = μ₀I/(2πr) — falls as 1/r. Field lines are concentric circles. Direction by right-hand grip rule. Finite wire: B = (μ₀I/4πr)(sinα+sinβ).
At distance x from the centre, along the axis:
B = μ₀ I R² / [2(R² + x²)^(3/2)]
For N turns: multiply by N.
At the centre (x = 0): B = μ₀ I / (2R) (for N turns: B = μ₀NI/2R)
For x ≫ R: B ≈ μ₀IR²/(2x³) = μ₀·2m/(4πx³) — same as electric dipole!
m = N I A (magnitude)
Direction: perpendicular to the loop plane, by right-hand rule (curl fingers in current direction, thumb points along m).
Units: A·m²
Analogy with electric dipole: replace p → m, 1/ε₀ → μ₀.
Mistake: "B at centre = μ₀I/2R² (wrong power of R)."
Correction: B at centre = μ₀I/(2R) — inverse first power. B on axis at large x = μ₀IR²/(2x³) — inverse cube at distance.
Mistake: "m points along current direction."
Correction: m is perpendicular to the loop. Right-hand rule: curl fingers along current, thumb gives m.
Circular loop: B at centre = μ₀NI/2R. On axis = μ₀NIR²/(2(R²+x²)^(3/2)). Magnetic moment m = NIA, perpendicular to loop. Loop behaves like a magnetic dipole — same math as electric dipole with p→m, 1/ε₀→μ₀.
For any closed loop (Amperian loop) in space:
∮ B · dl = μ₀ Ienc
Where Ienc is the net current enclosed by the loop.
The loop can be any shape — the result depends only on the enclosed current, not the loop geometry. Useful for computing B when symmetry exists.
Ampere's law is most useful when you can find a loop where B is either constant or perpendicular to dl — usually because of high symmetry (infinite wire, solenoid, toroid). For irregular shapes, use Biot-Savart.
Choose a circular Amperian loop of radius r around the wire. By symmetry, B is constant along the loop and tangent to it.
∮B·dl = B × 2πr = μ₀I
→ B = μ₀I/(2πr) ✓ — matches Biot-Savart.
∮B·dl = μ₀Ienc. Magnetic analog of Gauss's law. Useful for high-symmetry cases (wire, solenoid, toroid). Choose smart Amperian loop where B is uniform or perpendicular to dl.
A tightly wound helix of insulated wire, length ℓ ≫ radius r. n = N/ℓ = turns per metre.
Field inside (far from ends):
B = μ₀ n I = μ₀ N I / ℓ
Uniform, parallel to the axis. Direction: right-hand grip rule.
Field outside (long solenoid): ≈ 0.
At the ends: B ≈ μ₀nI/2 (half the interior value — end-effect).
A solenoid bent into a donut shape. N turns total, mean radius R:
B = μ₀ N I / (2πr) (inside the toroid, at radius r)
Field confined to the core; B = 0 outside and in the "hole."
For a thin toroid (r ≈ R): B ≈ μ₀nI (same as solenoid).
Trap: "Solenoid field depends on radius."
Correction: For an ideal long solenoid, B = μ₀nI — independent of radius (for points inside, far from ends). The radius matters only for the flux through the coil (Φ = B·A).
Trap: "Use Ampere's law with a circle through the solenoid."
Correction: The Amperian loop must be a rectangle (with one side inside, one side outside) — a circle would give ∮B·dl = 0 (since B is zero outside and loop encloses no net current).
Solenoid: B = μ₀nI, uniform inside, ~0 outside. Toroid: B = μ₀NI/2πr (confined to core). Basis of electromagnets, MRI, loudspeakers, transformers, fusion reactors. Larger n = stronger field.
F = q (v × B)
Magnitude: F = qvB sinθ
Direction: perpendicular to both v and B (right-hand rule for positive charge; opposite for negative).
Special cases:
Magnetic force does NO work (F ⊥ v always). So kinetic energy is constant — only direction changes.
When v ⊥ B, the particle moves in a circle. Lorentz force = centripetal force:
qvB = mv²/r → r = mv/(qB)
Period: T = 2πm/(qB) — independent of speed!
Angular frequency: ω = qB/m (cyclotron frequency)
If v has a component along B → helical path (superposition of circular + linear).
Mistake: "Magnetic force does work on a moving charge."
Correction: NO — F ⊥ v, so W = F·d = 0. Magnetic force changes direction only, never speed or kinetic energy.
Mistake: "Charged particle in B-field spirals inward and loses energy."
Correction: In a pure magnetic field (no radiation reaction), the particle moves in a perfect circle at constant speed. It only spirals if there's a component of v along B (helical path) or if it radiates (synchrotron).
Lorentz force: F = qv×B. Perpendicular to both v and B. Performs no work. Circular orbit: r = mv/qB, T = 2πm/qB (independent of v). Helical path if v has parallel component. Basis of mass spectrometers, cyclotrons, auroras.
A cyclotron accelerates charged particles using:
Since T = 2πm/qB is independent of speed, the AC frequency must match:
foscillator = qB/(2πm)
Then every time the particle crosses the gap, the field is in the right direction to accelerate it.
Radius at speed v: r = mv/qB (grows with v)
Maximum kinetic energy (when r = R, radius of the dees):
K_max = q²B²R²/(2m) = ½mv² at extraction
Independent of the accelerating voltage!
Number of revolutions: n = K_max/(2qV) where V = accelerating voltage.
Trap: "Cyclotron can accelerate neutrons."
Correction: NO — cyclotron uses magnetic force, which requires charge. Neutrons are neutral and unaffected by magnetic fields. Cannot be accelerated this way.
Trap: "Cyclotron can accelerate electrons efficiently."
Correction: For electrons, even modest energies are relativistic (electron mass increases), so the cyclotron frequency f = qB/2πm is no longer constant → resonance lost. Cyclotrons accelerate protons and heavier ions; electrons use linacs or betatrons.
Cyclotron: uses constant B + RF to accelerate charged particles. f = qB/(2πm). K_max = q²B²R²/(2m) — independent of voltage. Cannot accelerate neutrons. Only works for non-relativistic particles (not electrons). Used for medical isotopes and proton therapy.
Two long parallel wires carrying currents I₁ and I₂, separated by distance d:
F/L = μ₀ I₁ I₂ / (2πd)
Direction:
This is the operational definition of the ampere (SI unit of current):
1 A is the current which, if maintained in two long parallel wires 1 m apart, produces a force of 2×10⁻⁷ N per metre of length.
Parallel wires: F/L = μ₀I₁I₂/(2πd). Same direction → attract. Opposite → repel. Defines the ampere: 1 A gives 2×10⁻⁷ N/m at 1 m separation. Real engineering concern in power systems.
A current loop in a uniform magnetic field experiences no net force (forces cancel), but a torque:
τ = m × B
Magnitude: |τ| = NIAB sinθ
Where m = NIA (magnetic moment), θ = angle between m and B.
Direction: tends to align m with B (stable when m ∥ B).
U = −m·B = −mB cosθ
Aligned (m ∥ B): U = −mB (min, stable — like compass at north)
Anti-aligned (m anti-∥ B): U = +mB (max, unstable — like compass pointing south)
This is why a compass needle wants to align with Earth's field!
Loop in B-field: torque τ = m×B, |τ| = NIAB sinθ. Zero torque when m ∥ B (aligned) or anti-∥. Potential energy U = −mB cosθ (min when aligned). Basis of all electric motors and moving-coil meters.
A rectangular coil of N turns, area A, wound on a non-magnetic frame, suspended between pole pieces of a permanent magnet. Two springs provide restoring torque proportional to deflection. A soft iron core makes the field radial so the plane of the coil is always parallel to B (θ = 90° always).
Current I in the coil → torque τ = NIAB (θ = 90°).
Restoring torque from springs = kφ (φ = deflection, k = torsional constant).
Equilibrium: NIAB = kφ
Deflection φ = (NAB/k) · I
So φ ∝ I — the deflection is proportional to current!
Current sensitivity: φ/I = NAB/k (rad/A)
Voltage sensitivity: φ/V = NAB/(kR) (rad/V) where R = coil resistance
Increasing N, A, or B, or decreasing k, increases sensitivity. But very high N increases R and makes the meter heavy.
Ammeter (measures current): Connect a small shunt resistance S in parallel with the galvanometer. Most current flows through S; small fraction through G.
S = I_g · G / (I − I_g) — where I_g = full-scale current of galvanometer, G = galvanometer resistance.
Ideal ammeter: very low resistance (S → 0), connected in series.
Voltmeter (measures voltage): Connect a high series resistance R in series with G.
R = V/I_g − G — where V = full-scale voltage to measure.
Ideal voltmeter: very high resistance, connected in parallel.
Trap: "A galvanometer can directly measure large current."
Correction: A bare galvanometer has limited range (μA to mA) and low resistance. For higher currents, need a shunt (parallel low resistance) → becomes an ammeter. For large voltages, need a series high resistance → becomes a voltmeter.
Trap: "Ammeter has high resistance like a voltmeter."
Correction: Ammeters should have very LOW resistance (to not disturb the circuit); voltmeters have very HIGH resistance (to not draw current). Just the opposite of what you might think!
Moving coil galvanometer: τ = NIAB vs restoring kφ. Deflection φ ∝ I. Ammeter = G + shunt (parallel S). Voltmeter = G + series R. Fundamental to all analog meters.
Q1. A straight wire carries a current of 10 A. Find the magnetic field at a distance of 5 cm from it.
I = 10 A, r = 0.05 m, μ₀ = 4π×10⁻⁷ T·m/A
B = μ₀I/(2πr)
B = (4π×10⁻⁷ × 10) / (2π × 0.05) = (4×10⁻⁶)/(0.1) = 4 × 10⁻⁵ T
Given by right-hand grip rule: if current is upward, B forms circles counterclockwise when viewed from above.
Q2. A circular coil of 100 turns, radius 10 cm, carries 2 A. Find B at the centre.
N = 100, R = 0.1 m, I = 2 A
B = μ₀NI/(2R)
B = (4π×10⁻⁷ × 100 × 2)/(2 × 0.1)
= (4π×10⁻⁷ × 200)/(0.2)
= (8π×10⁻⁵)/0.2
= 40π×10⁻⁵ ≈ 1.26 × 10⁻³ T = 1.26 mT
Q3. An electron moves with speed 5×10⁶ m/s perpendicular to a magnetic field of 0.2 T. Find the radius of its circular path and period.
v = 5×10⁶ m/s, B = 0.2 T, m_e = 9.11×10⁻³¹ kg, q = 1.6×10⁻¹⁹ C
r = mv/(qB) = (9.11×10⁻³¹ × 5×10⁶)/(1.6×10⁻¹⁹ × 0.2)
= 4.555×10⁻²⁴ / 3.2×10⁻²⁰
= 1.42×10⁻⁴ m = 0.142 mm
T = 2πm/(qB) = 2π × 9.11×10⁻³¹ / (1.6×10⁻¹⁹ × 0.2)
= 5.72×10⁻³⁰ / 3.2×10⁻²⁰
= 1.79×10⁻¹⁰ s = 179 ps
Period is independent of speed — this is what makes the cyclotron work.
Q4. Two parallel wires 10 cm apart carry currents 5 A and 8 A in the same direction. Find the force per unit length between them.
I₁ = 5 A, I₂ = 8 A, d = 0.1 m
F/L = μ₀I₁I₂/(2πd)
F/L = (4π×10⁻⁷ × 5 × 8)/(2π × 0.1)
= (160π×10⁻⁷)/(2π × 0.1)
= 80×10⁻⁷ × 10
= 8 × 10⁻⁵ N/m
Same direction currents → attractive. The force pulls the wires toward each other.
Q5. A galvanometer of resistance 50 Ω shows full-scale deflection for 1 mA. How would you convert it to (a) an ammeter of range 0–10 A, (b) a voltmeter of range 0–10 V?
G = 50 Ω, I_g = 1 mA = 10⁻³ A
Shunt S = I_g · G / (I − I_g)
= (10⁻³ × 50)/(10 − 10⁻³)
= 0.05/9.999
= 5.0 × 10⁻³ Ω = 5 mΩ
Connect S in parallel with G. The ammeter has nearly zero resistance.
Series R = V/I_g − G
= 10/10⁻³ − 50
= 10,000 − 50
= 9,950 Ω
Connect R in series with G.
Q6. A proton is accelerated through a potential difference of 1000 V. Find its speed and the radius of its path in a 0.5 T magnetic field (assume perpendicular to velocity).
V = 1000 V, B = 0.5 T, m_p = 1.67×10⁻²⁷ kg, q = 1.6×10⁻¹⁹ C
½mv² = qV → v = √(2qV/m)
= √(2 × 1.6×10⁻¹⁹ × 1000 / 1.67×10⁻²⁷)
= √(3.2×10⁻¹⁶ / 1.67×10⁻²⁷)
= √(1.916×10¹¹)
= 4.38 × 10⁵ m/s
r = mv/(qB)
= (1.67×10⁻²⁷ × 4.38×10⁵)/(1.6×10⁻¹⁹ × 0.5)
= 7.31×10⁻²² / 8×10⁻²⁰
= 9.1 × 10⁻³ m = 9.1 mm
This is a typical proton trajectory in a small mass spectrometer.
Q7. A long solenoid has 2000 turns per metre and carries a current of 5 A. Find (a) B inside, (b) B at the ends, (c) what happens if an iron core (μ_r = 1000) is inserted.
n = 2000 m⁻¹, I = 5 A, μ_r = 1000
B = μ₀nI = 4π×10⁻⁷ × 2000 × 5
= 4π×10⁻⁷ × 10⁴
= 4π × 10⁻³ T ≈ 1.26 × 10⁻² T = 12.6 mT
At the ends, B = μ₀nI/2 = 12.6/2 = 6.3 mT (half the interior value)
B_new = μ_r × B_vacuum = 1000 × 12.6 mT = 12.6 T
That's huge — an electromagnet! But iron saturates at ~2 T in reality, so effective value is ~2 T (saturation). Still 100× stronger than vacuum.
| B | Magnetic field (tesla, T) |
| I, I₁, I₂ | Current (ampere, A) |
| μ₀ | Permeability of free space = 4π×10⁻⁷ T·m/A |
| r, d | Distance (m) |
| R | Radius of loop / cyclotron dee |
| n | Turns per metre = N/ℓ |
| N | Number of turns |
| A | Area of loop (m²) |
| m | Magnetic dipole moment (A·m²) |
| θ | Angle between v and B, or m and B |
| q | Charge of particle (C) |
| v | Velocity (m/s) |
| F | Force (N) |
| τ | Torque (N·m) |
| G | Galvanometer resistance (Ω) |
| I_g | Full-scale current of galvanometer |
(A) Both true, R explains A. (B) Both true, R does NOT explain A. (C) A true, R false. (D) A false, R true.