A vectorial analysis of magnetic resonance spectrometers, based on traveling wave resonators and including the reference arm and the automatic control of frequency, has been developed. The proposed model, valid also for stationary wave resonators, gives the response function of the spectrometer for any working condition, including scalar detectors with arbitrary response law and arbitrary excitation frequency. The purely dispersive and purely absorptive linear responses are discussed in detail for different scalar detectors. The developed approach allows for optimizing the performances of the spectrometer and for obtaining the intrinsic lineshape of the sample in a very broad range of working conditions. More complex setups can be modeled following the proposed scheme.