US exams AP (Advanced Placement) AP Physics C: Electricity and Magnetism

Magnetic Fields: Forces, Biot–Savart Law and Ampère's Law

Learn AP Physics C magnetic fields with calculus: force on moving charges and wires, torque on loops, the Biot–Savart law and Ampère's law.

Reviewed by Independent AI model review on 2026-11-17

Watch the worked example

A Proton in a Magnetic Field: Force, Radius and Period. Captions are available in the player.
Magnetic Fields: Practice Problems Solved. Captions are available in the player.

Moving charges create magnetic fields, and magnetic fields push on moving charges. AP Physics C asks you to go beyond the formulas: to find the field of a current distribution with the Biot–Savart law, to use Ampère's law with symmetry, and to analyze motion and torque. This lesson covers all of these.

Key ideas

  • Magnetic force on a charge: F = qv × B, perpendicular to both v and B. It does no work, so the speed is constant. For v ⟂ B the path is a circle with r = mv ÷ qB and period T = 2πm ÷ qB.
  • Force on a wire: F = IL × B (or ∫ I dl × B for a curved wire).
  • Torque on a loop: the magnetic moment is μ = NIA, the torque is τ = μ × B (maximum μB), and the energy is U = −μ · B.
  • Biot–Savart law: dB = (μ₀ ÷ 4π) I dl × r̂ ÷ r², with μ₀ = 4π × 10⁻⁷ T m/A.
  • Loop: B = μ₀I ÷ 2R at the center, and B = μ₀IR² ÷ 2(x² + R²)^(3/2) on the axis.
  • Ampère's law: ∮ B · dl = μ₀I_enc.
  • Results from Ampère's law: long wire B = μ₀I ÷ 2πr; inside a uniform cylinder B = μ₀Ir ÷ 2πR²; solenoid B = μ₀nI; toroid B = μ₀NI ÷ 2πr.
  • Parallel wires: the force per unit length is F ÷ L = μ₀I₁I₂ ÷ 2πd, attractive for currents in the same direction.

Motion in a magnetic field

Because the magnetic force is always perpendicular to the velocity, it changes the direction of the motion but not the speed. The force supplies the centripetal force: qvB = mv² ÷ r, so r = mv ÷ qB. A faster particle moves on a bigger circle, but the period stays the same.

A charged particle circling in a magnetic fieldA positive charge moving perpendicular to a uniform magnetic field pointing into the page. The magnetic force is perpendicular to the velocity and points to the center, so the particle moves in a circle of radius m v over q B.+vFrF = qvB, perpendicular to vqvB = mv² ÷ rr = mv ÷ qBT = 2πm ÷ qBB points into the page (⊗)A positive charge moving perpendicular to a uniform field travels in a circle. Not to scale.
A charge moving perpendicular to a uniform field travels in a circle of radius mv/qB.
A charged particle circling in a magnetic fieldAn animation of a charged particle moving at constant speed in a circle in a magnetic field that points into the page. The red arrow shows the magnetic force, which always points toward the center. The motion is switched off if your device is set to reduce motion.Animation (slowed down):the magnetic force always pointsto the center and does no work,so the speed stays constant.A charge circling in a field pointing into the page (⊗). The red arrow is F = qv × B. Not to scale.
Animation: the magnetic force always points toward the center and does no work.

The Biot–Savart law

Each short current element I dl produces a field dB that is perpendicular to both dl and the line to the point. Add the contributions by integration. For a circular loop, the components perpendicular to the axis cancel, leaving B = μ₀IR² ÷ 2(x² + R²)^(3/2) on the axis, and B = μ₀I ÷ 2R at the center.

The magnetic field on the axis of a current loopA circular loop of radius R carrying a current I. A small current element contributes a field dB at a point P on the axis. The components perpendicular to the axis cancel, and the net field points along the axis.IPBxBiot–Savart:dB = μ₀I dl × r̂ ÷ 4πr²on the axis:B = μ₀IR² ÷ 2(x² + R²)^(3/2)at the center: B = μ₀I ÷ 2RA circular loop of radius R carrying a current I. The components of dB perpendicular to the axis cancel. Not to scale.
The field on the axis of a current loop, built up from dB contributions.

