# Magnetic Fields Due to Currents

> AP Physics 2 · Unit 5 Magnetism
> Source: https://www.owlsprep.com/study/ap-physics-2-u5-magnetic-fields-due-to-currents/

This sub-topic covers magnetic fields produced by steady electric currents, including Biot-Savart Law, Ampère's Law, fields from straight wires and solenoids, and force between parallel wires, core for AP Physics 2 magnetism problems.

**Prerequisites:** Magnetic field vector definition and SI units; Right-hand rule for vector cross products; Conventional current notation

## Learning objectives

- Calculate magnetic field magnitude and direction for straight wires and ideal solenoids
- Determine magnetic force between parallel current-carrying wires
- Apply Biot-Savart and Ampère's Law to symmetric current distributions
- Correctly use right-hand rules for magnetic field direction problems

## Biot-Savart Law and Straight Wire Magnetic Fields

The Biot-Savart Law is the general rule for finding the magnetic field from any steady current distribution. It breaks total current into infinitesimal segments $Id\vec{l}$, each producing a small magnetic field $d\vec{B}$ at a point a distance $r$ from the segment.

$$d\vec{B} = \frac{\mu_0}{4\pi} \frac{I d\vec{l} \times \hat{r}}{r^2}$$

Where $d\vec{l}$ points in the direction of conventional current, $\hat{r}$ is the unit vector from the current segment to the point of interest, and direction follows the right-hand rule for cross products. For an infinitely long straight wire, integrating Biot-Savart gives a simple magnitude formula:

$$B = \frac{\mu_0 I}{2\pi r}$$

Here $r$ is the perpendicular distance from the wire to the point of interest. Direction uses the right-hand grip rule: point your right thumb along conventional current, and your curled fingers follow the circular direction of 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 $(x = 3.0 \text{ cm}, y = 0)$, 3 cm to the right of the wire on the x-axis?

1. Identify given values and convert units: $I = 2.5 \text{ A}$, $r = 0.03 \text{ m}$, $\mu_0 = 4\pi \times 10^{-7} \text{ T}\cdot\text{m/A}$
2. Substitute into the straight wire magnetic field formula:
3. $$B = \frac{\mu_0 I}{2\pi r}$$
4. Calculate magnitude:
5. $$B = \frac{(4\pi \times 10^{-7})(2.5)}{2\pi (0.03)} \approx 1.7 \times 10^{-5} \text{ T} = 17 \ \mu\text{T}$$
6. 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.

> **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.

## Magnetic Force Between Parallel Current-Carrying Wires

Any current-carrying wire placed in an external magnetic field experiences a net magnetic force $F = BIL\sin\theta$, where $\theta$ 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.

For two parallel wires of length $L$, carrying currents $I_1$ and $I_2$, separated by distance $d$, the magnetic field from Wire 1 at Wire 2 is $B_1 = \frac{\mu_0 I_1}{2\pi d}$, and this field is perpendicular to Wire 2 so $
\sin\theta = 1$. Substituting gives the net force:

$$F = \frac{\mu_0 I_1 I_2 L}{2\pi d}$$

The direction rule is simple: parallel currents attract, opposite currents repel. This is the basis for the SI definition of the ampere, 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 $L$ to get:
2. $$\frac{F}{L} = \frac{\mu_0 I_1 I_2}{2\pi d}$$
3. Convert $d = 5.0 \text{ cm} = 0.05 \text{ m}$, then substitute values:
4. $$\frac{F}{L} = \frac{(4\pi \times 10^{-7})(4.0)(6.0)}{2\pi (0.05)} = 9.6 \times 10^{-5} \text{ N/m}$$
5. Confirm direction: currents run in opposite directions, so the force between the wires is repulsive. This can be verified with independent right-hand rule checks for field and force direction.

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

## 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 $
\mu_0$ times the net current enclosed by the loop:

$$\oint \vec{B} \cdot d\vec{l} = \mu_0 I_{\text{enclosed}}$$

To use Ampère's Law effectively, you choose an Amperian loop that matches the symmetry of the magnetic field, so that $B$ is constant and parallel to the loop everywhere it is non-zero. One of the most common applications of Ampère's Law in AP Physics 2 is finding the magnetic field inside an ideal solenoid.

An ideal solenoid is a long coil of tightly wound turns of wire carrying current $I$. The magnetic field is uniform and parallel to the solenoid axis inside the coil, and zero outside the coil. If $n = N/L$ is the number of turns per unit length, Ampère's Law simplifies to give:

$$B = \mu_0 n I$$

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: $L = 10 \text{ cm} = 0.10 \text{ m}$, so $n = N/L = 500 / 0.10 = 5000 \text{ turns per meter}$
2. Substitute into the solenoid magnetic field formula:
3. $$B = \mu_0 n I = (4\pi \times 10^{-7})(5000)(2.0) \approx 0.013 \text{ T} = 13 \text{ mT}$$
4. 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.

> **tip**
>
> $n$ 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 $n$ to avoid unit errors.

## AP Style Practice Problems

**Check your understanding**

Test your understanding with this multiple-choice question:

