Chapter

Magnetism

Blinn College - Physics 2326 - Terry Honan

. - Magnetic Dipoles and Magnetic Fields

Electromagnetic Duality

There are two types of "magnetic charge" or poles, North poles N and South poles S. Playing with bar magnets demonstrates that like poles repel and unlike attract.  This is analogous to the situation we had with electric charge.  This analogy is a deep one and is called Electromagnetic duality.  North and South poles are related to the magnetic field (OverVector[B]) as positive and negative electric charges are to the electric field.

N and S are to (OverVector[B])
as
+ and - are to (OverVector[E])

The force of an electric charge q in an electric field gives by analogy the force of a magnetic pole of strength g in a magnetic field.

(OverVector[F])=q (OverVector[E])  and  (OverVector[F])=g (OverVector[B])

If g denotes the "magnetic charge" or pole strength then a North pole corresponds to a positive g and a South pole to negative.  Gauss's law relates the total electric flux though a closed surface to the charge enclosed by the surface.  Similarly, the magnetic flux through a closed surface corresponds to the total "magnetic charge" inside.

∮ (OverVector[E])·d(OverVector[A])=(1/(Subscript[ε, 0]))(Subscript[q, enclosed])  and  ∮ (OverVector[B])·d(OverVector[A])=(Subscript[μ, 0])(Subscript[g, enclosed])

where analogous to 1/(Subscript[ε, 0]), the electric constant of proportionality, is the magnetic constant (Subscript[μ, 0]). The magnetic field due to an isolate magnetic pole would be analogous to the electric field due to a point charge.

(OverVector[E])=(1/(4 π (Subscript[ε, 0])))q((OverHat[r])/(r^2))  and  (OverVector[B])=((Subscript[μ, 0])/(4 π))g((OverHat[r])/(r^2))

Magnetic Dipoles

A permanent magnet has both North and South poles separated by some distance.  When it is placed in a field  the N pole experiences a force in the direction of the field and the S pole has a force opposite the field.  If the field is uniform the net force is zero but there is a net torque.  This is analogous to an electric dipole and it will be called a magnetic dipole.  The strength of a magnet can be described by its magnetic dipole moment (OverVector[μ]).

For an electric dipole (OverVector[p]) the torque and potential energy given by (OverVector[τ])=(OverVector[p])×(OverVector[E]) and U=-(OverVector[p])·(OverVector[E]).  The corresponding expressions for torque and potential energy of a magnetic dipole in a magnetic field are

(OverVector[τ])=(OverVector[μ])×(OverVector[B]) and U=-(OverVector[μ])·(OverVector[B]).

One could measure the magnetic moment (OverVector[μ]) of a permanent magnet. In addition to permanent magnets being dipoles we will see that current loops also are magnetic dipoles.  In that case we will write an expression for the magnetic dipole moment.

Gauss's Law for Magnetism and the Absence of Isolated Poles

Isolated magnetic poles could exist but so far none have ever been observed.  Gauss's law in the electric case states that electric field lines begin at isolated positive charges and end at isolated negative charges.  The absence of isolated magnetic poles implies that magnetic field lines never begin or end; they either form closed loops or go off to infinity

The magnetic analog of Gauss's law is ∮ (OverVector[B])·d(OverVector[A])=(Subscript[μ, 0])(Subscript[g, enclosed]) .  The nonexistence of isolated magnetic poles implies that the right hand side is zero and Gauss's law for magnetism becomes

∮ (OverVector[B])·d(OverVector[A])=0

This is our second of Maxwell's equations.  If  we apply Gauss's law to a magnet and put a Gaussian surface around the North pole then there is magnetic flux leaving the surface at the end of the magnet.  For the flux to be zero through this Gaussian surface the field lines inside the magnet must close back on themselves and form closed loops.  Because of this if a bar magnet is cut in half then it doesn't split into a pair of isolated poles; it becomes two smaller dipoles.

If someday isolated poles are discovered, then we may just modify Gauss's law by adding in a magnetic charge term (Subscript[μ, 0])(Subscript[g, inside]) to its right hand side as was shown above.  Other modifications to Maxwell's equations associated with magnetic currents will also be needed; these will be discussed later.

Geomagnetism

Large rotating conductors tend to generate a dipole magnetic field aligned with the axis of rotation. This applies to planets and stars. The earth is a magnetic dipole. We call north the direction given by the north pole of a compass; this is in the direction of the magnetic field and points toward the south pole of a dipole. Magnetic north is the south pole of the earth when viewed as a dipole. It is misaligned with geographic north, as given by the earth’s rotation axis, by an angle that varies with time. The geological record shows many magnetic inversions over history. It is not known if these inversions are somewhat periodic or a purely random phenomenon. We do know that the sun’s magnetic field changes alignment with a regular 22 year periodicity, the solar cycle.

The earth’s magnetic field points north, meaning magnetic north, and it also has a vertical component. The vertical component is downward in the northern hemisphere and upward in the southern hemisphere. This can be understood from the dipole figure above.

We will see in the next section that moving charged particles are deflected by magnetic fields. When charged particles from the sun, the solar wind, hit the earth’s field they deflect and spiral into and out of the poles. The interaction between these particles and the gas molecules in the atmosphere create the aurora borealis, the northern lights, in the northern hemisphere and the aurora australis in the southern hemisphere.

. - Force on Moving (Electric) Charges and Currents

Electricity and magnetism are not separate forces where electric fields just exert forces on electric charges and magnetic fields exert forces on magnets.  Instead  electricity and magnetism are aspects of the same force called electromagnetism.  Magnetic fields cause forces on moving (electric) charges and currents.

Magnetic Force on Moving Charges

If a charge Q is moving with a velocity (OverVector[v]) in a magnetic field (OverVector[B]) then the force is given by

(OverVector[F])=Q (OverVector[v])×(OverVector[B]).

Note that the cross product is a three dimensional thing.  The velocity and field vectors define a plane and the force is in the direction perpendicular to the plane. Note also that when a vector is multiplied by a negative scalar its direction changes, so negative  charges experience forces opposite that of positive ones.

Because the magnetic force is perpendicular to the velocity, the magnetic force acting by itself does not affect the speed of a particle. To show this consider the time derivative of the kinetic energy.

