The real reasons you can't hide from mosquitos. Aw, shucks!
The first cue is our breath. No, garlic, or any other food for that matter, won't repel them. (That only works against vampires). How do I know that? Because I've never been bitten by a vampire, unless you count those monstrous little blood-sucking ones. Aside from drug commercials, I'm hard-pressed to think of anything more annoying than female mosquitoes. (Sorry, girls, it's just the females that bite.). That's just biology. Whether that has anything to do with the human "war of the sexes" is, of course, debatable. But the fact that my wife is feverishly looking for her cast-iron pan as I write this outdoors, though, is not up for debate. Mosquitoes have been around for at least 150 million years, long before T. Rex, Triceratops, or Velociraptors. We have fossils to prove it. Only female mosquitoes bite us because blood is baby food. They need the nutrients in the blood to make eggs.
Researchers used high-speed infrared cameras to track mosquito movement in 3 dimensions. They recorded 1,000s of flight paths & then applied some "math" to figure out what actually guides mosquitoes to their next meal. Math from the paper—WTF, I understood nothing from it except for "2" & nothing else. But the takeaway is that, perhaps unsurprisingly, mosquitoes do not rely on a single cue. The first is vision. Mosquitoes are strongly attracted to dark colors. This has been proven in controlled experiments. Dress a person half in black & half in white, & the mosquitoes don't hesitate—they go to the dark side. This isn't because mosquitoes have a refined sense of fashion or are into goth. It's just that dark objects stand out against lighter backgrounds, making them easier to detect. Dark colors absorb more solar radiation, heating up by 5-20°F (3-11°C). Mosquitoes detect this even in low light. They use motion & contrast to lock onto shapes from 15-30 ft (5-10 m) away.
Perhaps even more than this is CO₂. Humans exhale 2.3 lb (1 kg) of CO₂ per day, & mosquitoes detect a CO₂ plume from 30 to 50 ft (9 to 15 m) downwind. But this doesn't attract them to your skin—it tells them to start searching in this direction. Once detected, they switch into host-seeking mode, increasing flight speed & zigzag scanning. The 3rd cue is heat emanating from our skin. Once within 3-6 ft (1-2 m), mosquitoes switch to thermal imaging. They can detect temperature differences as small as 0.1-0.3°F (0.05-0.15°C). They follow the gradient towards the warmest, moistest surface. Ankles, wrists, necks & your face & head. It's a perfect mosquito magnet—dark features, a warm, moist surface & a steady stream of CO₂ from breathing. Combine all 3, & you're on the menu somewhere between the asparagus tips & the crème brûlée. There's still another attractant.
Our skin microbiome produces 100s of VOCs (volatile organic compounds) such as lactic acid, ammonia, butyric acid, acetone, isovaleric acid & the carboxylic acids (the "feet smell" molecules). This is the same reason mosquitoes are attracted to our feet as they are to smelly cheeses such as Limburger (the cheese used in the famous Ig Nobel mosquito study), Brie & raclette. Human feet & smelly cheese both contain short- and medium-chain carboxylic acids (isovaleric acid, butyric acid, propionic acid, acetic acid & sulfur compounds). They are both "fermentation projects" run by similar bacteria, the key microbe being Brevibacterium linens. These live between our toes & on the rinds of the smelly cheeses. They smell like feet, sweat, ripe cheese, smelly socks & tangy funk. The French poet Léon-Paul Fargue (1876-1947) called the cheeses (and our feet) 'les pieds de Dieu'—the feet of God.
This is another reason most mosquito traps fail. They mimic one cue (usually CO₂ or UV light), but mosquitoes use 5 cues in sequence. Actually, traps attract mosquitoes into your yard without zapping enough of them to make a difference. Chemists have identified the specific chemicals mosquitoes are attracted to. They are 1-octen-3-ol, the "mushroom breath." Humans breathe it out & sweat it out in tiny amounts. But all warm-blooded animals leak a little of this. Think of it as an "I'm a mammal badge." It also smells like freshly turned soil. Lactic acid is what your muscles & skin release. when it gets hot, exercise, & stress. It smells faintly tangy, like mild yogurt or after a workout. Ammonia, the "skin bacteria whisperer." With mosquito season upon us, all of this means that every time you step outside, you're not just a target—you're a signal. (As I am, as evidenced by the sight of a waffle iron flying across our table's evening outdoor dinner.)