In essence, a lock-in amplifier takes the input signal, multiplies it by the reference signal (either provided from the internal oscillator or an external source, and can be sinusoidal or square waveHorowitz and Hill, 1985, the Art of electronics figure 14.35), and integrates it over a specified time, usually on the order of milliseconds to a few seconds. The resulting signal is a DC signal, where the contribution from any signal that is not at the same frequency as the reference signal is attenuated close to zero. The out-of-phase component of the signal that has the same frequency as the reference signal is also attenuated (because sine functions are orthogonal to the cosine functions of the same frequency), making a lock-in a phase-sensitive detector.
