Prepare for University Studies & Career Advancement

Rainbows, Halos, and Mirages

Rainbows, halos, and mirages are among the most memorable optical effects in the atmosphere. They appear in different settings: rainbows after rain, halos around the Sun or Moon, and mirages above hot roads or distant horizons. Although they look magical, each one can be explained by the behaviour of light as it bends, reflects, spreads into colours, and travels through air with changing temperature.
This page introduces Rainbows, Halos, and Mirages as part of the wider Atmospheric and Environmental Optics cluster. It builds naturally on Rayleigh Scattering and the Blue Sky, but shifts attention from molecular scattering to larger-scale optical paths through droplets, ice crystals, and temperature-layered air.
The main goal is to help students see atmospheric optical phenomena as real physics in the sky. A rainbow is not simply “colour in water”. A halo is not merely a glow around the Sun. A mirage is not a hallucination. Each is a visible trace of how light travels through the environment.

The Atmospheric and Environmental Optics Cluster

This subpage operates as an essential geometric optics block within the broader Atmospheric and Environmental Optics sub-cluster. Use the pathway below to navigate through the complete learning module:

Rainbows, Halos, and Mirages

Current page. Explore how water droplets, crystalline ice sheets, and micro-scale thermal air gradients drive refraction, dispersion, and total internal reflection.

Lidar and Atmospheric Sensing

Analyzes how pulsed lasers and high-speed time-of-flight electronics calculate range-resolved vertical profiles of particles and wind vectors.

What Rainbows, Halos, and Mirages Really Are

Rainbows, halos, and mirages are atmospheric optical phenomena. They happen when sunlight or moonlight interacts with the atmosphere in ways that redirect light into the observer’s eyes.
Rainbows are mainly caused by refraction, internal reflection, and dispersion inside water droplets. Halos are mainly caused by refraction and reflection in ice crystals. Mirages are caused by refraction through layers of air with different temperatures and densities.
PhenomenonMain Optical ProcessAtmospheric ConditionCommon Appearance
RainbowRefraction, internal reflection, and dispersionSunlight interacting with water dropletsColoured arc opposite the Sun
HaloRefraction and reflection in ice crystalsHigh thin clouds containing ice crystalsRing or bright spots around the Sun or Moon
MirageRefraction through temperature gradientsLayers of air with non-uniform temperaturesDistorted, displaced, or inverted image
These effects are not rare miracles of nature. They are repeatable optical consequences of light meeting water droplets, ice crystals, or non-uniform air.

Core Optical Ideas Behind These Phenomena

Before studying rainbows, halos, and mirages separately, students should understand a few basic optical ideas.

Refraction

Refraction is the bending of light when it passes from one medium into another or through a region where the refractive index changes.

Reflection

Reflection occurs when light changes direction after meeting a surface or boundary. In rainbows, light reflects inside water droplets.

Dispersion

Dispersion occurs when different wavelengths of light bend by different amounts, separating white light into colours.

Total Internal Reflection

Total internal reflection occurs when light inside a medium reflects completely from a boundary instead of escaping, under suitable conditions.

Temperature Gradient

A temperature gradient in air changes the refractive index gradually, causing light rays to curve rather than travel in straight lines.

Observer Geometry

Atmospheric optical effects depend on the positions of the Sun, atmosphere, and observer. The same droplets or crystals may not produce the same view for everyone.

Theoretical Framework: Geometrical Optics of Raindrops, Hexagonal Ice Crystals, and Fermat’s Principle

To advance from descriptive meteorology to formal physics, we can map these sky phenomena using precise geometric ray tracing and optical equations. Each effect depends on light taking a specific path through water, ice, or changing air layers.

The Primary Rainbow Angle and the Cartesian Minimum Deviation

