  We investigate the correlation between the distribution of galaxies and the
predicted gravitational-wave background of astrophysical origin. We show that
the large angular scale anisotropies of this background are dominated by nearby
non-linear structure, which depends on the notoriously hard to model galaxy
power spectrum at small scales. In contrast, we report that the
cross-correlation of this signal with galaxy catalogues depends only on linear
scales and can be used to constrain the average contribution to the
gravitational-wave background as a function of time. Using mock data based on a
simplified model, we explore the effects of galaxy bias, angular resolution and
the matter abundance on these constraints. Our results suggest that, when
combined with galaxy surveys, the gravitational-wave background can be a
powerful probe for both gravitational-wave merger physics and cosmology.
