| Study Guides
AP · Magnetic Fields Due to Currents · 14 min read · Updated 2026-05-10

Magnetic Fields Due to Currents — AP Physics 2 Study Guide

For: AP Physics 2 candidates sitting AP Physics 2.

Covers: Biot-Savart Law, Ampère’s circuital law, right-hand rules for current-carrying conductors, magnetic fields from straight wires and solenoids, and the magnetic force between parallel current-carrying wires.

You should already know: Magnetic field vector definition and SI unit, right-hand rule for cross products, conventional current notation.

A note on the practice questions: All worked questions in the "Practice Questions" section below are original problems written by us in the AP Physics 2 style for educational use. They are not reproductions of past College Board / Cambridge / IB papers and may differ in wording, numerical values, or context. Use them to practise the technique; cross-check with official mark schemes for grading conventions.


1. What Is Magnetic Fields Due to Currents?

All magnetic fields originate from moving electric charges, so the most common macroscopic source of magnetic fields is steady electric current (net flow of charge in a conductor). This topic explores how to calculate the magnitude and direction of magnetic fields produced by steady current distributions, a core foundation for all of electromagnetism. According to the AP Physics 2 Course and Exam Description (CED), this topic makes up approximately 3-5% of the total exam weight, and regularly appears in both multiple-choice (MCQ) and free-response (FRQ) sections. Often, questions on this topic are combined with other magnetism concepts like magnetic force on charges or induction, so mastery here is critical for solving multi-concept problems. Synonyms for this topic sometimes include "current-generated magnetic fields" or "magnetostatics for currents," and AP Physics 2 assumes you work with steady (non-time-varying) currents, so we do not consider induced displacement currents here. Standard notation: we use for magnetic field, for conventional current, for the permeability of free space, and for the perpendicular distance from the current to the point where we calculate .

2. Biot-Savart Law and Magnetic Field from Straight Wires

The Biot-Savart Law is the general rule to find the magnetic field from any steady current distribution. It breaks the total current into infinitesimal segments , each of which produces a small magnetic field at a point a distance from the segment. The full vector form of the law is: Where is the vector pointing in the direction of conventional current, is the unit vector pointing from the current segment to the point of interest, and is the vector cross product. The direction of follows the cross product right-hand rule.

For an infinitely long straight wire, integrating the Biot-Savart Law over the entire length of the wire gives a simple formula for the magnetic field magnitude at perpendicular distance from the wire: Direction for a straight wire uses the simpler right-hand grip rule: point your right thumb along the direction of conventional current, and your curled fingers follow the circular direction of the magnetic field loops around the wire.

Worked Example

A long straight wire carries 2.5 A of conventional current pointing upward along the y-axis. What is the magnitude and direction of the magnetic field at point , 3 cm to the right of the wire on the x-axis?

  1. Identify given values and convert units: , , .
  2. Substitute into the straight wire magnetic field formula: .
  3. Calculate magnitude: (17 μT).
  4. Find direction with the right-hand grip rule: thumb points up along the wire, so at a point to the right of the wire, curled fingers point into the page.

Exam tip: Always use conventional current for right-hand rules, not electron flow. If the problem gives electron flow direction, reverse it before applying the grip rule.

3. Magnetic Force Between Parallel Current-Carrying Wires

We already know that a current-carrying wire placed in an external magnetic field experiences a net magnetic force , where is the angle between the current direction and the external magnetic field. If we have two parallel current-carrying wires, each wire produces a magnetic field that exerts a force on the other.

To derive the force, consider two parallel wires of length , carrying currents and , separated by distance . The magnetic field from Wire 1 at the location of Wire 2 is , and this field is perpendicular to Wire 2, so . Substituting into the force formula gives: The direction of the force follows a simple rule: parallel currents attract, opposite currents repel. This is the basis for the formal definition of the ampere (the SI unit of current), though AP Physics 2 does not require you to memorize this definition.

Worked Example

Two parallel wires are 5.0 cm apart. Wire A carries 4.0 A upward, and Wire B carries 6.0 A downward. What is the magnitude of the force per unit length on Wire A, and is the force attractive or repulsive?

  1. We solve for force per unit length, so divide the force formula by to get .
  2. Convert , then substitute values: .
  3. Confirm direction: currents run in opposite directions, so the force between the wires is repulsive. To verify with right-hand rules: the magnetic field from Wire B at Wire A points into the page, and the force on Wire A is upward into page = left, away from Wire B, confirming repulsion.

Exam tip: When asked for force per unit length, remember to cancel from the formula. Extra terms are a common distractor in multiple-choice questions on this topic.

4. Ampère's Law and Magnetic Fields from Solenoids

Ampère's Law is a simpler alternative to the Biot-Savart Law for current distributions with high symmetry. Ampère's Law states that the line integral of the magnetic field around any closed loop (called an Amperian loop) equals times the net current enclosed by the loop: To use Ampère's Law effectively, you choose an Amperian loop that matches the symmetry of the magnetic field, so that is constant and parallel to the loop everywhere it is non-zero.

One of the most common applications of Ampère's Law is finding the magnetic field inside an ideal solenoid: a long coil of tightly wound turns of wire carrying current . For an ideal solenoid, the magnetic field is uniform and parallel to the solenoid axis inside the coil, and zero outside the coil. If is the number of turns per unit length, Ampère's Law simplifies to give: Direction of the magnetic field inside a solenoid uses a right-hand grip rule: curl your right fingers around the solenoid in the direction of current flow, and your thumb points in the direction of the magnetic field along the solenoid axis.

Worked Example