The formation of a primary rainbow can be analyzed by calculating the total deviation angle φ of a light ray as it undergoes a single internal reflection inside a spherical water droplet. Let i represent the angle of incidence as the ray enters the droplet from air, and let r represent the matching angle of refraction inside the water. Applying geometric tracking, the total deflection of the ray can be expressed as:
$$\phi(i) = 2(i – r) + (\pi – 2r) = \pi + 2i – 4r$$
According to Snell’s law, the relationship between these angles is defined by sin(i) = n⋅sin(r), where n is the refractive index of water. To find where the exiting rays pack together tightly—which creates the bright, concentrated band of colour we see in the sky—we calculate the angle of minimum deviation by setting the derivative of the deflection equation to zero:
$$\frac{d\phi}{di} = 2 – 4\frac{dr}{di} = 0 \Rightarrow \frac{dr}{di} = \frac{1}{2}$$
Differentiating Snell’s law with respect to i yields cos(i) = n⋅cos(r)(dr/di). Substituting dr/di = 1/2 and applying trigonometric identities leads directly to the classic Cartesian equation for the rainbow scattering angle:
$$\cos(i) = \sqrt{\frac{n^2 – 1}{3}}$$
For visible light traveling through water, the refractive index varies from approximately n = 1.331 for longer red wavelengths to n = 1.344 for shorter violet wavelengths. Evaluating this equation reveals that the minimum deviation occurs at a scattering angle of roughly 138°. This means the concentrated colored arc appears at an angular radius of 180° − 138° = 42° relative to the antisolar point for red light, and 40° for violet light, defining the precise dimensions and colour sequence of the primary rainbow.

Hexagonal Ice Crystals and the 22° Halo Minimum deviation

Atmospheric halos are produced when light travels through hexagonal ice crystals, which act as microscopic prisms with an effective apex angle of α = 60°. The total deviation angle D of a light ray passing through two alternate faces of a prism is given by D = i1 + e2 − α, where i1 is the initial angle of incidence and e2 is the final angle of emergence. The configuration that yields the absolute minimum deviation occurs when the ray travels symmetrically through the crystal, meaning i1 = e2. Under these symmetric conditions, the system simplifies to the standard prism equation:
$$n_{\text{ice}} = \frac{\sin\left(\frac{D_{\text{min}} + \alpha}{2}\right)}{\sin\left(\frac{\alpha}{2}\right)}$$
Using the refractive index of ice (nice ≈ 1.31) and an apex angle of α = 60°, we can solve directly for the minimum deviation angle:
$$\sin\left(\frac{D_{\text{min}} + 60^\circ}{2}\right) = 1.31 \times \sin(30^\circ) = 0.655 \Rightarrow \frac{D_{\text{min}} + 60^\circ}{2} \approx 40.92^\circ \Rightarrow D_{\text{min}} \approx 21.84^\circ$$
Because the crystals are randomly oriented in the atmosphere, light rays are scattered across a range of angles, but they become highly concentrated at this minimum threshold of roughly 22°. This concentration creates a distinct, bright ring centered directly around the Sun or Moon.

Mirages and Fermat’s Principle in Non-Uniform Media

Mirages are caused by gradual refraction through a non-uniform medium rather than sharp boundaries. According to Fermat’s Principle, a light ray traveling between two points will follow the path that minimizes its total transit time. In an atmosphere with a vertical temperature gradient, the air density and matching refractive index n(y) vary continuously with height y. The path of the ray can be tracked using the calculus of variations to minimize the optical path integral:
$$\delta \int n(y) ds = \delta \int n(y) \sqrt{1 + \left(\frac{dx}{dy}\right)^2} dy = 0$$
Because the refractive index varies only along the vertical y axis, applying Noether’s theorem or Euler’s equation yields a continuous invariant form of Snell’s law: n(y)⋅cos(θ) = C, where θ is the local angle of the ray relative to the horizontal plane and C is a path constant. Differentiating this invariant form reveals the curvature of the ray:
$$\frac{d^2y}{dx^2} = \frac{1}{n}\frac{dn}{dy}$$
On a hot asphalt road, the temperature decreases with height, creating a positive refractive index gradient (dn/dy > 0). This causes the ray curvature d²y/dx² to be positive, bending downward-traveling rays progressively upward into a U-shaped arc toward the observer’s eye. This creates an inferior mirage, making the sky appear as if it is reflecting off the hot surface.

Rainbows: Light Inside Water Droplets

