Now, imagine we put a small cylindrical magnet at the end of the solenoid. Then because at end of the solenoid, field lines start diverging and are not parallel, a force is exerted on the magnet from the magnetic field created by the solenoid.

What is the magnitude of this force?

On this page we give a simple derivation of the force and torque on a small magnetic dipole which is in a non-uniform magnetic field. On this page, we will take a dipole of magnitude |μ|=** IA** to be a loop of current of magnitude

**, with area of the loop equal to**

*I***. The dipole moment, μ, is a vector which points perpendicular to the plane of the loop, and which points “up” when the dipole is oriented so that the current runs counterclockwise, looking down on the loop.**

*A*For simplicity in the derivation, we’re going to cheat and use a

*square*loop (figure 1). This will save us a lot of niggling little sines and cosines in the integrals, and in fact will let us entirely avoid explicitly taking integrals. We’ll just assume without proof that our result is the same as what we would get with a circular loop.

Throughout most of this page we’ll also assume that the loop lies in the

**plane, with the sides of the square lying parallel to the**

*xy**and*

**x****axes. The dipole vector points along the**

*y***axis. The magnetic (“B”) field, on the other hand, has arbitrary orientation. (We can rotate the axes so that the position of the dipole is easy to describe, or so the B field lies along one axis … but we can’t do both at once.) The angle between the direction of the magnetic field and the dipole vector, which we’re assuming lies on the**

*z***axis, is θ.**

*z*