derivation of all of these effects within one unified framework, namely, a field-theoretic description of electrons and photons. Starting with finite-temperature quantum electrodynamics (QED) coupled to a field-theoretic description of finite-density quasi-relativistic electrons we show that the exchange, dipole-dipole, and DM interactions all appear naturally upon integrating out the photons. The exchange and DM interactions arise from integrating out the scalar part of the electromagnetic potential; the dipole-dipole interaction, from integrating out the vector potential. Furthermore, the DM and dipole-dipole interactions are indeed of the same order in the relativistic corrections to the Schr[ö]{}dinger equation (i.e., of second order in $\vF/c$, with $\vF$ the Fermi velocity and $c$ the speed of light, or of second order in the fine structure constant $\alpha$).

Integrating out the fermions then leads to an effective theory for quantum magnets that generalizes and replaces the Hertz-Millis theory[@Hertz_1976; @Millis_1993] and its generalizations.[@Belitz_Kirkpatrick_Vojta_2005] More generally, the theory provides a derivation of spin-spin interactions in itinerant Fermi systems in general, whether or not they are in a parameter regime where they develop long-range magnetic order. Our results are therefore relevant, for instance, for fermionic atoms in optical traps or on optical lattices.[@Fregoso_Fradkin_2010]

This paper is organized as follows. 