(d/(dt))K=(d/(dt))(1/2)m (v^2)=(1/2)m(d/(dt)) (OverVector[v])·(OverVector[v])=(1/2)m ((((d(OverVector[v]))/(dt))) ·(OverVector[v])+(OverVector[v])·(((d(OverVector[v]))/(dt))))=m (OverVector[a])·(OverVector[v])=(OverVector[F])·(OverVector[v])=0

But the dot product is zero when the vectors are perpendicular. This show the kinetic energy is constant and thus that the speed is constant.

Force on Currents

Consider the flow of charge carriers of charge q with drift velocity (Subscript[(OverVector[v]), d]) through a straight segment of wire of length ℓ with cross-section A.  If the density of charge carriers (number/volume) is n then the total number of charge carriers is

N=n×Volume=n A ℓ.

Summing over all the charges gives the total force on the wire in a uniform field

(OverVector[F])=N  q (Subscript[(OverVector[v]), d])×(OverVector[B])=n A ℓ q (Subscript[(OverVector[v]), d])×(OverVector[B])

Using the expression for current from the previous chapter, I=|q| n A (Subscript[v, d]), we get

(OverVector[F])=I (OverVector[ℓ])×(OverVector[B]),

where the direction of the current is put into the direction of the vector (OverVector[ℓ]).  Note that the current direction is the same as the drift velocity when q is positive and it is opposite when q is negative.  This is built into the above expression.

To generalize this expression consider a curved wire with an infinitesimal segment d(OverVector[s]).  The force on that segment is  I d(OverVector[s])×(OverVector[B]).  Integrating over the length of the wire gives

(OverVector[F])=I ∫ d(OverVector[s])×(OverVector[B]),

where the field need not be uniform.

Units:  The SI unit for magnetic field is:  tesla=(QuantityUnit)=(((QuantityUnit))/((QuantityUnit)·(QuantityUnit)))

The Cross Product and the Right-hand Rule

The cross product (or vector product) of two vectors is written: (OverVector[A])×(OverVector[B]). The magnitude of this vector is A B sin θ.  We will specify the direction with a unit vector (OverHat[u]).

(OverVector[A])×(OverVector[B])=A B sin θ  (OverHat[u])  ((OverHat[u]) by right hand rule)

The two vectors (OverVector[A]) and (OverVector[B]) define a plane; their cross product is perpendicular to that plane.  There are two unit vectors perpendicular to any plane; we use the right hand rule to find the correct one.

Put your right thumb in the direction of the first entry (OverVector[A]) and your fingers in the direction of the second entry (OverVector[B]).  The palm of your hand is in the direction (OverHat[u]), giving the direction of the cross product.

Example . - The Earth’s Magnetic Field

Solution

B=47.3×(10^(-6))(QuantityUnit)   and   ϕ=59.4°

(Subscript[B, north])=B cos ϕ=2.4078×(10^(-5))(QuantityUnit)=2.41×(10^(-5))(QuantityUnit)   and   (Subscript[B, down])=B sin ϕ=4.0713×(10^(-5))(QuantityUnit)=4.07×(10^(-5))(QuantityUnit)

Solution

e=1.602×(10^(-19))(QuantityUnit)   and   v=2.5×(10^6)(QuantityUnit)/(QuantityUnit)

(OverVector[F])=Q (OverVector[v])×(OverVector[B])=-e(OverVector[v])×(OverVector[B])   ⟹   F=e v B sin θ=e v (Subscript[B, ⊥])=e v (Subscript[B, north])=9.64×(10^(-18))(QuantityUnit)

Solution

Solution

(OverVector[F])=I (OverVector[ℓ])×(OverVector[B])

Example . - A Wire in a Magnetic Field

(OverVector[B])=⟨2,-3,0⟩(QuantityUnit) ?

Solution

(OverVector[F])=I (OverVector[ℓ])×(OverVector[B]),

(OverVector[B])=⟨2,-3,0⟩×(10^(-3))(QuantityUnit)=(2 (OverHat[x])-3 (OverHat[y]))×(10^(-3))(QuantityUnit) ,  I=8(QuantityUnit)   and   (OverVector[ℓ])=-ℓ (OverHat[x])=-ℓ ⟨1,0,0⟩

(OverHat[x])×(OverHat[y])=(OverHat[z]).

({{x}, {z      y}})

(OverHat[y])×(OverHat[z])=(OverHat[x]),    (OverHat[z])×(OverHat[x])=(OverHat[y]) ,
(OverHat[y])×(OverHat[x])=-(OverHat[z]),    (OverHat[x])×(OverHat[z])=-(OverHat[y]) and  (OverHat[z])×(OverHat[y])=-(OverHat[x])

(OverVector[F])=I (OverVector[ℓ])×(OverVector[B])=I (-ℓ (OverHat[x]))×(2 (OverHat[x])-3 (OverHat[y]))×(10^(-3))(QuantityUnit)

((OverVector[F])/ℓ)=-I (OverHat[x])×(2 (OverHat[x])-3 (OverHat[y]))×(10^(-3))(QuantityUnit) =-8(QuantityUnit) ((OverVector[0])-3 (OverHat[z]))×(10^(-3))(QuantityUnit)=0.024 (((QuantityUnit))/((QuantityUnit)))(OverHat[z])

((OverVector[F])/ℓ)=-I ⟨1,0,0⟩×⟨2,-3,0⟩×(10^(-3))(QuantityUnit) =-8(QuantityUnit) |({{(OverHat[x]), (OverHat[y]), (OverHat[z])}, {1, 0, 0}, {2, -3, 0}})|×(10^(-3))(QuantityUnit)

⟹  ((OverVector[F])/ℓ)=-8(QuantityUnit) ((OverHat[x])|({{0, 0}, {-3, 0}})|-(OverHat[y])|({{1, 0}, {2, 0}})|+ (OverHat[z])|({{1, 0}, {2, -3}})|)×(10^(-3))(QuantityUnit)=-8(QuantityUnit) (0 (OverHat[x])-0(OverHat[y])+(-3) (OverHat[z]))×(10^(-3))(QuantityUnit)=0.024 (((QuantityUnit))/((QuantityUnit)))(OverHat[z])

Hall Effect

