Gas sensors operate through various principles, including electrochemical, infrared, and semiconductor methods. For instance, electrochemical sensors detect gas through a chemical reaction that generates an electrical signal proportional to the gas concentration. Infrared sensors measure gas concentrations based on the absorption of infrared light at specific wavelengths. Semiconductor sensors change their electrical resistance when they come into contact with certain gases.