  If dark matter is a light scalar field weakly interacting with elementary
particles, such a field induces oscillations of the physical constants, which
results in time-varying force acting on macroscopic objects. In this paper, we
report on a search for such a signal in the data of the two LIGO detectors
during their third observing run (O3). We focus on the mass of the scalar field
in the range of $10^{-13}-10^{-11}~{\rm eV}$ for which the signal falls within
the detectors' sensitivity band. We first formulate the cross-correlation
statistics that can be readily compared with publically available data. It is
found that inclusion of the anisotropies of the velocity distribution of dark
matter caused by the motion of the solar system in the Milky Way Galaxy
enhances the signal by a factor of $\sim 2$ except for the narrow mass range
around $\simeq 3\times 10^{-13}~{\rm eV}$ for which the correlation between the
interferometer at Livingston and the one at Hanford is suppressed. From the
non-detection of the signal, we derive the upper limits on the coupling
constants between the elementary particles and the scalar field for five
representative cases. For all the cases where the weak equivalence principle is
not satisfied, tests of the violation of the weak equivalence principle provide
the tightest upper limit on the coupling constants. Upper limits from the
fifth-force experiment are always stronger than the ones from LIGO, but the
difference is less than a factor of $\sim 5$ at large-mass range. Our study
demonstrates that gravitational-wave experiments are starting to bring us
meaningful information about the nature of dark matter. The formulation
provided in this paper may be applied to the data of upcoming experiments as
well and is expected to probe much wider parameter range of the model.
