Imagine I have a solenoid connected to a power supply. Solenoid produces an electromagnetic field. Now I take a permanent magnet and place it inside the solenoid. How will the magnet align itself (assuming there is no gravity) inside the solenoid and will it rotate itself around the central axis "aligning" itself?

From these two cases cases, which one is correct behaviour and where would the "north" pole point (up, down, left or right):

One:

Two:

P.S. What if the magnet is shaped differently, for example like a horseshoe, will it change its behaviour?

1 Answer
1

As Wikipedia will inform you, a dipole magnet in a magnetic field $\mathbf B$ will be subject to a torque $$\mathbf \tau=\mathbf m\times\mathbf B,$$ where the magnetic dipole $\mathbf m$ points from the magnet's south pole to its north pole. Thus the equilibrium positions are parallel and antiparallel to the field, so the situation will look like your first picture.

Note also that there are two orientations for the magnet, of which one will be stable and one will be unstable. To discriminate between the two, you need to choose the configuration that minimizes the energy, $$U=-\mathbf m\cdot\mathbf B,$$ so $\mathbf m$ will be parallel to the magnetic field. (To find out in which direction that goes, see this answer.

Is it right that if the magnet is moved along the solenoid in it's stable position (left and right) then it's lowest energy configuration won't change? And increase in B would affect the U and change the lowest energy configuration for the magnet?
–
XeosAug 11 '13 at 10:51

It would change the energy but not its dependence on orientation, so the equilibrium orientation won't change. If the energy change is significant, though, the true equilibrium will be where the field is greatest.
–
Emilio PisantyAug 11 '13 at 14:17