I have a problem with determining the direction of torque due to magnetic moment on a current loop. Since the torque is defined as
$$ \tau = p_m \times B $$
so I guess the direction of the torque should be perpendicular to both $p_m$ and $B$.
And yet, take this problem. If a current is flowing through a rectangle loop, as in the following picture, the torque should be directed parallel to the horizontal, and not have any effect in oscillating the loop around it's position of stable equilibrium. (Right?) The axis of rotation is the horizontal line passing through the center, parallel to the sides
But if we sum up the Ampere forces, we find that this torque indeed induces the oscillation of the loop.
I am very confused with the magnetic moment, as it is explained for now. Whenever I come across a problem involving it, there is no picture describing that vector, just the calculation part. I need to know not only it's intensity, but also direction, to fully understand it.