In this article, according to diffractive theory, the author discusses the problem of optical theory in differential inspection by optics, that is , the change of the shape of light aperture and the change of the size and selection of the position of the field stop of the optical system in the Infrared Dynamic Automation sorting Instrument for example, and deduces and calculates the exact spatial spread formulas and their approximate formulas for calculating the energy of a photoelectric receiver for light apertures of different shapes, and analyzes the influence of the change of the size and the selection of the position of the field stop on inspection accuracy. The differential inspection method by optics has rarticulr advantages over other methods. This inspection is based on the output intersection signal due to two beams, and thus various interference factors have the same influence on the two beams, therefore inspection errors are greatly reduced. We take an example--Infrared Dynamic Automation Sorting instrument. This instrument also has high brightness and low threshold, adapting itself to production circumstance. Its wavelength is in the infrared field.