I observe that either end of a bar magnet attracts a piece of iron. My understanding is that the magnet induces mini-magnets in the iron. So what happens if a piece of iron is placed in a uniform field, such as inside an MRI machine? Does it move, and if so which direction. I imagine it does not move, and deduce that a magnetic field gradient is necessary to attract a piece of iron. Is this correct.

  • $\begingroup$ Just a late experimental confirmation: I hold in place a small 0.5 cm needle inside a small paper cylinder roll placed inside an already activated Helmholtz coil 7 cm in diameter and 30mT strong homogeneous field. The position of the needle was about 2/3 midway towards the center of the Helmholtz cavity therefore in a region where the field is still very homogeneous making sure that there is no gradient present. However. when I released the needle it still slide 2cm forward and stopped at the exact center of the Helmholtz cavity. Meaning is was still experiencing a forward force inside... $\endgroup$
    – Markoul11
    Jan 17 at 8:53
  • $\begingroup$ cnt. and the small needle stopped at the center of the HLZ coil where the forces applied from the two poles of the HLZ coil equalize. That what most people not realize is the approaching from outside an iron needle the induced polarity on the approaching end of the needle is opposite to the the pole-opening polarity of the coil. However, when the needle is inside the coil its polarity at its two ends is aligned and the same with the polarity direction of the HLZ coil. Meaning that each end of the needle is actually repelled inside the cavity reaching equilibrium at the center of the coil. $\endgroup$
    – Markoul11
    Jan 17 at 9:15
  • $\begingroup$ In a nutshell, the experimental conclusion from my last previous 2 comments described experiment is ideally a 100% homogeneous field along its total length will not move forward a small iron piece since it has zero gradient $\mathbf{F}=\nabla(\mathbf{m} \cdot \mathbf{B})$. However, there is practically no such field possible therefore the small iron piece given it is light enough, will experience a force moving forward inside the field up to the point position where the net force of the two opposite poles of the Helmholtz coil becomes zero usually at the center of the HLZ cavity, $\endgroup$
    – Markoul11
    Jan 20 at 8:39

4 Answers 4


The equation given above is correct with $\vec m\bullet \vec B= |m||B|cosθ$ with $m$ the magnetic moment of the ferromagnetic particle or piece placed inside the homogeneous magnetic field $B$ and $θ$ the angle between these two magnetic vectors.

In order a piece of ferromagnetic material as described above without being initially magnetized placed randomly inside the $B$ homogeneous field and free to move, not to be drawn into translational motion by the homogeneous $B$ field it must have its induced magnetic moment $m$ perpendicular to the $B$ vector of the homogeneous field,

Magnetic force:

$$ \vec{F}=\nabla(\vec{m} \bullet \vec{B})=\nabla(|m||B| \cos 90) $$

and the total gradient must be zero.

However, this is not physically possible in this case for two reasons:

First an induced magnetic moment $m$ in ferromagnetic matter (not permanently magnetized prior) is always parallel aligned inside a homogeneous field $B$ vector therefore the angle $θ$ will be always zero. This is always the case because the unpaired electrons bound in the atoms of the ferromagnetic matter will experience a torque $τ$ that will align coherently their individual magnetic moments of all the unpaired electrons parallel to the $B$ field vector even if their were initially at an angle to the B vector $θ=90°$:

$$\tau=\mathbf{m} \times \mathbf{B}= |m||B|sin90=|m||B|$$

Secondly, a homogeneous field like for example the $B$ field inside a Helmholtz coil has ideally zero curl but the induced magnetic field in ferromagnetic matter is always it total, inhomogeneous thus it has a non-zero curl.

Therefore there will be always a gradient present and therefore a magnetic force $\vec{F}$, propelling the free to move iron piece forward in motion (i.e. assuming it is light enough) to the direction of the $B$ field vector. Imagine your iron piece as being inside the matter or part of the matter of a permanent magnet but instead bound and hold in place by the atomic forces it is free to fly inside the permanent magnet. In which direction it will fly inside the magnet? Of course to the direction of the $B$ vector inside the magnet from S to N. The situation you are asking is exactly the same in comparison.