It is clear from the previous section that we cannot determine the charge of the charge carriers by measuring the magnetic force on a wire; simultaneously changing the signs of q and (Subscript[(OverVector[v]), d]) gives the same current.  We can, however, use the magnetic force to find the charge of the charge carriers by measuring the voltage across a conducting strip in a magnetic field.  Consider a flat conducting strip with a current in a magnetic field.  Take the width of the strip, the current and the field to be mutually perpendicular as shown in the diagram.

The magnetic force will push either positive or negative charge carriers toward the top of the wire.  This will create a voltage across the strip.  The polarity of the voltage depends on the charge of the charge of the charge carriers.  If they are positive then the top is positive and otherwise it is negative.

The magnetic force on the moving charge carriers induces a charge buildup across the conducting strip and that rearrangement of charge induces an electric field (OverVector[E])'; the resulting electric force cancels the magnetic force and creates a steady state for the flowing charges.

(OverVector[0])=(Subscript[(OverVector[F]), elec])+(Subscript[(OverVector[F]), mag])=q (OverVector[E])'+q (OverVector[v])×(OverVector[B])  ⟹  (OverVector[E])'=-(OverVector[v])×(OverVector[B])

The magnitude of the induced electric field becomes E'=(Subscript[v, d])B.  The Hall voltage is the voltage across the strip, which can be found by using the standard formula for potential difference: Δ V=-∫(OverVector[E])'·d(OverVector[r]).  Taking the width of the strip to be L then voltage difference when moving from across the width of the strip has magnitude V=E'L.  This gives the Hall voltage.

(Subscript[V, Hall])=(Subscript[v, d]) B L

Motion of Charged Particles

Any force that acts perpendicularly to the velocity of a particle does not affect the speed of the particle; it only alters its direction.  This is the case with the magnetic force (OverVector[F])=Q (OverVector[v])×(OverVector[B]).  Suppose a particle with speed v is shot into a region of uniform magnetic field with the velocity perpendicular to the field, then the magnitude of the force is just  F=|Q| v B.  Since the speed and the magnitude of the force are constant and the force and velocity are perpendicular, the motion will be uniform circular motion.  Using the acceleration for uniform circular motion  (Subscript[a, c])=(v^2)/r and Newton's second law we get:

F=m a   ⟹  |Q| v B=m ((v^2)/r)   ⟹   r= ((m v)/(|Q| B)) .

The angular frequency ω is related to the speed and radius by  ω=v/r  which gives an expression known as the cyclotron frequency

ω=((|Q| B)/m).

If a charged particle moves in a uniform magnetic field with a velocity that is not perpendicular to the field, then the perpendicular component changes as before and the parallel component is unchanged.  The resulting motion is a combination of linear and circular motion, giving a helix.  The general shape of the path of a charged particle in a uniform magnetic field is helical.

An electromagnetic field is a combination of both electric and magnetic fields.  The force of a charged particle in an electromagnetic field is the sum of both electric and magnetic forces and is called the Lorentz force law

(OverVector[F])=Q ((OverVector[E])+(OverVector[v])×(OverVector[B])).

Example . - Circular Trajectory

Solution

r=((2.36(QuantityUnit))/2)=0.0118(QuantityUnit) , B=0.27×(10^(-3))(QuantityUnit) , (Subscript[m, electron])=9.11×(10^(-31))(QuantityUnit)  and  |Q|=e=1.602×(10^(-19))(QuantityUnit)

r= ((m v)/(|Q| B))   ⟹   v=((r |Q| B)/m)=((r e B)/(Subscript[m, electron]))=5.60×(10^5)(((QuantityUnit))/((QuantityUnit)))

. - Sources of Magnetic Fields

In our discussion of electric fields we have discussed the force on charges due to fields.  Analogously, we have found the magnetic force on moving charges and currents.  Our discussion of electric fields is more complete, however, since we have ways to calculate electric fields due to sources, electric charges.  We now need to address the sources of magnetic fields.  The Biot-Savart Law will be introduced as the analog of the Coulomb's Law integrals over continuous distributions to get electric fields.  In cases of symmetry we could use Gauss's Law to find electric fields; as the magnetic analog of this we will introduce Ampere's law.