A rainbow forms when sunlight enters water droplets in the air, bends as it enters, reflects inside the droplet, and bends again as it leaves. Because different wavelengths bend by slightly different amounts, white sunlight spreads into colours.
The sequence inside a raindrop can be summarised as:
  1. Sunlight enters the water droplet and refracts.
  2. Different colours bend by different amounts because of dispersion.
  3. Light reflects from the back inner surface of the droplet.
  4. Light refracts again as it leaves the droplet.
  5. The observer receives concentrated coloured light from droplets at suitable angles.

Why a Rainbow Is an Arc and Why Colours Appear in Order

A rainbow appears as an arc because the angle between incoming sunlight and the outgoing coloured light is fixed within a narrow range. For the primary rainbow, the brightest red light is seen near an angle of about 42° from the direction opposite the Sun, while violet appears slightly inside that arc near 40°. In reality, a rainbow is part of a circle centred on the antisolar point—the point directly opposite the Sun from the observer’s viewpoint. From the ground, the lower part is usually blocked by the horizon, creating an arc.
The colours of a primary rainbow appear in a predictable order because different wavelengths refract by different amounts inside water. Red light bends less than violet light. As a result, red appears on the outer edge of the primary rainbow, while violet appears on the inner edge.
ColourRelative WavelengthRelative Bending in WaterPosition in Primary Rainbow
RedLonger wavelengthBends lessOuter edge
YellowMedium-long wavelengthIntermediate bendingBetween red and green
GreenMedium wavelengthIntermediate bendingMiddle region
BlueShorter wavelengthBends moreInner region
VioletShortest visible wavelengthBends mostInner edge

Secondary Rainbows and Alexander’s Dark Band

Sometimes a fainter second rainbow appears outside the primary rainbow. This is called a secondary rainbow. It is caused by light reflecting twice inside water droplets before leaving. Because of the extra internal reflection, the colour order is reversed. In a secondary rainbow, red appears on the inner edge and violet appears on the outer edge. The secondary rainbow is also dimmer because more light is lost during the additional reflection. The dark region between the primary and secondary rainbows is called Alexander’s dark band. It appears darker because water droplets do not scatter light into this angular region.

Halos: Light Through Ice Crystals

A halo is an optical effect produced when sunlight or moonlight passes through ice crystals high in the atmosphere. These crystals are often found in thin cirrus or cirrostratus clouds. The most common halo is the 22° halo, a ring around the Sun or Moon. It forms because light is refracted through hexagonal ice crystals. The geometry of the crystals and the refractive index of ice concentrate light near certain angles. Unlike rainbows, which are produced by liquid water droplets, halos are usually linked to ice crystals. This is why halos often appear when high thin icy clouds are present, even when there is no rain nearby.

Common Halo Features

Halo FeatureAppearanceMain Cause
22° haloRing around the Sun or MoonRefraction through hexagonal ice crystals
Sun dogsBright spots to the left and right of the SunRefraction through oriented plate-like ice crystals
Light pillarVertical column of light above or below a sourceReflection from the flat faces of falling ice crystals
Circumzenithal arcBright upside-down rainbow arc high in the skyRefraction through horizontally aligned ice crystals
Lunar haloRing around the MoonMoonlight refracted by ice crystals
Halos can show colour because refraction in ice is slightly wavelength-dependent. However, many halos look pale or whitish because the colours overlap strongly and the light is often weak or spread over a large region. A 22° halo may show reddish colour on the inner edge and bluish colour on the outer edge, but the colours are usually less vivid than in a rainbow.

Mirages: Light Bending Through Air Layers

A mirage occurs when light travels through air layers with different temperatures. Because air density and refractive index depend on temperature, light bends gradually as it passes through these layers. A mirage is a real optical image caused by curved light paths through the atmosphere, not a hallucination.
Mirage TypeTemperature StructureCommon Appearance
Inferior mirageHot air near ground, cooler air aloftImage appears below the real object, often looking like water on a road
Superior mirageCold air near surface, warmer air aloftDistant objects may appear lifted, stretched, or floating above the horizon
Fata MorganaComplex, alternating temperature layersHighly distorted, stacked, and rapidly changing distant images
On a hot day, a road heats the air just above it. Light from the bright sky bends through this temperature gradient and reaches the observer from a direction close to the ground. The brain interprets this light as if it came from a reflection on a surface, similar to water. That is why a distant road may appear wet even when it is dry. As you move closer, the apparent “water” seems to recede because the optical geometry changes.

