Understanding the thermal-chemical state of the Earth's core requires knowledge of the thermal expansion of iron-rich alloys at megabar pressures and high temperatures. Our survey of literature revealed a significant lack of such data. We have determined the unit-cell parameters of the iron-sulfur compound Fe3S by using synchrotron x-ray diffraction techniques and externally heated diamond-anvil cells at pressures up to 42.5 GPa and temperatures up to 900 K. The zero-pressure thermal expansivity of Fe3S is determined in the form ␣ ؍ a1 ؉ a2T, where a1 ؍ 3.0 ؎ 1.3 ؋ 10 ؊5 K ؊1 and a2 ؍ 2.8 ؎ 1.5 ؋ 10 ؊8 K ؊2 . The temperature dependence of isothermal bulk modulus (٢KT,0/٢T)P is estimated at ؊3.75 ؎ 1.80 ؋ 10 ؊2 GPa K ؊1 . Our data at 42.5 GPa and 900 K suggest that Ϸ2.1 at. % (1.2 wt. %) sulfur produces 1% density deficit in iron. We have also carried out energy-dispersive x-ray diffraction measurements on pure iron and Fe0.864Si0.136 alloy samples that were placed symmetrically in the same multianvil cell assemblies, using the SPring-8 synchrotron facility in Japan. Based on direct comparison of unit cell volumes under presumably identical pressures and temperatures, our data suggest that at most 3.2 at. % (1.6 wt. %) silicon is needed to produce 1% density deficit with respect to pure iron.Fe3S ͉ Fe-Si alloy ͉ light element