Ampère's law

Choose a closed path on which B is constant and parallel to dl, or perpendicular so that it contributes nothing. Then B times the path length equals μ₀ times the enclosed current. For a long wire of radius R with uniform current, the enclosed current inside is I r² ÷ R², so B rises linearly with r inside and falls as 1/r outside.

The field inside and outside a long current-carrying wireA graph of the magnetic field of a long cylindrical wire with a uniform current against distance from the axis. The field rises in proportion to the distance inside the wire, peaks at the surface, and then falls as one over the distance outside.r (in units of R)BRμ₀I/2πR at the surfaceB ∝ rB ∝ 1/rA long cylindrical wire with uniform current: Ampère's law gives B inside and outside.Not to scale.
The field of a long cylindrical wire: proportional to r inside and 1/r outside.

For a long solenoid, a rectangular loop with one side along the axis gives B = μ₀nI inside and almost nothing outside.

A long solenoid and Ampère's lawA long solenoid with n turns per meter and a current I. Taking a rectangular Amperian loop with one side inside along the axis and the rest outside, Ampère's law gives a uniform field of mu zero n I inside and almost nothing outside.BAmperian loopAmperian loop: a rectangleof length ℓ, half inside∮ B · dl = Bℓ = μ₀(nℓ)IB = μ₀nI inside, ≈ 0 outsideA long solenoid with n turns per meter. The field inside is uniform. Not to scale.
An Amperian rectangle for a long solenoid.

Worked example 1: a proton in a magnetic field

A proton moves at 2.0 × 10⁶ m/s perpendicular to a uniform 0.50 T field. Find the magnetic force, the radius of its path and its period.

F = qvB = (1.60 × 10⁻¹⁹)(2.0 × 10⁶)(0.50) = 1.6 × 10⁻¹³ N.

r = mv ÷ qB = (1.67 × 10⁻²⁷)(2.0 × 10⁶) ÷ [(1.60 × 10⁻¹⁹)(0.50)] = 4.2 × 10⁻² m.

T = 2πm ÷ qB = 2π(1.67 × 10⁻²⁷) ÷ (8.0 × 10⁻²⁰) = 1.3 × 10⁻⁷ s.

Worked example 2: a current loop

A circular loop of radius 0.10 m carries a current of 5.0 A. Find the field at its center and on the axis 0.20 m from the center.

At the center: B = μ₀I ÷ 2R = (4π × 10⁻⁷)(5.0) ÷ (2 × 0.10) = 3.1 × 10⁻⁵ T.

On the axis: B = μ₀IR² ÷ 2(x² + R²)^(3/2) = (4π × 10⁻⁷)(5.0)(0.010) ÷ [2(0.050)^(3/2)] = 6.28 × 10⁻⁸ ÷ 0.02236 = 2.8 × 10⁻⁶ T.

Worked example 3: a thick wire

A long straight cylindrical wire of radius 2.0 mm carries a uniform current of 20 A. Find the field at r = 1.0 mm, at the surface and at r = 5.0 cm.

Inside, the enclosed current is I r² ÷ R², so B(2πr) = μ₀I r² ÷ R² and B = μ₀Ir ÷ 2πR² = 2(10⁻⁷)(20)(1.0 × 10⁻³) ÷ (2.0 × 10⁻³)² = 1.0 × 10⁻³ T.

At the surface: B = μ₀I ÷ 2πR = 2(10⁻⁷)(20) ÷ (2.0 × 10⁻³) = 2.0 × 10⁻³ T.

At 5.0 cm: B = μ₀I ÷ 2πr = 2(10⁻⁷)(20) ÷ 0.050 = 8.0 × 10⁻⁵ T.

Worked example 4: parallel wires

Two long parallel wires 0.10 m apart carry currents of 10 A and 20 A in the same direction. Find the force per unit length on each wire.

The field of the first wire at the second is B = μ₀I₁ ÷ 2πd = 2(10⁻⁷)(10) ÷ 0.10 = 2.0 × 10⁻⁵ T. The force per unit length on the second is F ÷ L = I₂B = (20)(2.0 × 10⁻⁵) = 4.0 × 10⁻⁴ N/m.

