The inferior mirage forms when light rays passing through a relatively warm layer of air are bent upward from their path. But before we talk about the mirage itself, a brief physics lesson in optics. When light waves travel through one medium and into another, they are bent or refracted from their straight-line path to a degree that depends on the density difference between the two media. This can be simply demonstrated by placing a pencil in a glass of water and looking at it from the top or the side. Similarly refractions occur in the atmosphere when light passes through air layers of different densities.
Temperature decreases with height.
In the lower atmosphere the air density's greatest variations are caused by temperature changes, although changes in pressure and water vapour content also alter air density. Meteorologists call the changes of temperature with height the temperature gradient . Highway mirages are as common over dry pavement on sunny winter days as during the summer months. What causes the mirage illusion is that our mind initially interprets the light rays reaching our eyes as having come along a straight path, which in this example must have originated on the ground. A patch of blue sky mixed with some cloud is the most common vision in an inferior mirage.