  Gravitational lensing has emerged as a powerful probe of the matter
distribution on subgalactic scales, which itself may contain important clues
about the fundamental origins and properties of dark matter. Broadly speaking,
two different approaches have been taken in the literature to map the
small-scale structure of the Universe using strong lensing, with one focused on
measuring the position and mass of a small number of discrete massive subhalos
appearing close in projection to lensed images, and the other focused on
detecting the collective effect of all the small-scale structure between the
lensed source and the observer. In this paper, we follow the latter approach
and perform a detailed study of the sensitivity of galaxy-scale gravitational
lenses to the ensemble properties of small-scale structure. As in some previous
studies, we adopt the language of the substructure power spectrum to
characterize the statistical properties of the small-scale density field. We
present a comprehensive theory that treats lenses with extended sources as well
as those with time-dependent compact sources (such as quasars) in a unified
framework for the first time. Our approach uses mode functions to provide both
computational advantages and insights about couplings between the lens and
source. The goal of this paper is to develop the theory and gain the intuition
necessary to understand how the sensitivity to the substructure power spectrum
depends on the source and lens properties, with the eventual aim of identifying
the most promising targets for such studies.
