The big idea
Moving charges don't just feel magnetic fields, they create them. A long straight wire is surrounded by circular field lines, and a solenoid (a coil) makes a strong, uniform field inside it. Ampère's law is the magnetic counterpart of Gauss's law: with the right symmetry, it turns field problems into a single line.
Key ideas
- Long straight wire: B = μ₀I/(2πr), in circles around the wire. Right-hand rule: thumb along I, fingers curl along B.
- Field lines form closed loops. There are no magnetic "charges".
- Parallel currents attract, and opposite currents repel.
- Solenoid: B = μ₀nI inside, uniform and along the axis, where n is the number of turns per metre. Outside, B ≈ 0.
- Ampère (C: E&M): ∮B·dl = μ₀Ienc. Biot–Savart gives the field of any current element.
Equations
| B = μ₀I/(2πr) | long straight wire |
| B = μ₀nI | inside a solenoid |
| F/L = μ₀I₁I₂/(2πd) | force between parallel wires |
| ∮B·dl = μ₀Ienc | Ampère's law |
| μ₀ = 4π × 10⁻⁷ T·m/A | permeability of free space |
Worked example
Find (a) the field 5.0 cm from a long wire carrying 10 A, and (b) the field inside a solenoid with 400 turns over 20 cm carrying 2.0 A.
- (a) B = μ₀I/(2πr) = (4π × 10⁻⁷)(10)/(2π × 0.050) = 4.0 × 10⁻⁵ T (40 µT), about the strength of Earth's field.
- (b) n = 400/0.20 = 2000 turns/m.
- B = μ₀nI = (4π × 10⁻⁷)(2000)(2.0) = 5.0 × 10⁻³ T (5.0 mT).
- A coil concentrates the field far more than a single wire does.
Common mistakes
- Using the total number of turns N instead of turns per metre n.
- Drawing the field lines from a wire pointing radially outward. They circle around it.
- Getting attraction and repulsion between currents backwards (it's the reverse of charges).
Try it yourself
Two parallel wires 0.10 m apart each carry 10 A in the same direction. Find the force per metre and say whether it attracts or repels.
Show the answer
F/L = μ₀I₁I₂/(2πd) = (2 × 10⁻⁷)(100)/0.10 = 2.0 × 10⁻⁴ N/m, attractive.
Going deeper: AP Physics C
This part goes beyond the algebra course: calculus derivations, harder multi-step problems and exam-style practice, written at the level of the AP Physics C exam.
The Biot–Savart law
Each small piece of current I dℓ makes a field
dB = μ₀4πI dℓ × r̂r²Integrating gives the standard results: at the centre of a circular loop, B = μ₀I/(2R). On the loop's axis, B = μ₀IR²/(2(x² + R²)3/2). Near a long straight wire, B = μ₀I/(2πr). For an arc subtending angle θ, use the fraction θ/2π of the loop result.
Ampère's law
For highly symmetric currents, use
∮B·dℓ = μ₀IencThe method mirrors Gauss's law: choose a loop on which B is constant and parallel to dℓ, so the integral becomes B × (length of loop). Results: inside a uniform wire, B = μ₀Ir/(2πR²). Solenoid: B = μ₀nI. Toroid: B = μ₀NI/(2πr). Outside a coaxial cable carrying equal and opposite currents, B = 0.
Force between parallel wires
Each wire sits in the other's field: F/L = μ₀I₁I₂/(2πd). Currents in the same direction attract, and currents in opposite directions repel.
More worked examples
Example 1. A circular loop of radius 5.0 cm carries 5.0 A. Find B at its centre and on its axis 5.0 cm from the centre.
- Centre: B = μ₀I/(2R) = (4π × 10⁻⁷)(5.0)/(0.10) = 63 µT.
- On axis at x = R: B = μ₀IR²/(2(2R²)3/2) = Bcentre/23/2.
- B = 62.8/2.83 = 22 µT.
Example 2. A long wire of radius 4.0 mm carries 20 A spread uniformly over its cross-section. Find B at 2.0 mm from the axis.
- Ampère loop of radius r inside: Ienc = I(r²/R²).
- B(2πr) = μ₀Ir²/R² → B = μ₀Ir/(2πR²).
- B = (2 × 10⁻⁷)(20)(0.002)/(0.004)² = 0.50 mT.
Example 3. A toroid has 500 turns carrying 2.0 A. Find B at radius 0.10 m inside its core.
- A circular Ampère loop inside the core encloses N turns: B(2πr) = μ₀NI.
- B = μ₀NI/(2πr) = (2 × 10⁻⁷)(500)(2.0)/0.10 = 2.0 mT.
- Outside the toroid the enclosed current is zero, so B = 0.
Exam-style practice
1. Two long parallel wires 5.0 cm apart each carry 10 A in the same direction. Find the force per metre.
Show the solution
F/L = (2 × 10⁻⁷)(100)/0.05 = 4.0 × 10⁻⁴ N/m, attractive.
2. A solenoid has 1000 turns per metre and carries 3.0 A. Find B inside.
Show the solution
B = μ₀nI = 3.8 mT.
3. Find B at the centre of a semicircular arc of radius R carrying current I.
Show the solution
Half of the full-loop value: μ₀I/(4R).
Open the Magnetic Fields of Currents simulation and test every idea on this page yourself.
Open the simulation →