Here is a video demonstration from a paper time-lapse of one week, of billions of magnetite 10nm nanoparticles suspended in a ferrofluid thin film, continuously circulating to the B field of an external magnet. The magnetite particles after one week get so strong magnetized that concentrate all in one small region forming a tiny solid sphere permanent magnet at the center (the sphere shown in the video is no more than 3mm):


Notice, that the nanoparticles are suspended inside the carrier fluid of a 50μm thick thin film disc of ferrofluid. The disc is placed horizontally on a desk on top of a permanent bar magnet which is placed on its side (i.e. left and right in the video are the locations of the poles of the permanent magnet). The nanoparticles are suspended inside the thin film free to move and not subjected to gravity.

The above are not to be confused with the situation where you approach a ferromagnetic piece free to move, close to a pole of a magnetic source. The polar fields are always non-homogeneous because the fields at these regions are curling towards the opposite pole. In this case to whatever pole N or S you approach you iron piece the induced magnetic moment $m$ in the iron piece will be also parallel to the external field of your magnetic $B$ field source and attracted to join with it. Similar to the situation of iron filings sprinkled over a magnet.

The similarity comparison described before in a previous answer about the nearly homogeneous field existing between two unlike poles N and S of two separated magnets is not entirely correct. There is not a zero point in an attracting field N-S between the two separated poles. Otherwise it would not be entitled as homogeneous or nearly homogeneous. Probably this was confused with the repulsing field between two separated like poles N-N or S-S. These repulsing fields are always non-homogeneous and indeed assuming the two like poles are equal strength there is a zero magnetic flux region dead zone at mid-distance where there is no magnetism present. If you place your small iron piece there it will not experience magnetism.

All the above described cases hold also for permanent magnetized matter that what we call as magnets assuming the magnets are not forced artificially hold in place and are free to move. A magnet approached to an external field or left inside a homogeneous field will always if needed re-orient its permanent two poles, in space and turn to align its magnetic moment $m$ parallel to the $B$ vector and experience all the same force and torque described previously.


  • $\begingroup$ Answer was updated. $\endgroup$
    – Markoul11
    Mar 4, 2022 at 20:54
  • $\begingroup$ You say: "In which direction it will fly inside the magnet? Of course to the direction of the B vector inside the magnet from S to N." However, the direction of the vector field is entirely a matter of convention, is it not? Why does this correspond to the direction of resultant force? $\endgroup$ Mar 5, 2022 at 13:02
  • $\begingroup$ @RichardHartley What makes you say that the direction of the vector field is purely conventional? $\endgroup$
    – J. Murray
    Mar 12, 2022 at 16:57

You are correct. Magnetic field gradient is necessary to attract a piece of iron. As iron is lump collection of magnetic dipoles, its force will be $ \vec F=\nabla(\vec m\bullet \vec B)$, if magnetic field is uniform, no gradient will be present, so it will not move to neither direction.

More intuitive explanation can be made. You can generate nearly-uniform magnetic field by placing it between two equally strong magnet. Then, in the center, the iron bar will get force from each direction equally, therefore, net force will cancel out, so the iron will not move.


In an uniform magnetic field, pieces of iron are not accelerated to one of the poles. But when one of the dimensions is much greater than the others, (like in a needle), it tends to align with the field.

