The Rayleigh hypothesis is reviewed in relation to scattering by periodic surfaces, aperiodic surfaces, and bounded, two-dimensional bodies. Conditions for its validity are described, and explicit results are quoted for a sinusoidal grating. Some methods to solve scattering problems for periodic surfaces are outlined. One particular procedure for periodic surfaces and bounded scatterers is examined in detail. This involves an expansion for the scattered field in terms of the same sets of elementary wavefunctions that occur in connection with the Rayleigh hypothesis. The coefficients are determined by satisfying the boundary condition in the least-squares sense. It is shown that this solution converges uniformly to the scattered field at all points exterior to the boundary of the scatterer. Necessary completeness properties of the sets of wavefunctions are established in the appendices.