({{, Electric Fields, Magnetic Fields}, {Force on
Q (or I),              (OverVector[F])=Q (OverVector[E]), (OverVector[F])=Q (OverVector[v])×(OverVector[B])
(OverVector[F])=I ∫d(OverVector[s])×(OverVector[B])}, {Field due to
Q (or I), (OverVector[E])=(Subscript[k, e])∫((OverHat[r])/(r^2))dq
∮ (OverVector[E])·d(OverVector[A])=(1/(Subscript[ε, 0]))(Subscript[Q, enclosed]), Biot–Savart Law

Ampere's Law}})

Coulomb's Law and Gauss's Law are mathematically equivalent for electrostatics.  Similarly, we will see that the Biot-Savart Law is equivalent to Ampere's Law for magnetostatics.  Electrostatics allows no movement and thus no currents.  Magnetostatics allows currents but requires all currents to be steady.  Gauss's Law is fully correct even beyond electrostatics and is one of Maxwell's equations.  Ampere's Law, as discussed in this chapter, is only correct in the context of magnetostatics.  Next chapter we will introduce Maxwell's addition to Ampere's Law; this will make it generally correct and it will become one of Maxwell's equations.

. - Biot-Savart Law

The Biot-Savart law relates the magnetic field at some point P to the current in a wire.  The analogous expression for electric fields is (OverVector[E])=(1/(4 π (Subscript[ε, 0])))∫((OverHat[r])/(r^2))dq.  The source is a current I through an infinitesimal segment of wire d(OverVector[s]).  Take the vector (OverVector[r]) to be from the source to P.  The Biot-Savart law is

(OverVector[B])=((Subscript[μ, 0])/(4 π))I∫ d(OverVector[s])×((OverHat[r])/(r^2)).

Derivation Using a Test Pole

Exploiting duality symmetry we can derive the Biot-Savart Law.  To do this introduce a test magnetic pole of strength (Subscript[g, 0]) at the position P.  The fact that these poles have never been observed need not disturb us.  The field at the wire due to the pole is

(Subscript[(OverVector[B]), W,P])=((Subscript[μ, 0])/(4 π))(Subscript[g, 0]) ((-(OverHat[r]))/(r^2)).

The negative sign is there because the vector (OverVector[r]) in the diagram is pointing toward the pole where we usually take (OverVector[r]) as pointing away from the charge or pole.  The force on the wire due to the pole is then

d(Subscript[(OverVector[F]), W,P])=I d(OverVector[s])×(Subscript[(OverVector[B]), W,P])=-((Subscript[μ, 0])/(4 π))(Subscript[g, 0])I d(OverVector[s])×((OverHat[r])/(r^2)).

Using Newton's third law we can relate this to the force on the pole due to the wire

d(Subscript[(OverVector[F]), P,W])=-d(Subscript[(OverVector[F]), W,P])=((Subscript[μ, 0])/(4 π))(Subscript[g, 0])I d(OverVector[s])×((OverHat[r])/(r^2)).

The force on a magnetic pole (Subscript[g, 0]) in a field (OverVector[B]) is (OverVector[F])=(Subscript[g, 0])(OverVector[B]) so using the pole as a test pole we can write the field at P due to the wire as

d(OverVector[B])=(1/(Subscript[g, 0]))d(Subscript[(OverVector[F]), P,W])=((Subscript[μ, 0])/(4 π))I d(OverVector[s])×((OverHat[r])/(r^2)),

which is just the Biot-Savart Law.  Note that the result is independent of our test pole.

Examples

Field at the center of a circular arc

Consider a circular arc of radius R and of angle θ in the xy-plane with a counterclockwise current.  The vector (OverVector[r]) is from d(OverVector[s]) to the origin, which is the point P.

(OverVector[B])=((Subscript[μ, 0])/(4 π))I ∫((d(OverVector[s])×(OverHat[r]))/(r^2))

Using (OverVector[A])×(OverVector[B])=A B  sin θ (OverHat[u])  we get

d(OverVector[s])×(OverHat[r])=ds · 1 · 1 (OverHat[z]).

For every point on the arc we have r=R=const. giving:

(OverVector[B])=(OverHat[z])(((Subscript[μ, 0])I)/(4 π))(1/(R^2))∫ds.

The integral is just the total arc length  ∫ds=R θ giving

(OverVector[B])=(OverHat[z])(((Subscript[μ, 0])I)/(4 π R))θ.

The direction of the field can be understood using the other right-hand rule; this relates a sense of circulation to a perpendicular direction. Wrap your fingers (of the right hand, of course) in the sense of circulation and the thumb points in the perpendicular direction. As an example from Physics I, the second hand of a clock has an angular velocity vector pointing into the clock. In the example above, wrap your fingers in the direction of the current through the arc and the field at the center is in the direction given by your thumb.

Field at a perpendicular distance (Subscript[z, 0]) from the center of a circle

Now consider a full circle of radius R in the xy-plane with the center at the origin and a counterclockwise current.  Choose the point P to be at (Subscript[z, 0]) along the positive z-axis.

Integrate around the circle by varying θ from 0 to 2 π.  The position as a function of θ is given by the vector (OverVector[r])'.

(OverVector[r])'=⟨R cos θ,R sin θ,0⟩

The d(OverVector[s]) is the infinitesimal change in this vector under an infinitesimal change in angle, dθ.

d(OverVector[s])=d(OverVector[r])'=⟨-R sin θ dθ,R cos θ dθ,0⟩

The vector (OverVector[r]) is the vector from d(OverVector[s]), which is at (OverVector[r])',  to P which is at

(Subscript[(OverVector[r]), 0])=⟨0,0,(Subscript[z, 0])⟩.

This gives

(OverVector[r])=(Subscript[(OverVector[r]), 0])-(OverVector[r])'=⟨-R cos θ,-R sin θ,(Subscript[z, 0])⟩.

By the Pythagorean theorem, the magnitude of (OverVector[r]) is just

r=(Sqrt[(R^2)+(Subscript[z, 0]^2)]).

Using ((OverHat[r])/(r^2))=((OverVector[r])/(r^3))we get an expression for the field.

(OverVector[B])=(((Subscript[μ, 0])I)/(4 π))∫((d(OverVector[s]) × (OverVector[r]))/(r^3))

The cross product can now be explicitly evaluated using the determinant method

d(OverVector[s]) × (OverVector[r])=|({{(OverHat[x]), (OverHat[y]), (OverHat[z])}, {-R sin θ dθ, R cos θ dθ, 0}, {-R cos θ, -R sin θ, (Subscript[z, 0])}})|
=(OverHat[x]) ((Subscript[z, 0]) R cos θ dθ-0)
-(OverHat[y]) (-(Subscript[z, 0]) R sin θ dθ-0) 
+(OverHat[z]) ((R^2) (sin^2) θ dθ--(R^2) (cos^2) θ dθ)
=⟨(Subscript[z, 0]) R cos θ,(Subscript[z, 0]) R sin θ,(R^2)⟩ dθ

Since r is a constant we can bring the (1/(r^3))term out of the integral giving

(OverVector[B])=(((Subscript[μ, 0])I)/(4 π))(1/((((R^2)+(Subscript[z, 0]^2)))^(3/2)))(∫_0^(2 π))⟨(Subscript[z, 0]) R cos θ,(Subscript[z, 0]) R sin θ,(R^2)⟩ dθ.

This gives three simple integrals.

(∫_0^(2 π)) (Subscript[z, 0]) R cos θ dθ=0
(∫_0^(2 π))(Subscript[z, 0]) R sin θ dθ=0
(∫_0^(2 π))(R^2) dθ=2 π (R^2)

The final result can, finally, be written

(OverVector[B])=(OverHat[z])(((Subscript[μ, 0])I)/2)((R^2)/((((R^2)+(Subscript[z, 0]^2)))^(3/2))).

Example . - Field at the Center of a Circular Loop

Solution

(OverVector[B])=(OverHat[z])(((Subscript[μ, 0])I)/(4 π R))θ (Underscript[=, θ->2π]) (OverHat[z])(((Subscript[μ, 0])I)/(2 R))

(OverVector[B])=(OverHat[z])(((Subscript[μ, 0])I)/2)((R^2)/((((R^2)+(Subscript[z, 0]^2)))^(3/2))) (Underscript[=, (Subscript[z, 0])->0]) (OverHat[z])(((Subscript[μ, 0])I)/(2 R))

Field due to a line segment

For some straight-line segment choose the x-direction to be the direction of the current and take the segment to be between (Subscript[x, 1])and (Subscript[x, 2]).  The point P is on the y-axis at y=a, where x=0 is the point on the line closest to P.  The vector d(OverVector[s]) is the vector from x to x+dx

d(OverVector[s])=(OverHat[x])dx

And the vector (OverVector[r]) is from the d(OverVector[s]) to P.

(OverVector[r])=-x (OverHat[x])+a (OverHat[y])

The magnetic field at P is

(OverVector[B])=(((Subscript[μ, 0])I)/(4 π))∫((d(OverVector[s]) × (OverVector[r]))/(r^3))

Evaluating the cross product

d(OverVector[s])×(OverVector[r])=(OverHat[x])dx × (-x (OverHat[x])+a (OverHat[y]))=(OverHat[z]) a dx

and using r=(Sqrt[(x^2)+(a^2)]) gives

(OverVector[B])=(OverHat[z]) a(((Subscript[μ, 0])I)/(4 π))(∫_(Subscript[x, 1])^(Subscript[x, 2]))((dx)/((((x^2)+(a^2)))^(3/2))).

This can be evaluated using a trig substitution.  Define the angle ϕ as shown.

The substitution is

x= a tan ϕ.

The differential becomes

dx=(a/((cos^2)ϕ))dϕ

and r becomes

r=(Sqrt[(x^2)+(a^2)])=(a/(cos ϕ))  ⟹  (1/((((x^2)+(a^2)))^(3/2)))=(((cos^3)ϕ)/(a^3))

Define (Subscript[ϕ, 1]) and (Subscript[ϕ, 2]) as the ϕ values corresponding to (Subscript[x, 1])and (Subscript[x, 2])

(OverVector[B])=(OverHat[z]) a(((Subscript[μ, 0])I)/(4 π))(∫_(Subscript[ϕ, 1])^(Subscript[ϕ, 2]))(((cos^3)ϕ)/(a^3))(a/((cos^2)ϕ))dϕ=(OverHat[z])(((Subscript[μ, 0])I)/(4 π a))(∫_(Subscript[ϕ, 1])^(Subscript[ϕ, 2]))cos ϕdϕ.

This gives the final result

(OverVector[B])=(OverHat[z])(((Subscript[μ, 0])I)/(4 π a))(sin (Subscript[ϕ, 2])-sin (Subscript[ϕ, 1])).

This can also be written in terms of the original x variables

(OverVector[B])=(OverHat[z])(((Subscript[μ, 0])I)/(4 π a))(((Subscript[x, 2])/(Sqrt[(Subscript[x, 2]^2)+(a^2)]))-((Subscript[x, 1])/(Sqrt[(Subscript[x, 1]^2)+(a^2)]))).

Note that with the choice of ϕ given here that a negative x value corresponds to a negative ϕ value.

Sign Conventions

The positive-x direction is the direction of the current.

ϕ is the angle corresponding to x, sin ϕ=x/(Sqrt[(x^2)+(a^2)]).

The sign of ϕ is the same as the sign of x.

The current flows from (Subscript[x, 1]) to (Subscript[x, 2]), so (Subscript[x, 1])<(Subscript[x, 2]) and similarly from (Subscript[ϕ, 1]) to (Subscript[ϕ, 2]).

x=0 (and ϕ=0) is the point on the line containing the segment closest to the point P.

The distance from the line to P is a.

Field of a long straight wire

An important special case of this is that of a long straight wire.

(Subscript[x, 1])->-∞ and (Subscript[x, 2])->∞  ⟹  (Subscript[ϕ, 1])->-(π/2)=-90° and (Subscript[ϕ, 2])->(π/2)=90°

(sin (Subscript[ϕ, 2])-sin (Subscript[ϕ, 1]))->1-(-1)=2.

The field  magnitude a distance r from a long straight wire becomes

B=(((Subscript[μ, 0])I)/(2 π r)).

To get the direction of the field for a long straight wire, or for that matter for a segment, put the thumb of your right hand in the direction of the current.  The field circulates around the wire in the direction given by your fingers.

Example . - The Field of a Long Straight Wire

Solution

I=20(QuantityUnit) ,  r=0.03(QuantityUnit)   and   (Subscript[μ, 0])=4π×(10^(-7)) (N/(A^2))

B=(((Subscript[μ, 0])I)/(2 π r))=1.33×(10^(-4))(QuantityUnit)

Solution

r=0.05(QuantityUnit)   ⟹    B=(((Subscript[μ, 0])I)/(2 π r))=8×(10^(-5))(QuantityUnit)

Example . - Flat Square Coil

Solution

(Subscript[(OverVector[B]), loop])=4 (Subscript[(OverVector[B]), side])  and  (OverVector[B])=N (Subscript[(OverVector[B]), loop])   ⟹  (OverVector[B])=4N (Subscript[(OverVector[B]), side])

(OverVector[B])=(OverHat[z])(((Subscript[μ, 0])I)/(4 π a))(sin (Subscript[ϕ, 2])-sin (Subscript[ϕ, 1]))   and   (OverVector[B])=(OverHat[z])(((Subscript[μ, 0])I)/(4 π a))(((Subscript[x, 2])/(Sqrt[(Subscript[x, 2]^2)+(a^2)]))-((Subscript[x, 1])/(Sqrt[(Subscript[x, 1]^2)+(a^2)]))).

(Subscript[B, side])=(((Subscript[μ, 0])I)/(4 π a))(sin (Subscript[ϕ, 2])-sin (Subscript[ϕ, 1]))=(((Subscript[μ, 0])I)/(4 π ℓ/2))(sin 45°-sin (-45°))=(((Subscript[μ, 0])I)/(2 π ℓ))2×sin 45°=(((Subscript[μ, 0])I)/(2 π ℓ))(Sqrt[2])

(Subscript[(OverVector[B]), side])=-(OverHat[z]) (Subscript[B, side])=-(OverHat[z]) (((Subscript[μ, 0])I)/(2 π ℓ))(Sqrt[2])   ⟹   (OverVector[B])=4N (Subscript[(OverVector[B]), side])=-(OverHat[z]) N (((Subscript[μ, 0])I)/( π ℓ))2(Sqrt[2])

Example . - Rectangular Loop and a Long Wire

Solution

(OverVector[B])=-(OverHat[z]) (2 (Subscript[B, long])+2 (Subscript[B, short])-(Subscript[B, wire]))

B=(((Subscript[μ, 0])I)/(2 π r))   ⟹   (Subscript[B, wire])=(((Subscript[μ, 0])(Subscript[I, 1]))/(2 π a))

B=(((Subscript[μ, 0])I)/(4 π a))(((Subscript[x, 2])/(Sqrt[(Subscript[x, 2]^2)+(a^2)]))-((Subscript[x, 1])/(Sqrt[(Subscript[x, 1]^2)+(a^2)])))   ⟹   (Subscript[B, long])=(((Subscript[μ, 0])(Subscript[I, 2]))/(4 π c))((b/(Sqrt[(b^2)+(c^2)]))-((-b)/(Sqrt[(b^2)+(c^2)])))  =(((Subscript[μ, 0])(Subscript[I, 2]))/(2 π c))(b/(Sqrt[(b^2)+(c^2)]))

B=(((Subscript[μ, 0])I)/(4 π a))(((Subscript[x, 2])/(Sqrt[(Subscript[x, 2]^2)+(a^2)]))-((Subscript[x, 1])/(Sqrt[(Subscript[x, 1]^2)+(a^2)])))   ⟹   (Subscript[B, short])=(((Subscript[μ, 0])(Subscript[I, 2]))/(4 π b))((c/(Sqrt[(b^2)+(c^2)]))-((-c)/(Sqrt[(b^2)+(c^2)])))  =(((Subscript[μ, 0])(Subscript[I, 2]))/(2 π b))(c/(Sqrt[(b^2)+(c^2)]))

(OverVector[B])=-(OverHat[z]) (2 (Subscript[B, long])+2 (Subscript[B, short])-(Subscript[B, wire]))=-(OverHat[z]) ((((Subscript[μ, 0])(Subscript[I, 2]))/(2 π (Sqrt[(b^2)+(c^2)])))((b/c)+(c/b))-(((Subscript[μ, 0])(Subscript[I, 1]))/(2 π a)) )

. - Magnetic Forces, (Subscript[μ, 0]) and the Definition of the Coulomb

We have not yet assigned a value to the constant (Subscript[μ, 0]).  We also haven't given a definition of the Coulomb.  The Coulomb will be defined in terms of the Ampere, 1 C=1 A·s,  and then the Ampere's definition will be established when we assign a value to the constant (Subscript[μ, 0]).   To gain a physical understanding of these definitions we will consider the magnetic force between parallel wires and derive a magnetic analog to Coulomb's Law.

Forces between Parallel Wires

We want to find an expression for the force between parallel wires. To understand the procedure consider an analogy to electrostatics: Suppose we knew the field due to a point charge and the force on a charge, but did not have an expression for Coulomb’s law.  We have two charges (Subscript[Q, 1])and (Subscript[Q, 2]) with the vector (OverVector[r]) from (Subscript[Q, 1]) to (Subscript[Q, 2]). The field due to (Subscript[Q, 1]) at (Subscript[Q, 2]) is (Subscript[(OverVector[E]), 1])=(Subscript[k, e])(Subscript[Q, 1])(OverHat[r])/(r^2) and the force of (Subscript[(OverVector[E]), 1]) on (Subscript[Q, 2]) is (Subscript[(OverVector[F]), 2,1])=(Subscript[Q, 2])(Subscript[(OverVector[E]), 1])=(Subscript[k, e])(Subscript[Q, 1])(Subscript[Q, 2])(OverHat[r])/(r^2). This recovers Coulomb’s law.

Consider a long wire with current (Subscript[I, 1]) and a parallel segment of length ℓ a distance a from the long wire.  The parallel segment will have a current (Subscript[I, 2]); its current will be supplied by perpendicular wires coming from infinity.  The magnetic forces on these perpendicular segments will cancel and the net force will just be the force on the segment.  To find this force takes two steps:  Define (Subscript[(OverVector[B]), 1]) to be the field due to (Subscript[I, 1]) at (Subscript[I, 2]) and then define (Subscript[(OverVector[F]), 21]) as the force on (Subscript[I, 2]) due to (Subscript[(OverVector[B]), 1]).

(Subscript[B, 1])=(((Subscript[μ, 0]) (Subscript[I, 1]))/(2 π a))

The direction of (Subscript[(OverVector[B]), 1]) is out of the page.  We can then find the magnetic force.

(Subscript[(OverVector[F]), 21])=(Subscript[I, 2]) (OverVector[ℓ])×(Subscript[(OverVector[B]), 1])

The direction of this force is toward the other wire and its magnitude is

(Subscript[F, 21])=(Subscript[I, 2]) ℓ (Subscript[B, 1])=((Subscript[μ, 0])/(2 π))(Subscript[I, 1]) (Subscript[I, 2])(ℓ/a).

We can make a general statement about magnetic forces between currents.  Parallel currents attract and anti-parallel currents repel.

(Subscript[μ, 0]) and the Ampere

In the expression for the force both ℓ and a are lengths; it follows that the SI units of (Subscript[μ, 0]) are N/(A^2).  It should now be clear that redefining an Ampere will change the numerical value of (Subscript[μ, 0]); assigning a value to it will then provide a definition of the ampere.  The constant (Subscript[μ, 0]) could be removed completely by defining its value to be 1 but for historical reasons we choose differently.  The value of (Subscript[μ, 0]) was defined as

(Subscript[μ, 0])=4π×(10^(-7)) (N/(A^2)).

and this gave the definition of the ampere

If an experiment were set up with the arrangement above, then it could be used to explicitly calibrate an ammeter.  Suppose we used the values ℓ=1(QuantityUnit) and a=1(QuantityUnit), so ℓ/a=1000.  If the two currents are forced to be equal I=(Subscript[I, 1])=(Subscript[I, 2]),

(Subscript[F, 21])=((Subscript[μ, 0])/(2 π))(Subscript[I, 1]) (Subscript[I, 2])(ℓ/a)=(2×(10^(-7)) (N/(A^2))) (I^2)1000

then we vary the current until the force is 2×(10^(-4))(QuantityUnit) and calibrate the ammeter to one ampere.

Although the value of the constant (Subscript[μ, 0]) was defined as exact originally, with the May 2019 redefinition of the SI system the value of the constant is no longer exact. We now define the ampere as a coulomb per second and the coulomb is defined by choosing an exact value of the elementary charge e.

. - Ampere's Law

Ampere's law is mathematically equivalent to the Biot-Savart law for magneto-statics, where all currents are steady giving constant fields.  This equivalence cannot be demonstrated at this level.  We will use Ampere's law similarly to Gauss's law.  In cases of symmetry we will use it to find magnetic fields from currents.

Ampere's law is

∮ (OverVector[B])·d(OverVector[r])=(Subscript[μ, 0])(Subscript[I, enclosed]).

The integral is around a closed contour and (Subscript[I, enclosed]) is the total current enclosed by that contour.  If the integral is over some closed contour then there are many different surfaces (an infinite number) that have that contour as its boundary.  An example is the Earth's equator that has the northern hemisphere, the southern hemisphere and a disk through the Earth's center as different surfaces that share it as their boundaries.  The current I is the current piercing any surface that has the contour as its boundary.  We can relate the orientation of the boundary to the orientation of the contour (the direction of integration around the contour.)

Example . - Finding (Subscript[I, enclosed])

Solution

(Subscript[I, enclosed])=-(Subscript[I, 1])+(Subscript[I, 2])+(Subscript[I, 5])-(Subscript[I, 6])

Cylindrical Symmetry

In using Gauss’s law we would choose a surface that reflects the symmetry and passes through the point P where we calculate the field, so that the flux integral becomes E×(some area).  For Ampere’s law we want to choose a contour that reflecting the symmetry and passing through P, such that the contour integral is B×(some length). The simplest case of cylindrical symmetry is the long straight wire. Consider a long straight wire with a current coming out of the page. Choose a contour to be a circle with the wire at the center.

We can now evaluate the integral around the contour. The vectors (OverVector[B]) and d(OverVector[r]) are in the same direction so (OverVector[B])·d(OverVector[r])=B ‖d(OverVector[r])‖=B ds where B is the magnitude of the field and the infinitesimal arc length ds is the magnitude of d(OverVector[r]),  ‖d(OverVector[r])‖=ds.  Along the integral the magnitude of the field B is constant and can be pulled out of the integral. This leaves the integral of the arc length, which is the circumference.

∮ (OverVector[B])·d(OverVector[r])=∮B ‖d(OverVector[r])‖=B∮ ds=B 2 π r

Inserting this into Ampere's law where (Subscript[I, inside])=I we get our previous result for the field of a long wire.

∮ (OverVector[B])·d(OverVector[r])=(Subscript[μ, 0])(Subscript[I, enclosed])  ⟹   B 2 π r=(Subscript[μ, 0])I   ⟹   B=(((Subscript[μ, 0])I)/(2 π r))

The left hand side of Ampere's law, the integral around a closed contour, depends only on cylindrical symmetry and is the the same in any case of cylindrical symmetry. The (Subscript[I, enclosed]) is what varies with different cases of cylindrical symmetry.

∮ (OverVector[B])·d(OverVector[r])=(Subscript[μ, 0])(Subscript[I, enclosed])  ⟹   B 2 π r=(Subscript[μ, 0])(Subscript[I, enclosed])   ⟹   B=(((Subscript[μ, 0])(Subscript[I, enclosed]))/(2 π r))

Example . - Wire with a Finite Radius

Solution

(Subscript[I, enclosed])=I ((Subscript[A, enclosed])/(Subscript[A, tot]))=I((π (r^2))/(π (R^2)))=I((r^2)/(R^2))  ⟹  B=(((Subscript[μ, 0])(Subscript[I, enclosed]))/(2 π r))=(((Subscript[μ, 0])I)/(2 π (R^2)))r

(Subscript[I, enclosed])=I   ⟹  B=(((Subscript[μ, 0])(Subscript[I, enclosed]))/(2 π r))=(((Subscript[μ, 0])I)/(2 π r))

Long Solenoid

The figure below shows a cross section of a solenoid with 6 turns and a finite length. A long solenoid is infinitely long and the wires are tightly packed.

For an (infinitely) long solenoid take the current to be I and the density of turns to be n.

n=((# of turns)/length)

The field inside the solenoid is uniform and the field outside is zero.  (The field outside approaches zero as the length become infinite.)  Choose the contour to be four segments as shown

∮ (OverVector[B])·d(OverVector[r])=(∫_1)(OverVector[ B])·d(OverVector[r])+(∫_2)(OverVector[ B])·d(OverVector[r])+(∫_3)(OverVector[ B])·d(OverVector[r])+(∫_4)(OverVector[ B])·d(OverVector[r])
        =B ℓ+0+0+0

There are n ℓ turns through the contour giving

(Subscript[I, enclosed])=n ℓ I

It follows from Ampere's law that the field anywhere inside a long solenoid is

∮ (OverVector[B])·d(OverVector[r])=(Subscript[μ, 0])(Subscript[I, enclosed])    ⟹    B=(Subscript[μ, 0]) n I.

Example . - A Long Solenoid

Solution

(Subscript[μ, 0])=4π×(10^(-7)) (N/(A^2)) ,  N=200 ,  ℓ=0.75(QuantityUnit) ,  I=12(QuantityUnit) ,  n=(N/ℓ)=266.7/(QuantityUnit)

B=(Subscript[μ, 0]) n I=4.02(QuantityUnit)

(OverVector[B])=-B(OverHat[z])=-4.02(QuantityUnit)(OverHat[z])

. - Current Loops as Magnetic Dipoles

Electromagnets and Permanent Magnets as Dipoles

Circular Current Loop and Flat Round Magnet

Magnetic dipoles experience a torque in a magnetic field. A torque is a rotational force and a dipole will rotate to align with a field. We have seen that permanent magnets are dipoles. We will now see that current loops and coils are magnetic dipoles as well. To first see this compare the fields of permanent magnets to coils (electromagnets) of the same shape.

Tightly Wound Solenoid and Magnet

Current Loops

The net force on a current loop in a uniform magnetic field is zero.

(Subscript[(OverVector[F]), net])=I ∮ d(OverVector[s])×(OverVector[B])=I (∮ d(OverVector[s]))×(OverVector[B])=(OverVector[0])

The field does affect the loop, though.  There is a torque on it.  In our earlier discussion of electromagnetic duality (the analogy between electric and magnetic fields and charges) we wrote that the torque on a magnetic dipole is (OverVector[τ])=(OverVector[μ])×(OverVector[B]).  We will now show there is a torque on a current loop; that will demonstrate that a current loop is a magnetic dipole and give an expression for its magnetic moment (OverVector[μ]).

To calculate the dipole moment of a loop or N-turn coil, we will first find the moment of a single triangular loop by calculating the torque on a triangular loop in a uniform field.

A Single Triangular Loop

The definition of torque about an origin due to some force is (OverVector[τ])=(OverVector[r])×(OverVector[F]), where (OverVector[r]) is the vector from the origin to where the force (OverVector[F]) acts.  Consider first a line segment of length ℓ with current I sitting in a uniform magnetic field (OverVector[B]).  The force on that segment is (OverVector[F])=I (OverVector[ℓ])×(OverVector[B]) where the vector (OverVector[ℓ]) is in the direction of the current.  The torque on the segment is (OverVector[τ])=(Subscript[(OverVector[r]), mid])×(OverVector[F]), where (Subscript[(OverVector[r]), mid]) is the vector from the origin to the midpoint of the segment.

(OverVector[τ])=I (Subscript[(OverVector[r]), mid])×((OverVector[ℓ])×(OverVector[B])).

Consider a single triangular loop carrying a current I in a uniform magnetic field (OverVector[B]).  Torque depends on one's choice of origin, but whenever the net force vanishes, the net torque is independent of the choice of origin.  We will choose the origin to be at the center of one side; this removes the contribution of that segment to the torque since (Subscript[(OverVector[r]), mid])=(OverVector[0]).  The two sides that do contribute are labeled (Subscript[(OverVector[ℓ]), 1])and (Subscript[(OverVector[ℓ]), 2]), and take their directions to be the direction of the current.

(OverVector[τ])=I (-(1/2)(Subscript[(OverVector[ℓ]), 2]))×((Subscript[(OverVector[ℓ]), 1])×(OverVector[B]))+I ((1/2)(Subscript[(OverVector[ℓ]), 1]))×((Subscript[(OverVector[ℓ]), 2])×(OverVector[B]))+(OverVector[0])

We can simplify this using an identity satisfied by cross products.

(OverVector[A])×((OverVector[B])×(OverVector[C]))+(OverVector[B])×((OverVector[C])×(OverVector[A]))+(OverVector[C])×((OverVector[A])×(OverVector[B]))=(OverVector[0])

This identity can be rewritten as

(OverVector[A])×((OverVector[B])×(OverVector[C]))-(OverVector[B])×((OverVector[A])×(OverVector[C]))=((OverVector[A])×(OverVector[B]))×(OverVector[C]).

A bit of algebraic manipulation (OverVector[A])->(Subscript[(OverVector[ℓ]), 1]), (OverVector[B])->(Subscript[(OverVector[ℓ]), 2]) and (OverVector[C])->(OverVector[B]) gives

(OverVector[τ])=I ((1/2)(Subscript[(OverVector[ℓ]), 1])×(Subscript[(OverVector[ℓ]), 2]))×(OverVector[B]).

Recall that the magnitude of the cross product is the area of a parallelogram.  A triangle is half of that.  The direction of the cross product is perpendicular to the two vectors and thus to the triangle.  It follows that the area vector of the triangle is (OverVector[A])=(1/2)(Subscript[(OverVector[ℓ]), 1])×(Subscript[(OverVector[ℓ]), 2]).  Note that the right-hand rule gives the outward normal as the direction of (OverVector[A]) and the right-hand rule also associates that direction with a counterclockwise current.  We can now write torque as  (OverVector[τ])=I (OverVector[A])×(OverVector[B]).  Since the torque on a magnetic dipole is  (OverVector[τ])=(OverVector[μ])×(OverVector[B]), we can write the magnetic moment of a single triangular current loop as

(OverVector[μ])=I (OverVector[A]).

Planar Current Loops or Coils with N Turns

We can now generalize this result to a general planar loop.  Any planar loop can be broken up into infinitesimal current loops shown as triangles below.

When summing over all the infinitesimal current loops, the internal currents cancel with the opposite currents in the adjacent triangles.  This leaves only the original current around the border. If each of the infinitesimal pieces has an area vector d(OverVector[A]), then summing over all these infinitesimal areas gives (OverVector[A])=∫d(OverVector[A]).

The area vector has a magnitude A and its direction is normal to the loop.

(OverVector[A])=A (OverHat[n])

To get the proper direction use a right-hand rule.  Wrap your fingers around loop in the direction of the current.  The thumb of your right hand points in the direction of the unit normal (OverHat[n]) that gives the direction of (OverVector[A]).  The magnetic moment is then

(OverVector[μ])=I (OverVector[A]).  (Single turn loop)

If there are N turns then each turn contributes  I (OverVector[A]) to the magnetic moment.  The total magnetic dipole moment is

(OverVector[μ])=N I (OverVector[A]).  (N turn coil)

N is the number of turns, I is the current and (OverVector[A])=A (OverHat[n]) is the area vector defined as above.

Example . - A Long Solenoid (continued)

Solution

N=200 , I=12(QuantityUnit) , r=0.03(QuantityUnit) ⟹  A=π (r^2)=2.8274×(10^(-3))(((QuantityUnit))^2)

μ=N I A=6.7858(QuantityUnit)(((QuantityUnit))^2)

(OverVector[μ])=-μ(OverHat[z])=-6.7858(QuantityUnit)(((QuantityUnit))^2)(OverHat[z])

(OverVector[B])=(2.3 (OverHat[x])-3.5 (OverHat[z])) ×(10^(-3))(QuantityUnit)

({{ (OverVector[τ])=(OverVector[μ])×(OverVector[B])=-μ(OverHat[z])×(2.3 (OverHat[x])-3.5 (OverHat[z])) ×(10^(-3))(QuantityUnit)=}, {=-μ (2.3(OverHat[z])× (OverHat[x])-3.5(OverHat[z])× (OverHat[z])) ×(10^(-3))(QuantityUnit)}, {=-μ (2.3(OverHat[y])-(OverVector[0])) ×(10^(-3))(QuantityUnit)}, {=-0.0156(QuantityUnit)(QuantityUnit) (OverHat[y])}})