The potential energy of a magnetic dipole is minimum when the magnetic moment is aligned with the magnetic field, i.e., when \( \theta = 0^\circ \). At this position, the cosine term \( \cos \theta \) is maximum (equal to 1), and thus the potential energy is at its minimum: \[ U = -M B \cos(0^\circ) = -M B \] Therefore, the potential energy of the magnet is minimum when the magnetic moment is aligned with the magnetic field.