Case Studies: Atmospheric Optical Effects in Action

Case Study 1: A Primary Rainbow After Rain

After a rain shower, the Sun emerges behind the observer while droplets remain in the air ahead. Sunlight enters the droplets, refracts, reflects internally, disperses into colours, and reaches the observer as a coloured arc. This case study shows how a familiar rainbow depends on both optical physics and viewing geometry. Without the right Sun-observer-droplet arrangement, the rainbow would not appear.

Case Study 2: A Double Rainbow

A double rainbow forms when some light reflects twice inside water droplets. The secondary rainbow appears outside the primary one and has a reversed colour order. It is fainter because the extra internal reflection reduces the light intensity. This case study helps students connect light path diagrams with real sky observations.

Case Study 3: A Halo Around the Moon

On a cold night with high thin ice-crystal clouds, moonlight can refract through ice crystals and form a pale ring around the Moon. The effect is similar in principle to a solar halo, but dimmer because moonlight is much weaker than sunlight. This case study shows that atmospheric optics can occur at night as well as during the day.

Case Study 4: Sun Dogs Beside the Sun

Sun dogs appear as bright spots on either side of the Sun, often when plate-like ice crystals are drifting flat in the atmosphere. The crystals refract sunlight in preferred directions, producing concentrated bright regions. This case study shows how crystal shape and orientation can affect the pattern seen by the observer.

Case Study 5: A Mirage on a Hot Road

On a hot afternoon, a distant road may appear to shimmer or look wet. Light from the sky bends through the hot air near the ground and reaches the observer from a low direction. The brain interprets this as a reflection from the road surface. This case study shows that mirages are caused by real refraction, not imagination.

Applications in Atmospheric and Environmental Optics

Rainbows, halos, and mirages are not only beautiful sky effects. They help students understand how light reveals atmospheric structure, particle type, temperature gradients, and environmental conditions.

Weather Observation

Halos can indicate high ice-crystal clouds often preceding warm fronts, while mirages reveal strong temperature gradients near surfaces.

Environmental Interpretation

Sky colour, haze, rainbows, and halos help observers infer humidity, aerosols, droplets, ice crystals, and atmospheric layering.

Photography and Visual Design

Understanding atmospheric optics helps photographers anticipate rainbow positions, halo appearances, glare, contrast, and mirage effects.

Remote Sensing Corrections

Atmospheric refraction and gradient bending must be considered when interpreting optical measurements from satellites, aircraft, and ground instruments.

Navigation and Observation

Mirages can distort the apparent position of distant objects, especially near horizons, deserts, roads, oceans, and polar regions.

Science Education

These phenomena give students memorable examples of refraction, reflection, dispersion, scattering, and observer-dependent geometry.


Connections with Wider Physics

Rainbows, halos, and mirages connect atmospheric observation with several major areas of optics and physics.

Geometrical Optics

Ray tracing maps out the exact geometric pathways sunlight takes as it interacts with raindrops, ice prisms, and layered thermal boundaries.

Wave Optics

Wave properties like wavelength and dispersion explain why white light separates into distinct, predictable colour sequences in the sky.

Electromagnetic Waves

Visible sunlight is a narrow band within the wider electromagnetic spectrum, demonstrating how waves travel and transform through natural media.

Ray Tracing Paths

Analyzing light as individual straight lines provides a practical, clear method to calculate angular deflection in droplets and crystals.

Environmental Engineering

Atmospheric optical properties provide critical data regarding visibility, atmospheric density, and moisture distribution metrics.


Review Questions and Answers

Review Questions: Atmospheric Phenomena

