Answer: U = -mB cos(theta).
- A U = mB sin(theta)
- B U = mB cos(theta)
- C U = -mB cos(theta)
- D U = -mB sin(theta)
Correct answer: C. U = -mB cos(theta)
Explanation: The potential energy of a magnetic dipole in a field is U = -m·B = -mB cos(theta), which is minimum (most stable) when the magnet is aligned with the field (theta = 0).

Magnetic field of a bar magnet: field lines emerge from the north pole and re-enter at the south pole outside the magnet, forming continuous closed loops. Image: Geek3, CC BY-SA 3.0, via Wikimedia Commons.
Concept context
Bar magnets, Earth's magnetism, and how different materials respond to an external magnetic field - diamagnetic, paramagnetic, and ferromagnetic behaviour.