In Head Trip, PopSci explores the relationship between our brains, our senses, and the strange things that happen in between.

WE’VE ALL SEEN IT in films and cartoons. Someone wanders through a hot desert for days, and suddenly, out of nowhere, a shady, watery oasis materializes several hundred yards ahead. With the little bit of strength they have left, they run toward the promise of relief from their intense thirst, only to be sorely disappointed when the vision vanishes as they reach its perceived location.  

Mirages aren’t as miraculous or vividly detailed in real life. Instead, they’re optical illusions that form from two different air densities refracting light in different ways, explains Bryce St. Clair, an optometrist at Johns Hopkins University. Due to the disproportionate temperature difference between the ground and the atmosphere above, you’re most likely to see a mirage over scorching surfaces, like desert sand, a highway, or a sidewalk. (Though if the air-temperature conditions are right, you could theoretically see a mirage anywhere.) 

“Let’s talk about the stereotypical one that you find in a desert. The sand gives off a lot of heat, so the air right above it is extremely hot, and therefore it is less dense,” says St. Clair. “As [the air] rises, it gets colder and changes density. It’s the interface between those two different densities of air that creates the optical illusion. Basically, light is refracted in a different manner.” 

A mirage forms when the light from the sky curves upward toward the cooler air and appears to be coming from the ground. We perceive this virtual image, in part, due to the angle of refraction and the refractive index of the light, or the measurement of a bending ray of light as it passes through different mediums. Light travels in a straight line when moving through a single medium with uniform density, like only cold or only hot air, but the light changes its angle when it passes between two mediums of different densities. The warping that occurs at the boundary between hot and cold air creates the watery image we perceive.

Think about one of the more commonly experienced mirages—a puddle on a hot roadway. When a driver is viewing the supposed pool of water from an angle almost parallel to the horizon, the light bends upward into their eyes. The surface between the hot and the cold air functions like a mirror for the refracted light, which most often reflects the sky, resulting in an illusion of water on the road. (The phenomenon can also result in the reflection of real objects in the distance.) 

Mirages work only when the viewer is far away from the front between the hot and cold air, though. Keeping with the roadway example, as the driver approaches the initially perceived location of the puddle, it disappears and appears to be hundreds of yards ahead again. “When you’re far away, the angle that you’re making with the surface of the hot-and-cold-air boundary is very shallow,” says Peter Tse, a professor of psychological and brain sciences at Dartmouth University. As you get closer, or if you come up on a hill, “your head is above that boundary. And that angle is too big to get the reflection.” 

While we may want to think of a mirage as a glitch in human visual processing, the phenomenon is considered a true optical illusion as it can be explained entirely by changes in the outside world—in this case, the properties of light. 

“When you see a face in the clouds, that’s an illusion due to the way your brain works,” says Tse. “But mirages are not due to your brain—they’re due to the physics of light.” 

To adjust for this optical phenomenon, we’d need to have regular interactions with mirages. For instance, when you look out a window, you can perceive, recognize, and understand that the outdoors and the reflection of the room behind you are different scenes. 

“Our brains are able to make sense of that in part because we’ve interacted with glass, the world, and we can move our head from side to side,” says Arthur Shapiro, a professor at American University and an editor of The Oxford Compendium of Visual Illusions. “We can see different objects moving on different planes.” 

So while our brains don’t create every illusion we see, if given the opportunity to interact with illusions frequently, our visual processing systems could develop the ability to adjust for the weirdness we perceive. Given that we don’t encounter mirages as often as glass windows, the probability of our brains correcting such an image as they process it is low, especially given that the watery vision we perceive is quite similar to what we would see if there were a puddle on the road.

If you spend enough time baking on the sand, though, your brain might figure out a way to overcome this illusion too. It’s that powerful. 

Correction (February 16, 2023): Peter Tse is a professor at Dartmouth College, not Dartmouth University.

Read more PopSci+ stories.