1. What causes a rainbow?
A rainbow is caused by sunlight refracting, reflecting internally, and dispersing inside water droplets suspended in the atmosphere.
2. Why is red on the outside of a primary rainbow?
Red light has a longer wavelength and bends less than shorter-wavelength colours like violet during the entry and exit refraction steps, placing it on the outer edge of the arc.
3. Why is a secondary rainbow fainter than a primary rainbow?
A secondary rainbow involves two internal reflections inside the water droplet rather than one. Energy is lost at each reflection boundary, making the resulting arc dimmer.
4. What causes a halo around the Sun or Moon?
A halo is caused by sunlight or moonlight refracting and reflecting through hexagonal ice crystals suspended in high-altitude cirrus clouds.
5. What is a sun dog?
A sun dog is a bright spot that appears on either side of the Sun, caused by refraction through flat, plate-like hexagonal ice crystals drifting horizontally.
6. What causes a mirage?
A mirage is caused by light bending gradually along a curved path as it travels through layers of air with distinct temperature and density gradients.
7. Why does a hot road sometimes look wet?
The intense heat near the pavement creates low-density air. Light from the bright sky bends upward toward the observer’s eye, which the brain interprets as a reflection from water.
8. How are rainbows, halos, and mirages different based on medium?
Rainbows require liquid water droplets, halos depend on solid crystalline ice structures, and mirages occur entirely within non-uniform air layers.

Thought-Provoking Questions and Answers

Thinking More Deeply About Atmospheric Geometrical Optics

1. Why is a rainbow different for different observers?
A rainbow is defined by angular directions relative to the observer’s eye and the Sun. When you move, your antisolar reference point shifts, meaning you receive light from entirely different sets of raindrops.
2. Why does atmospheric optics show that the observer is part of the optical system?
Phenomena like rainbows and mirages do not exist as physical objects at fixed spatial coordinates. They are line-of-sight angular projections that require the observer’s eye to serve as the geometric focus.
3. Why are halos useful clues about the upper atmosphere?
The appearance of a halo confirms that the upper troposphere contains freezing conditions and hexagonal ice structures, signaling high moisture levels that often precede an approaching low-pressure weather system.
4. How does a mirage show that light does not always travel in a perfectly straight line?
In a uniform medium, light paths are linear. However, when the medium features a continuous gradient in density and refractive index, Fermat’s principle dictates that light curves continuously to minimize travel time.
5. Why do mirages rarely show separate rainbow-like color bands?
The dispersion of air is extremely small compared to water or ice. While air density variations bend light significantly over long paths, the difference in bending between red and blue wavelengths is too small to see with the naked eye.

Numerical Practice: Optical Paths and Angles

Numerical Problems and Solutions

1. A primary rainbow is seen at approximately 42° from the antisolar direction. If the antisolar point is directly opposite the Sun, what is the approximate angular radius of the rainbow?
The angular radius tracks the angle from the central antisolar axis out to the brightest red ring segment. For a conventional primary rainbow, this geometric angle matches the minimum deviation coordinate.
Answer: The angular radius is approximately 42°.
2. A common solar halo has an angular radius of 22°. What is the complete angular diameter of the halo ring?
The diameter equals twice the radius value across the central solar core:
$$\text{Angular Diameter} = 2 \times 22^\circ = 44^\circ$$
Answer: The angular diameter is approximately 44°.
3. Red light in a primary rainbow is seen near 42°, while violet light concentrates near 40°. What is the angular width of the primary rainbow band?
Subtract the inner violet angular boundary from the outer red coordinate:
$$\text{Angular Separation} = 42^\circ – 40^\circ = 2^\circ$$
Answer: The approximate angular width of the colored band is 2°.
4. A light ray enters a spherical raindrop from air at an angle of incidence of 40°. Calculate the angle of refraction inside the water droplet using Snell’s law (n_air = 1.00, n_water = 1.33).
Apply Snell’s law: $n_1 \sin\theta_1 = n_2 \sin\theta_2$
$$\sin\theta_2 = \frac{1.00 \times \sin(40^\circ)}{1.33}$$
Knowing that sin(40°) ≈ 0.6428:
$$\sin\theta_2 = \frac{0.6428}{1.33} \approx 0.4833 \Rightarrow \theta_2 = \sin^{-1}(0.4833) \approx 28.9^\circ$$
Answer: The angle of refraction inside the water droplet is approximately 29°.
5. The refractive index of air near the asphalt changes from 1.00029 down to 1.00025 due to road heating. Does starlight passing down through this gradient curve toward the hot surface or bend back upward toward cooler air?
According to Snell’s law and Fermat’s principle, light rays traveling through a variable medium bend continuously toward the region with a higher refractive index (optically denser medium). Cooler air has a higher density and a higher refractive index than hot air.
Answer: The ray curves away from the hot road surface, bending back upward toward the denser, cooler air layers.
6. A full circular rainbow arc mapped from a plane spans a diameter of 84° across the sky from edge to edge. Confirm its geometric angular radius.
Divide the total angular diameter by two:
$$\text{Angular Radius} = \frac{84^\circ}{2} = 42^\circ$$
Answer: The angular radius confirms a value of 42°.

