Combustible gases absorb infrared radiation at certain characteristic wavelengths.
A typical non-dispersive infrared detector passes a pulsed source of infrared energy through the sample, and measures the energy received by two detectors.
One “active” detector responds to wavelengths in the same band as the combustible gas, and the other detector responds to wavelengths in a reference band to compensate for changes in the source.