# Lecture 10: Sources of Magnetic Fields and Ampere's Law

## Physics II — Electromagnetism, Optics & Modern Physics

---

## Learning Objectives

By the end of this lecture, students will be able to:

1. Apply the Biot-Savart law to calculate the magnetic field due to simple current distributions
2. Calculate the magnetic field of a long straight wire, a circular loop, and a solenoid
3. State and apply Ampere's law to find magnetic fields with high symmetry
4. Describe the force between parallel current-carrying wires
5. Explain the magnetic properties of materials (diamagnetic, paramagnetic, ferromagnetic)

---

## Lecture Content

### I. The Biot-Savart Law

The Biot-Savart law gives the magnetic field dB produced by a small current element I dL: dB = (mu_0 / 4 pi) (I dL x r_hat) / r^2, where mu_0 = 4 pi x 10^-7 T m/A is the permeability of free space, r is the distance from the current element to the field point, and r_hat is the unit vector pointing from the current element toward the field point. The total field is found by integrating over the entire current distribution: B = integral of dB. The Biot-Savart law plays the same role in magnetism that Coulomb's law plays in electrostatics. The direction of dB is determined by the right-hand rule for the cross product dL x r_hat.

### II. Magnetic Field of Common Current Distributions

For a **long straight wire** carrying current I, the magnetic field at a perpendicular distance r from the wire is B = mu_0 I / (2 pi r). The field forms concentric circles around the wire, with the direction given by the right-hand rule: point the thumb along the current, and the fingers curl in the direction of B. The field magnitude falls off as 1/r.

At the **center of a circular loop** of radius R carrying current I, the field is B = mu_0 I / (2R). Along the axis at a distance x from the center, the field is B = mu_0 I R^2 / [2(R^2 + x^2)^(3/2)]. The direction follows from the right-hand rule: curl the fingers in the direction of the current, and the thumb gives the direction of B. Far from the loop (x >> R), the field approaches that of a magnetic dipole: B approaches mu_0 mu / (2 pi x^3), where mu = IA = I pi R^2.

For a **solenoid** with N turns, length L, and current I, the field inside an ideal (infinite) solenoid is B = mu_0 n I, where n = N/L is the number of turns per unit length. This field is uniform and parallel to the solenoid axis inside, and essentially zero outside. A real (finite) solenoid has fringe fields at its ends, where the field is approximately half the interior value.

<image>Three panels showing magnetic field patterns. Panel A: A long straight wire carrying current I upward, with concentric circular magnetic field lines (B) around the wire. The field magnitude decreases with distance, shown by increasing spacing of field lines. Panel B: A circular current loop in the x-y plane, with magnetic field lines emerging from the top (north), looping around, and entering from the bottom (south), resembling a bar magnet's field. The field at the center is labeled B = mu_0 I/(2R). Panel C: A cross-section of a solenoid showing parallel, evenly spaced field lines inside (uniform field B = mu_0 nI), and the field lines closing outside the solenoid with a pattern similar to a bar magnet.</image>

### III. Ampere's Law

**Ampere's law** states that the line integral of B around any closed path (an Amperian loop) equals mu_0 times the net current enclosed: closed integral of B dot dL = mu_0 I_enclosed. This law is analogous to Gauss's law for electric fields and is most useful when the current distribution has enough symmetry that B is constant along the chosen path.

The sign convention uses the right-hand rule: curl the fingers in the direction of integration, and the thumb points in the direction of positive current.

**Applied to a long straight wire**, an Amperian loop consisting of a circle of radius r centered on the wire gives B(2 pi r) = mu_0 I, yielding B = mu_0 I / (2 pi r), the same result obtained from the Biot-Savart law.

**Applied to a solenoid**, a rectangular Amperian loop with one side inside and one side outside gives BL = mu_0 nLI, since only the inside segment contributes to the integral (B is zero outside and perpendicular to the ends). This yields B = mu_0 nI inside and B = 0 outside.

**Applied to a toroid** (a donut-shaped solenoid), the field inside the toroid is B = mu_0 NI / (2 pi r), and the field is zero both inside the central hole and outside the toroid.

### IV. Force Between Parallel Current-Carrying Wires

Two parallel wires carrying currents I_1 and I_2, separated by a distance d, exert forces on each other. Each wire creates a magnetic field at the location of the other, and the current in the other wire experiences a force in that field. The force per unit length is F/L = mu_0 I_1 I_2 / (2 pi d).

**Parallel currents** (flowing in the same direction) **attract** each other, while **antiparallel currents** (flowing in opposite directions) **repel** each other. This force is the basis for the definition of the ampere: one ampere is the current that, flowing in two infinitely long parallel wires one meter apart, produces a force of 2 x 10^-7 N per meter of length.

<image>Two parallel vertical wires separated by distance d. Left wire carries current I_1 upward, right wire carries current I_2 upward (same direction). The magnetic field B_1 from the left wire at the right wire's location is shown pointing into the page (using the right-hand rule). The force on the right wire (F = I_2 L x B_1) is shown pointing to the left, toward the first wire — attraction. A second diagram below shows antiparallel currents with the resulting repulsive forces pointing away from each other.</image>

### V. Magnetic Properties of Materials

All materials respond to external magnetic fields to some degree. This response is characterized by the **relative permeability** mu_r and the **magnetic susceptibility** chi_m, related by B = mu_r mu_0 H = mu_0 (1 + chi_m) H and mu_r = 1 + chi_m.

**Diamagnetic materials** have a slightly negative susceptibility (chi_m approximately -10^-5). They are weakly repelled by magnetic fields because induced magnetic moments oppose the applied field. Diamagnetism is present in all materials but is usually masked by stronger effects. Examples include water, copper, bismuth, and carbon. Superconductors are perfect diamagnets with chi_m = -1.

**Paramagnetic materials** have a slightly positive susceptibility (chi_m approximately 10^-3 to 10^-5). They are weakly attracted by magnetic fields because their atoms possess permanent magnetic dipole moments that partially align with the applied field. Thermal agitation disrupts this alignment, so the effect decreases with increasing temperature according to Curie's law. Examples include aluminum, platinum, oxygen, and gadolinium-based MRI contrast agents.

**Ferromagnetic materials** have very large susceptibility (chi_m approximately 10^3 to 10^5). They are strongly attracted by magnetic fields because their atoms have permanent moments that align cooperatively within **magnetic domains**. Ferromagnetic materials can retain their magnetization after the external field is removed, creating permanent magnets. The magnetization depends on the history of the applied field, a phenomenon called **hysteresis**. Above the **Curie temperature**, thermal energy destroys domain alignment and the material becomes paramagnetic. Iron, nickel, cobalt, and their alloys are common ferromagnetic materials.

### VI. Gauss's Law for Magnetism

The magnetic flux through any closed surface is always zero: closed integral of B dot dA = 0. This is one of Maxwell's four equations, and its physical meaning is profound: there are no magnetic monopoles. Every magnetic field line that enters a closed surface must also exit it, because magnetic field lines always form closed loops.

This contrasts with Gauss's law for electric fields, where the flux through a closed surface equals Q_enclosed / epsilon_0. For magnetism, the "enclosed magnetic charge" is always zero, because isolated magnetic poles do not exist.