Key Terms

Refraction
The bending of light when it enters a different medium or passes through a region where refractive index changes.
Reflection
The change in direction of light when it meets a surface or boundary.
Internal reflection
Reflection that occurs inside a transparent material, such as inside a water droplet.
Dispersion
The separation of light into colours because different wavelengths travel at different speeds through a medium and bend by different amounts.
Rainbow
A coloured arc produced when sunlight is refracted, internally reflected, and dispersed by water droplets.
Primary rainbow
The main rainbow formed by one internal reflection inside water droplets, with red on the outer edge.
Secondary rainbow
A fainter rainbow formed by two internal reflections inside droplets, with reversed colour order.
Halo
An optical ring, arc, pillar, or bright region caused by light interacting with ice crystals in the atmosphere.
Sun dog
A bright spot beside the Sun caused by refraction through hexagonal ice crystals.
Mirage
A displaced or distorted optical image caused by light bending through air layers of different temperatures.
Inferior mirage
A mirage in which the image appears below the real object, often seen above hot roads or deserts.
Superior mirage
A mirage in which distant objects may appear raised, stretched, or distorted due to temperature inversion.
Temperature gradient
A gradual change in temperature with height or distance, causing changes in air density and refractive index.
Antisolar point
The point in the sky directly opposite the Sun from the observer’s viewpoint, around which a rainbow is centred.

External References for Further Reading

The following references provide useful background on rainbows, halos, mirages, and atmospheric optics.
  1. US National Weather Service: Rainbows — A student-friendly explanation of how sunlight and raindrops create rainbows.
  2. US National Weather Service: Halos, Sun Dogs, and Light Pillars — A practical explanation of optical effects caused by ice crystals.
  3. US National Weather Service: Atmospheric Optics — A visual guide to several atmospheric optical phenomena.
  4. Met Office: Mirages — A clear explanation of how temperature gradients in air create mirage effects.

Why This Topic Matters

Rainbows, halos, and mirages matter because they turn the sky into a physics classroom. They show how light bends, reflects, disperses, and travels through natural materials such as water droplets, ice crystals, and temperature-layered air. For students, these phenomena build a bridge between everyday observation and scientific modelling. A rainbow teaches refraction and dispersion. A halo teaches crystal optics. A mirage teaches refractive-index gradients and curved ray paths. The deeper lesson is that the atmosphere is not just something light passes through. It is an optical medium that shapes what we see, how we interpret distance, and how we measure the environment.

Summary

Rainbows form when sunlight is refracted, internally reflected, and dispersed by water droplets. Primary rainbows have red on the outside and violet on the inside, while secondary rainbows are fainter and have reversed colour order. Halos form when sunlight or moonlight interacts with ice crystals in high clouds. Common halo effects include 22° halos, sun dogs, light pillars, and lunar halos. Mirages form when light bends through air layers with different temperatures and refractive indices. They are real optical effects, not imaginary visions. Together, rainbows, halos, and mirages show how atmospheric conditions shape the path of light.

Reflection Question

If rainbows, halos, and mirages all depend on the path light takes through the atmosphere, how might careful observation of the sky help us understand invisible atmospheric conditions?
Last updated: 12 Jul 2026