A flat coil carrying a current has a magnetic moment →μ. It is placed in a magnetic field →B. The torque on the coil is →τ
The magnetic moment is defined as a vector relating the aligning torque on the object from an externally applied magnetic field to the field vector itself. The relationship is given by:
τ=→μ×→B
where τ is the torque acting on the dipole and B is the external magnetic field, and μ is the magnetic moment. Direction of torque is given by the right hand rule.