Whiskers are used by rats to detect minute sensory stimuli, such as vibrations in the air, as well as wind movement, which both can be indications of the presence of another animal.
Whiskers are very delicate and sensitive and therefore important to rats for use as a defense mechanism in this way.
Rats use their whiskers in combination with their excellent hearing ability and sense of smell in order to detect food sources, or the presence of predator or prey in their environment.