The relationship between the sound velocity, density, and temperature of liquid metals is important when one tries to interpret the seismic velocity profile and infer the chemical compositions of the Earth’s outer core. We, therefore, have experimentally measured the longitudinal acoustic (LA) velocity of liquid indium under high P-T conditions. Also, we examined a Hugoniot data of liquid iron by comparing with an existing equation of state (EoS). The LA velocities of liquid and solid indium at pressures up to 6.7 GPa and temperatures mostly at 710 K were measured using inelastic X-ray scattering (IXS) to probe samples in an externally heated diamond-anvil cell. A thermal EoS for liquid indium derived from existing literature was used to calculate the density for the IXS measurements and to provide an independent check on the sound velocities. The IXS data are consistent with the hydrodynamic LA velocity derived from the liquid EoS, implying that the positive dispersion is minimal in liquid indium. The velocity-density relation for liquid indium derived from the EoS has temperature dependence, implying that Birch’s law does not hold for the liquid phase. Similarly we calculated the temperature-velocity-density relation of liquid iron over the Earth’s core range from a recently reported EoS. The resulting velocity-density relation is also temperature dependent, indicating that liquid iron thus does not follow Birch’s law. The violation of Birch’s law implies that the Hugoniot data cannot be directly compared with seismological observations because of the different temperature ranges. Formulation of the temperature-velocity-density of liquid iron-alloys supported by experimental measurements provides better understanding of the thermodynamic state of the Earth’s core.