A magnetic dipole achieves its minimum potential energy when its magnetic moment aligns with the magnetic field, corresponding to an angle \( \theta = 0^\circ \). In this configuration, the \( \cos \theta \) term reaches its maximum value of 1, resulting in the lowest potential energy: \[ U = -M B \cos(0^\circ) = -M B \] Consequently, the potential energy of the magnet is minimized when the magnetic moment is parallel to the magnetic field.