It can be easily verified in a container full of water, in a room protected from winds or vibrations, where a floating device carries a light steel bolt or needle. It slowly aligns with the earth's (uniform) magnetic field. But it doesn't have a preferred border of the container to move.

  • $\begingroup$ Magnetic anisotropy thus a ferromagnetic object can have according to its shape or atomic lattice a preferred, "easy axis" of magnetization is irrelevant to this question where the subject is free to move and therefore will always align its easy axis of magnetization with the B field vector of the an homogeneous field. I'm afraid this answer adds confusion instead of resolving things. $\endgroup$
    – Markoul11
    Mar 5, 2022 at 9:16
  • $\begingroup$ I've done this experiment my self holding 3mm 0.3g tiny metal bearing inside the homogeneous field of a Helmholtz coil. With the B field turned on I was holding the small metal sphere with my fingers at the center inside the Helmholtz coil and experiencing the forward force trying to make the tiny sphere fly of my fingers in the direction of the B field. As soon as I released the sphere it accelerated forward to the direction of the B vector S to N and fall 6 cm forward. This has to be done at the center of the coil and not near its poles. At the center $v$ vector is aligned to B vector. $\endgroup$
    – Markoul11
    Mar 5, 2022 at 9:47
  • $\begingroup$ But is it not true that the direction of the B vector (from S to N) is entirely a matter of convention? It does not necessarily correspond with the direction of the force, does it? $\endgroup$ Mar 5, 2022 at 13:01
  • $\begingroup$ @RichardHartley It is not a convention, it is real. You simply confuse the magnetic moment with magnetic polarity concept and magnetic attraction. Two attracting unlike polarity poles of two magnets have their magnetic moment vectors aligned parallel, pointing to the same direction. That is actually the whole point of magnetic attraction the joining of parallel aligned magnetic moment vectors. If the magnetic moments are opposite you have repulsion. $\endgroup$
    – Markoul11
    Mar 5, 2022 at 13:59
  • $\begingroup$ Yes, but which is called S and which is called N is simply a matter of convention, and the "direction" of the magnetic field (conventionally from S to N if you like) is therefore arbitrary. If you like, you can define the "magnetic field" (which does not really exist, and is just a mathematical abstraction anyway) as the force applied to an (imaginary) South magnetic monopole. But you could just as well define it as the force applied to an (imaginary) North magnetic monopole. $\endgroup$ Mar 8, 2022 at 0:31

[I] deduce that a magnetic field gradient is necessary to attract a piece of iron. Is this correct.

Yes, this is correct.

The (linear) force exerted by a magnetic field $\vec{B}$ upon a small magnetic dipole $\vec{m}$ is given by the formula

$$\vec{F} = \nabla (\vec{m} \cdot \vec{B})$$

In the case where the magnetic dipole $\vec{m}$ is perfectly aligned with the magnetic field $\vec{B}$, this reduces to

$$\vec{F} = \nabla (|\vec{m}| \cdot |\vec{B}|) = |\vec{m}| \cdot \nabla |\vec{B}|$$

where the '$\cdot$'s signify ordinary scalar multiplication, and were added only for ease of parsing (for some people at least).

If we define $m = |\vec{m}|$ and $B = |\vec{B}|$, then

$$\vec{F} = m\nabla B$$

Clearly the force is in the direction of the gradient of $B$ and not necessarily in the direction of $\vec{B}$.

Outside of a typical bar magnet, the gradient of B (remember, it is an absolute value) points approximately toward the nearest pole, N or S. But the $\vec{B}$ field (outside the magnet) flows from the N pole to the S pole. That is why a piece of iron is (almost always) attracted to the nearest pole of a magnet, rather than always to the south pole or always to the north pole.

So, a small piece of iron in a magnetic field will be attracted to either pole, depending upon the direction of the gradient, or will have no magnetic force exerted upon it, if it happens to lie exactly at a point where the gradient is $\vec{0}$.

However, a piece of iron at such a point is in unstable equilibrium, like a ball on top of a hill. The forces acting upon a piece of iron a small distance away from a point such that $\nabla B = \vec{0}$ will be in a direction away from that equilibrium point rather than toward it.

A nano-particle of iron suspended in a fluid is subject to Brownian motion. If such a nano-particle were originally at a point of unstable equilibrium, Brownian motion will tend to move it ever so slightly away from that point of unstable equilibrium. Once it has left that point of unstable equilibrium, the magnetic force acting upon it will become non-zero. Equilibrium will be lost.

  • $\begingroup$ About your $\vec{F}=m \nabla B$ equation, not to get the wrong impressions here. Specifically for an ideal homogeneous B field, a ferromagnetic iron piece inside this B field, will disturb locally the homogeneous field and therefore there will be always a non zero gradient of the B field at the location of the iron particle and thus a non-zero force that will propel the iron piece forward to the direction of the gradient. $\endgroup$
    – Markoul11
    Mar 8, 2022 at 12:00
  • $\begingroup$ quote: "...or will have no magnetic force exerted upon it, if it happens to lie exactly at a point where the gradient is 0". A homogeneous magnetic field has gradient zero all over anyway when undisturbed. However, as I've said before there cannot be gradient zero at whatever location a ferromagnetic material is positioned inside the otherwise homogeneous B field simply because ferromagnetic matter when magnetized has an inhomogeneous field around it that disturbs locally the homogeneous field. $\endgroup$
    – Markoul11
    Mar 8, 2022 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.