By Newton's third law the first wire feels the same force in the opposite direction, so the wires attract each other.

More worked problems

These three exam-style problems are worked out step by step in the video "Magnetic Fields: Practice Problems Solved" at the top of this page. Each solution is written out below, after the three problems. You can try new problems in "Try it yourself" afterward. Use e = 1.60 × 10⁻¹⁹ C and μ₀ = 4π × 10⁻⁷ T m/A.

Problem 1: a velocity selector. Ions pass through a region with crossed fields E = 2.0 × 10⁴ V/m and B₁ = 0.10 T and emerge undeflected. They then enter a region with B₂ = 0.50 T and move in a semicircle. Find (a) the speed of the ions that pass through, (b) the radius of the semicircle for singly charged ions of mass 6.5 × 10⁻²⁶ kg and (c) the distance between the landing points of ions of masses 6.5 × 10⁻²⁶ kg and 6.8 × 10⁻²⁶ kg.

A velocity selector followed by a magnetic deflection regionAn ion beam passes through a region with crossed electric and magnetic fields, a velocity selector, and then enters a region with a second magnetic field of 0.50 tesla where it moves in a semicircle. The diagram is not to scale.+−vEB₁velocity selectorB₂ = 0.50 T (out of the page)r = ?E = 2.0 × 10⁴ V/mB₁ = 0.10 Tion: +e, m = 6.5 × 10⁻²⁶ kgOnly ions with the right speed pass straight through, then curve in the second field. Not to scale.
Problem 1: balance the electric and magnetic forces to select a speed. The diagram is not to scale.

Problem 2: a coil in a field. A rectangular coil of 50 turns, measuring 0.10 m by 0.20 m, carries 2.0 A in a uniform field of 0.40 T. Find (a) its magnetic moment, (b) the maximum torque and (c) the work needed to rotate it from stable equilibrium to the position of maximum torque.

A current-carrying coil in a magnetic fieldA rectangular coil of 50 turns measuring 0.10 meters by 0.20 meters carrying 2.0 amperes in a uniform magnetic field of 0.40 tesla. The diagram is not to scale.I = 2.0 AN = 50 turns, 0.10 m × 0.20 mB = 0.40 Tmagnetic moment μ = NIAtorque τ = μ × Benergy U = −μ · BA rectangular coil in a uniform field. Find μ, the maximum torque and the work to rotate it. Not to scale.
Problem 2: τ = μ × B and U = −μ · B. The diagram is not to scale.

Problem 3: a toroid. A toroid has 500 turns and carries 2.0 A. Its mean radius is 0.10 m, and its winding has a rectangular cross-section 4.0 cm wide and 1.0 cm tall (area 4.0 × 10⁻⁴ m²). Find (a) the field at the mean radius, (b) the field at r = 0.11 m inside the winding and at a point outside the toroid, and (c) the flux through one turn, using the field at the mean radius.

A toroidal coil with an Amperian circleA toroid with 500 turns carrying 2.0 amperes, with a mean radius of 0.10 meters. A circular Amperian path of radius r inside the winding is shown dashed. The diagram is not to scale.rN = 500 turnsI = 2.0 Amean radius 0.10 m4.0 cm wide, 1.0 cm tall winding(area 4.0 × 10⁻⁴ m²)dashed: Amperian circleA toroid: the field is confined inside the winding. Find B at several radii and the flux. Not to scale.
Problem 3: use an Amperian circle inside the winding. The diagram is not to scale.

Solutions to the worked problems

Problem 1.

(a) For no deflection the electric and magnetic forces cancel: qE = qvB₁, so v = E ÷ B₁ = 2.0 × 10⁴ ÷ 0.10 = 2.0 × 10⁵ m/s.

(b) r = mv ÷ qB₂ = (6.5 × 10⁻²⁶)(2.0 × 10⁵) ÷ [(1.60 × 10⁻¹⁹)(0.50)] = 0.1625 m.

(c) For the heavier ions r = (6.8 × 10⁻²⁶)(2.0 × 10⁵) ÷ (8.0 × 10⁻²⁰) = 0.170 m. The landing points are a diameter from the entry point, so the separation is 2(0.1700 − 0.1625) = 0.015 m, or 1.5 cm.

