.
Homogenization theory is used to calculate the macroscopic dielectric constant from the quantum microscopic dielectric function in a periodic medium. The method can be used to calculate any macroscopic constitutive relation, but it is illustrated here for the case of electrodynamics of matter. The so-called cell problem of homogenization theory is solved and an explicit expression is given for the macroscopic dielectric constant in a form akin to the Clausius-Mossotti or Lorentz-Lorenz relation. The validity of this expression is checked by showing that the standard formula is recovered for cubic materials and that the average of the microscopic energy density is the macroscopic one. Finally, the general expression is applied to Bloch eigenstates.