A solenoid is 10 cm long, has 500 turns of wire, and carries a current of 2.0 A. What is the magnetic field magnitude at the center of the solenoid? If current flows clockwise when viewed from the right end of the solenoid, what is the direction of the magnetic field at the center?

  1. Calculate turns per unit length: , so .
  2. Substitute into the solenoid magnetic field formula: (13 mT).
  3. Find direction: when viewed from the right end, current is clockwise. Curl your right fingers clockwise, and your thumb points to the left, so the magnetic field points toward the left end of the solenoid along the axis.

Exam tip: in the solenoid formula is turns per unit length, not the total number of turns. Always convert the total solenoid length to meters before calculating to avoid unit errors.

5. Common Pitfalls (and how to avoid them)

  • Wrong move: Using electron flow direction instead of conventional current when applying right-hand rules for magnetic field direction. Why: Many students learn electron flow first in introductory physics and forget AP uses conventional current for all rules. Correct move: Always confirm the current direction given; reverse the direction if the problem specifies electron flow before applying any right-hand rule.
  • Wrong move: Using total turns instead of turns per unit length in the solenoid magnetic field formula. Why: Students memorize the formula incorrectly, mixing up notation from different sources. Correct move: Write explicitly before substituting into every time you solve a solenoid problem.
  • Wrong move: Claiming the magnetic field outside an ideal solenoid is non-zero for calculation problems. Why: Students confuse finite real solenoids with the ideal approximation used in AP Physics 2. Correct move: Unless the problem explicitly asks about a real short solenoid, assume outside an ideal solenoid.
  • Wrong move: Stating parallel currents repel and opposite currents attract, matching the intuition for electric charges. Why: Students confuse the force rule for currents with the force rule for static electric charges. Correct move: Use the mnemonic "parallel attract" to recall the rule, or re-derive the direction with two quick right-hand steps during the exam if unsure.
  • Wrong move: Using the straight-line distance to a point instead of the perpendicular distance from the wire in the formula. Why: Students misapply the formula to points off the perpendicular axis and take the wrong distance. Correct move: Always calculate the shortest (perpendicular) distance from the wire to the point of interest before substituting.

6. Practice Questions (AP Physics 2 Style)

Question 1 (Multiple Choice)

Two long parallel wires separated by distance carry currents of equal magnitude , but opposite directions. What is the magnitude of the net magnetic field at the point halfway between the two wires? A) B) C) D)

Worked Solution: The distance from each wire to the midpoint is . The magnitude of the magnetic field from each wire at the midpoint is . Using the right-hand grip rule, for opposite currents, the magnetic fields from both wires point in the same direction at the midpoint, so we add their magnitudes. The net magnetic field is . The correct answer is D.


Question 2 (Free Response)

A long straight wire lies along the x-axis, carrying conventional current in the positive x-direction. A square loop of wire with side length lies in the xy-plane, with its closest side parallel to the straight wire at distance from the straight wire. (a) Calculate the magnitude of the magnetic field from the straight wire at the location of the closest side of the square loop. (b) Calculate the magnitude of the magnetic field from the straight wire at the location of the farthest side of the square loop. (c) Explain why the net magnetic force on the entire square loop from the straight wire is directed toward the straight wire, and state whether the current in the square loop must be clockwise or counterclockwise when viewed from the positive z-axis.

Worked Solution: (a) Use the straight wire magnetic field formula with :

(b) The farthest side is at :

(c) The magnetic force on the top and bottom sides of the square are equal in magnitude and opposite in direction, so they cancel out. The magnetic field is stronger closer to the wire, so the force on the closest side is larger than the force on the farthest side. For the net force to point toward the straight wire, the force on the closest side must be attractive, which means the current in the closest side is parallel to the current in the straight wire. The straight wire current is in the +x direction, so the closest side current is also +x, which means the full loop current is counterclockwise when viewed from the +z axis.


Question 3 (Application / Real-World Style)

A student builds a small electromagnet by wrapping 200 turns of insulated copper wire around a hollow plastic tube 5.0 cm long to make a solenoid. The solenoid is connected to a 1.5 V AA battery, and the total resistance of the wire is 3.0 Ω. Estimate the magnitude of the magnetic field at the center of the electromagnet, and compare it to Earth's surface magnetic field (~50 μT).

Worked Solution: First, find the current in the solenoid using Ohm's law: . Next, calculate turns per unit length: , so . Substitute into the solenoid magnetic field formula: This small homemade electromagnet produces a magnetic field approximately 50 times stronger than Earth's magnetic field, which is strong enough to pick up small iron objects like paper clips, matching real-world expectations.

7. Quick Reference Cheatsheet

Category Formula Notes
Biot-Savart Law (general) For any steady current distribution; points in direction of conventional current
Magnetic field from long straight wire is perpendicular distance from wire; direction via right-hand grip rule
Force between parallel wires Parallel currents attract, opposite currents repel; is separation between wires
Ampère's Circuital Law For symmetric current distributions; is net current through the Amperian loop
Magnetic field inside ideal solenoid = turns per unit length; uniform inside, outside ideal solenoid
Permeability of free space Exact value used for all free-space calculations in AP Physics 2

8. What's Next

This topic is the foundation for all further work in magnetism and electromagnetic induction in AP Physics 2 Unit 5. Next you will study the magnetic force on moving charges and current-carrying wires in external magnetic fields, which requires you to calculate the magnetic field from current sources to find the net force, a core skill you practiced in this chapter. Following that, you will move on to electromagnetic induction, where you need to calculate magnetic flux through loops, which again depends on understanding how magnetic fields from currents are distributed. Without mastering the right-hand rules and field magnitude formulas in this chapter, solving multi-concept induction problems involving current-carrying coils or wires will be extremely difficult.

← Back to topic

Stuck on a specific question?
Snap a photo or paste your problem — Ollie (our AI tutor) walks through it step-by-step with diagrams.
Try Ollie free →