Problem 2.

(a) μ = NIA = (50)(2.0)(0.10 × 0.20) = 2.0 A m².

(b) τ_max = μB = (2.0)(0.40) = 0.80 N m, when the plane of the coil is parallel to the field.

(c) Stable equilibrium has μ parallel to B (U = −μB). At maximum torque μ ⟂ B (U = 0). The work needed is ΔU = 0 − (−μB) = 0.80 J.

Problem 3.

(a) The Amperian circle of radius r encloses N turns of current: B(2πr) = μ₀NI, so B = μ₀NI ÷ 2πr = 2(10⁻⁷)(500)(2.0) ÷ 0.10 = 2.0 × 10⁻³ T.

(b) At r = 0.11 m, B = 2.0 × 10⁻³ × (0.10 ÷ 0.11) = 1.8 × 10⁻³ T. Outside the toroid the net enclosed current is zero (the current goes in one direction and comes back), so B = 0.

(c) Φ = BA = (2.0 × 10⁻³)(4.0 × 10⁻⁴) = 8.0 × 10⁻⁷ Wb.

Try it yourself

These problems are not worked out in the videos. Use e = 1.60 × 10⁻¹⁹ C, m_e = 9.11 × 10⁻³¹ kg and μ₀ = 4π × 10⁻⁷ T m/A.

Problem A. An electron moves at 3.0 × 10⁶ m/s perpendicular to a uniform 0.020 T field. Find the magnetic force and the radius of its circular path.

Problem B. A long straight wire carries 15 A. Find the magnetic field 0.30 m from the wire.

Problem C. A solenoid has 800 turns per meter and carries 1.5 A. Find the field inside it.

Check your answers. A: 9.6 × 10⁻¹⁵ N and 8.5 × 10⁻⁴ m. B: 1.0 × 10⁻⁵ T. C: 1.5 × 10⁻³ T.

Common mistakes

  • Thinking magnetic forces do work. The force is perpendicular to the velocity, so it changes the direction but not the speed or kinetic energy.
  • Using the wrong hand or direction. Use the right-hand rule on v × B for a positive charge, and reverse it for a negative charge.
  • Using Ampère's law without symmetry. The law is always true, but you can solve for B only when B is constant on the path.
  • Counting the wrong enclosed current. Inside a thick wire only the fraction Ir² ÷ R² is enclosed.
  • Forgetting 2π in B = μ₀I ÷ 2πr. The factor comes from the circumference of the Amperian circle.

Exam approach

AP Physics C free-response questions often ask you to apply Ampère's law to a given current distribution (drawing and labeling the Amperian loop), to set up a Biot–Savart integral, or to analyze circular motion in a field. State the right-hand rule, the symmetry argument and the enclosed current, and give units. Check the College Board course page for the current exam format and the equation sheet.

Practice questions

Choose an answer to see whether you are right and why.

1. What is the magnetic force on a charge that moves parallel to a uniform magnetic field?

2. A charged particle moves in a circle in a uniform magnetic field. If its speed is doubled, what happens to the radius of its circle?

3. How does the magnetic field of a very long straight current-carrying wire depend on the distance r from the wire?

4. What is the magnetic field inside a long ideal solenoid with n turns per meter carrying current I?

5. Two long parallel wires carry currents in the same direction. What is the force between them?

6. Ampère's law states that the line integral of B · dl around a closed loop equals

Make your own study set

Upload your class notes, a PDF or a revision video and CampusBadge builds notes, flashcards and quizzes for you to practise with.

This lesson is a study guide, not the syllabus. Check what is examined in the official AP Physics C: Electricity and Magnetism syllabus for your exam year.

All AP Physics C: Electricity and Magnetism lessons

Upload Documents for Study Materials

We'll generate notes, flashcards and quizzes from your document.

Drop your document here

PDF, Word (.docx), or Text files

Processing your document...

Generating study materials

Process YouTube Video

Paste a link to a revision video.

How it works

We'll extract the transcript from the YouTube video and generate study notes, flashcards, and quizzes.

Processing YouTube video...

Extracting transcript and generating study materials

Add New Badge

Create a badge to mark an achievement.

Are you sure?