Consider the scattering of a beam of wavelength  by an assembly of  particles or atoms stationary at positions .  Assume that the scattering is weak, so that the amplitude of the incident beam is constant throughout the sample volume (Born approximation), and absorption, refraction and multiple scattering can be neglected (kinematic diffraction).  The direction of any scattered wave is defined by its scattering vector . ,  where  and  ( ) are the scattered and incident beam wavevectors, and  is the angle between them. For elastic scattering,  and , limiting the possible range of  (see Ewald sphere). The amplitude and phase of this scattered wave will be the vector sum of the scattered waves from all the atoms  
For an assembly of atoms,  is the atomic form factor of the -th atom.  The scattered intensity is obtained by multiplying this function by its complex conjugate
The structure factor is defined as this intensity normalized by  
If all the atoms are identical, then Equation () becomes  and  so
Another useful simplification is if the material is isotropic, like a powder or a simple liquid.  In that case, the intensity depends on  and . In three dimensions, Equation () then simplifies to the Debye scattering equation:
An alternative derivation gives good insight, but uses Fourier transforms and convolution.  To be general, consider a scalar (real) quantity  defined in a volume ; this may correspond, for instance, to a mass or charge distribution or to the refractive index of an inhomogeneous medium. If the scalar function is integrable, we can write its Fourier transform as . In the Born approximation the amplitude of the scattered wave corresponding to the scattering vector  is proportional to the Fourier transform . When the system under study is composed of a number  of identical constituents (atoms, molecules, colloidal particles, etc.) each of which has a distribution of mass or charge  then the total distribution can be considered the convolution of this function with a set of delta functions.
with  the particle positions as before.  Using the property that the Fourier transform of a convolution product is simply the product of the Fourier transforms of the two factors, we have , so that:
This is clearly the same as Equation () with all particles identical, except that here  is shown explicitly as a function of .
In general, the particle positions are not fixed and the measurement takes place over a finite exposure time and with a macroscopic sample (much larger than the interparticle distance). The experimentally accessible intensity is thus an averaged one ; we need not specify whether  denotes a time or ensemble average. To take this into account we can rewrite Equation () as: