Optics

Mirage (Gradient-Index Refraction)

A temperature gradient bends light through air of varying refractive index, lifting a false reflection of the sky off hot ground

A mirage is gradient-index refraction: a steep temperature gradient near hot ground lowers the air's refractive index there, so light rays curve continuously upward and a patch of sky reaches your eye as a shimmering "puddle" — a false reflection lifted off the road. The same physics, with the gradient flipped, makes distant ships float above the horizon.

  • What it isContinuous refraction in air whose index n varies with height
  • CauseTemperature gradient → density gradient → index gradient
  • Air indexn ≈ 1.000277 at 15 °C; (n−1) ∝ density ∝ 1/T
  • Inferior mirageHot ground; rays bend up; image below object
  • Superior mirageInversion; rays bend down; image above object
  • Governing lawEikonal ray equation; n·sin θ = const in layers

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

The puddle that isn't there

On a hot day you see a glassy "puddle" shimmering on the road ahead. Drive toward it and it retreats; you never reach water because there isn't any. What you're actually seeing is the sky, delivered to your eye by light that took a curved path through air.

Light usually travels in straight lines because the medium is uniform. But hot asphalt heats the air just above it, and hot air is less dense than the cooler air higher up. Density sets the refractive index, so the air near the ground has a slightly lower index than the air at eye level. Light doesn't reflect off any surface here — there is no surface. Instead, as a near-horizontal ray dips toward the ground it keeps entering lower-index air, and at each step it bends a hair more toward the horizontal, until it curves back upward and reaches your eye from below. That ray started in the bright sky. Your brain, assuming straight-line travel, places the sky on the road and calls it water.

That continuous bending through a smoothly varying index is gradient-index (GRIN) refraction. A mirage is the everyday, atmospheric-scale demonstration of it.

From temperature to a bent ray

Three links connect the hot ground to the curved ray:

  1. Temperature gradient. Solar-heated asphalt can sit at 60-70 °C while air a metre up is near 30 °C. Most of that drop happens in the first few centimetres, so the vertical temperature gradient near the surface is steep.
  2. Density gradient. At fixed pressure the ideal-gas law gives density ρ ∝ 1/T. Hotter air is thinner, so density rises with height in the first metre.
  3. Index gradient. The Gladstone–Dale relation says the refractivity (n − 1) is proportional to density. So n is lowest at the hot ground and increases with height.

Now treat the air as a stack of thin horizontal layers, each with a slightly different index. At every layer boundary Snell's law applies. As the ray crosses into higher-index air it refracts a little; chain those refractions together and a ray aimed gently downward swings around and climbs back up. The trajectory is a smooth arc, concave toward the higher index — that is, concave upward over hot ground.

The governing physics

In a layered medium with index varying only with height, Snell's law applied layer-by-layer gives an invariant — the Bouguer / Snell constant — for a ray, where θ is measured from the vertical:

n(y) · sin θ(y) = constant   along a ray

As n decreases toward the ground, sin θ must increase, so θ → 90° and the ray turns horizontal, then climbs. The ray reaches its lowest point (turns around) at the height where n·sin θ first hits the constant with θ = 90°. The continuous-medium version is the eikonal ray equation:

d/ds ( n · dr/ds ) = ∇n

where s is arc length along the ray and r is position. The ray accelerates toward the direction of increasing n — it bends toward the cooler, denser air, i.e. upward over hot ground and downward under an inversion. For a nearly horizontal ray with a vertical index gradient, the path curvature is approximately:

1/R ≈ (1/n) · (dn/dy)   (curvature of a near-horizontal ray)

The index of air comes from the gas density. A useful working form (visible light, dry air) is:

n − 1 ≈ 7.86×10⁻⁴ · (P / T)      P in kPa, T in kelvin
(n − 1) ∝ density ∝ P / T         (Gladstone–Dale + ideal gas)

At P = 101.3 kPa and T = 288 K this gives n − 1 ≈ 2.77×10⁻⁴, the familiar n ≈ 1.000277.

A worked example — how steep a gradient you need

Take air at the surface at 333 K (60 °C) and air at 1 m at 303 K (30 °C), both at 101.3 kPa. The refractivity scales as 1/T:

(n−1) at ground  = 7.86e-4 · 101.3 / 333 = 2.391e-4
(n−1) at 1 m     = 7.86e-4 · 101.3 / 303 = 2.628e-4
Δn over 1 m      = 2.37e-5
dn/dy            ≈ 2.37e-5 per metre

The local radius of curvature of a grazing ray is R ≈ n / (dn/dy) ≈ 1.000 / 2.37×10⁻⁵ ≈ 42 km. That seems huge, but the ray only needs to dip and rise across a metre or two of height — and most of the gradient is concentrated in the first few centimetres, where dn/dy is far larger and R is correspondingly small. That tight near-surface curvature is exactly what lets a sightline graze the hot layer and return.

QuantityCool side (15 °C)Hot side (60 °C)Note
Temperature T288 K333 KDrives everything
Refractivity (n − 1)2.77×10⁻⁴2.39×10⁻⁴∝ 1/T at fixed P
Index n1.0002771.000239Lower over hot ground
Ray bendsUpwardToward higher-index (cooler) air
Grazing critical angle≈ 0.5°Below horizontal, for inferior mirage

Inferior, superior, and Fata Morgana

The single control knob is the sign of the temperature gradient.

TypeGradientIndex with heightRay bendsImage vs objectWhere you see it
Inferior mirageHot below, cool above (T ↓ with height)n increases with heightUpwardBelow the objectDesert sand, sunny roads
Superior mirageCold below, warm above (inversion)n decreases with heightDownwardAbove the objectCold seas, polar coasts
Fata MorganaMultiple stacked inversion layersn varies non-monotonicallyBoth, alternatingStretched, stacked, invertedOceans, large lakes, ice fields
Heat shimmerTurbulent, fluctuatingRandom small pocketsWobbling, time-varyingBoiling, unstableOver fires, engines, hot tarmac

A superior mirage can hoist a ship hull-up above the true horizon and even let you see objects geometrically below the horizon — the curved ray hugs the Earth's curvature. Fata Morgana, the most dramatic case, stacks several inversion layers so the image is sliced into alternating erect and inverted bands, producing the "castles in the air" that fooled sailors for centuries.

Where it shows up — and what it costs

  • Driving and aviation. Road mirages are harmless, but the same surface gradients distort the apparent position of runways and the horizon on hot tarmac, a known nuisance for low-altitude landings.
  • Astronomical refraction. The atmosphere's overall density gradient is a continuous GRIN lens: it lifts the apparent position of the Sun by about 0.5° at the horizon — roughly the Sun's own diameter — so the Sun you see "setting" has geometrically already set. Astronomers correct for this in every horizon-grazing measurement.
  • Surveying and geodesy. Long sight-lines near the ground bend by terrestrial refraction; survey crews apply a refraction coefficient (typically k ≈ 0.13) to leveling and triangulation to avoid metre-scale errors over kilometres.
  • Lab and industry GRIN optics. The same principle, engineered on purpose, makes GRIN lenses and optical fibers: a graded index profile focuses or guides light with no curved surfaces. Step-index and graded-index fiber both rely on n falling away from the core.
  • Schlieren and shadowgraph imaging. Engineers visualize shock waves, convection, and gas leaks by photographing exactly these index gradients — the bending of light by density variations is the signal.
  • Search and rescue / navigation history. Superior mirages let observers see ships and coastlines beyond the geometric horizon; the effect was logged by polar explorers and likely contributed to "phantom island" sightings on old charts.

Common misconceptions and edge cases

  • "It's a reflection off a hot-air layer." No mirror, no boundary. It is continuous refraction through a smooth index gradient. The "reflection" look comes from the ray turning around, not bouncing.
  • "The puddle is water that evaporates as you approach." Nothing evaporates. The puddle is an image of the sky tied to your viewing angle; it recedes because the critical grazing geometry travels with your eye.
  • "Mirages only happen in deserts." Any steep vertical temperature gradient does it — a sunny parking lot, a wood stove's chimney, a candle flame, even the air above a hot mug. Cold-driven superior mirages happen over oceans and ice.
  • "The image is always upside down." An inferior mirage of the sky shows the sky right-side-up; but a mirage of an object near the horizon (a distant car, a camel) is inverted, because rays from different heights cross. Fata Morgana mixes erect and inverted bands.
  • "It needs a very large index change." The change is parts-per-million. What matters is the gradient acting over a long, near-grazing path; small dn/dy integrated over tens of metres bends rays enough to lift the horizon.
  • "Mirages are subjective / not real." They are perfectly real optical images — a camera records them exactly as the eye sees them. The illusion is only in the brain's straight-line assumption about where the light came from.

Frequently asked questions

Why does a hot road look wet on a sunny day?

It's an inferior mirage, not water. Sun-baked asphalt heats the thin layer of air just above it to 50-70 °C while the air at eye level is far cooler. Hot air is less dense, so its refractive index is lower. A nearly horizontal ray heading toward the road enters ever-lower-index air, bends continuously upward, and curves back to your eye carrying an image of the bright sky. Your brain interprets that patch of sky on the ground as a reflective puddle. As you drive toward it, the geometry never lets you reach it — the "water" always recedes.

What is the difference between an inferior and a superior mirage?

It's the direction of the temperature gradient. An inferior mirage forms over hot ground: temperature decreases with height, so the refractive index increases with height and rays bend upward — the false image appears below the real object (a sky-puddle under a car). A superior mirage forms over cold ground or water (a temperature inversion): temperature increases with height, index decreases with height, rays bend downward, and the image appears above the real object — distant ships or coastlines float in the sky. Fata Morgana is a complex, layered superior mirage.

Is a mirage a reflection or a refraction?

It's refraction, even though it looks like a reflection. There is no mirror and no surface. The refractive index of air varies smoothly with height because temperature (hence density) varies with height, so light follows a continuously curving path rather than a straight line that reflects off a boundary. The curving is governed by the eikonal ray equation; the apparent "reflection" is just the curved ray sampling the sky and delivering it to your eye from a low angle.

How much does air's refractive index actually change with temperature?

Air at 15 °C and sea-level pressure has n ≈ 1.000277. The refractivity (n − 1) is proportional to gas density, so by the ideal-gas law it scales as 1/T at fixed pressure. Going from 15 °C (288 K) to 60 °C (333 K) drops (n − 1) by the ratio 288/333 ≈ 0.865 — from about 277 to 240 parts per million. That sounds tiny, but for a ray skimming the ground at grazing incidence the cumulative bending over tens of metres is enough to lift the horizon and form a vivid mirage.

Why can't you ever walk up to the puddle in a desert mirage?

Because the "puddle" is a viewing-angle effect tied to your eye height and the local gradient, not a fixed object on the ground. The mirage appears wherever the line of sight grazes the hot layer at just below the critical grazing angle — typically a fraction of a degree below horizontal. As you advance, that critical line of sight moves with you, so the apparent water keeps the same angular distance ahead. You're chasing the geometry of your own sightline, which is why the desert oasis is always "just over there."

Does heat haze shimmer for the same reason as a mirage?

Yes — both are refraction by hot air, but shimmer is the turbulent, time-varying cousin of the steady mirage. Rising thermals and turbulent eddies create small, fluctuating pockets of warm (low-index) and cool (high-index) air. Each pocket deflects rays by a slightly different amount, and because the pockets churn, the deflection changes from millisecond to millisecond, so the image wobbles and boils. A clean mirage needs a smooth, stably layered gradient; shimmer is what you get when that gradient is stirred.