1. Two long parallel wires separated by distance $d$ carry currents of equal magnitude $I$, but opposite directions. What is the magnitude of the net magnetic field at the point halfway between the two wires?

   - $0$
   - $\frac{\mu_0 I}{2\pi d}$
   - $\frac{\mu_0 I}{\pi d}$
   - $\frac{2 \mu_0 I}{\pi d}$

   *Answer:* $\frac{2 \mu_0 I}{\pi d}$

   *Why:* The distance from each wire to the midpoint is $d/2$, so each wire produces a field of magnitude $\frac{\mu_0 I}{\pi d}$ at the midpoint. Opposite currents mean both fields point in the same direction at the midpoint, so we add their magnitudes to get the total net field.

**Worked example:** 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.

1. Find current using Ohm's law: $I = V/R = 1.5 \text{ V} / 3.0 \text{ Ω} = 0.50 \text{ A}$
2. Calculate turns per unit length: $L = 5.0 \text{ cm} = 0.050 \text{ m}$, so $n = 200 / 0.050 = 4000 \text{ turns per meter}$
3. Substitute into the solenoid field formula:
4. $$B = \mu_0 n I = (4\pi \times 10^{-7} \text{ Tm/A})(4000 \text{ m}^{-1})(0.50 \text{ A}) \approx 2.5 \times 10^{-3} \text{ T} = 2500 \ \mu\text{T}$$
5. This is ~50 times stronger than Earth's surface magnetic field (~50 μT), matching real-world expectations for a small homemade electromagnet.

## Common pitfalls

- **Wrong:** Using electron flow direction instead of conventional current when applying right-hand rules for magnetic field direction
  - Why it fails: Many students learn electron flow first in introductory physics and forget AP uses conventional current for all rules
  - Correct: Always confirm the current direction given; reverse the direction if the problem specifies electron flow before applying any right-hand rule
- **Wrong:** Using total turns $N$ instead of turns per unit length $n = N/L$ in the solenoid magnetic field formula
  - Why it fails: Students memorize the formula incorrectly, mixing up notation from different sources
  - Correct: Write $n = N/L$ explicitly before substituting into $B = \mu_0 n I$ every time you solve a solenoid problem
- **Wrong:** Claiming the magnetic field outside an ideal solenoid is non-zero for calculation problems
  - Why it fails: Students confuse finite real solenoids with the ideal approximation used in AP Physics 2
  - Correct: Unless the problem explicitly asks about a real short solenoid, assume $B=0$ outside an ideal solenoid
- **Wrong:** Stating parallel currents repel and opposite currents attract, matching intuition for electric charges
  - Why it fails: Students confuse the force rule for currents with the force rule for static electric charges
  - Correct: 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:** Using the straight-line distance to a point instead of the perpendicular distance from the wire in the $B = \frac{\mu_0 I}{2\pi r}$ formula
  - Why it fails: Students misapply the formula to points off the perpendicular axis and take the wrong distance
  - Correct: Always calculate the shortest (perpendicular) distance from the wire to the point of interest before substituting

## Cheatsheet

| Category | Formula | Notes |
| --- | --- | --- |
| Biot-Savart Law (general) | $d\vec{B} = \frac{\mu_0}{4\pi} \frac{I d\vec{l} \times \hat{r}}{r^2}$ | For any steady current distribution; $d\vec{l}$ points in direction of conventional current |
| Magnetic field from long straight wire | $B = \frac{\mu_0 I}{2\pi r}$ | $r$ is perpendicular distance from wire; direction via right-hand grip rule |
| Force between parallel wires | $F = \frac{\mu_0 I_1 I_2 L}{2\pi d}$ | Parallel currents attract, opposite currents repel; $d$ is separation between wires |
| Ampère's Circuital Law | $\oint \vec{B} \cdot d\vec{l} = \mu_0 I_{\text{enclosed}}$ | For symmetric current distributions; $I_{\text{enclosed}}$ is net current through the Amperian loop |
| Magnetic field inside ideal solenoid | $B = \mu_0 n I$ | $n = N/L$ = turns per unit length; $B$ uniform inside, $B=0$ outside ideal solenoid |
| Permeability of free space | $\mu_0 = 4\pi \times 10^{-7} \text{ T}\cdot\text{m/A}$ | Exact value used for all free-space calculations in AP Physics 2 |

## What's next

This topic is the foundation for all further work in magnetism and electromagnetic induction in AP Physics 2 Unit 5. Mastery of right-hand rules and field magnitude calculations here is required to solve nearly all multi-concept magnetism problems, which are common in both MCQ and FRQ sections of the exam. Next, you will build on this knowledge to study magnetic forces on moving charges and current-carrying wires in external magnetic fields, where you will use the field calculation skills you practiced here. Following that, you will move on to electromagnetic induction, where calculating magnetic flux through loops depends entirely on understanding how magnetic fields from currents are distributed. Without this foundation, solving complex induction problems will be much more difficult than necessary.

- [Electromagnetic Induction](https://www.owlsprep.com/study/ap-physics-2-u5-electromagnetic-induction/)
- [Magnetic Flux, Induced EMF, Faraday's and Lenz's Law](https://www.owlsprep.com/study/ap-physics-2-u5-magnetic-flux-induced-emf-faraday/)
- [Geometric and Physical Optics Overview](https://www.owlsprep.com/study/ap-physics-2-u6-overview/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ap-physics-2-u5-magnetic-fields-due-to-currents/
