When light refracts in a prism it creates a rainbow. My question is, why don’t all windows or transparent objects create this dispersion, i.e. why is the refractive index dependent on frequency in a dispersive prism, and not in a window? (My guess is that the refractive index doesn’t change as much, but I don’t really have an idea).

  • 1
    $\begingroup$ Some thick windows used for large shop displays have beveled edges, and you can sometime see a spectrum off of those. $\endgroup$ Jun 2, 2019 at 19:07
  • 1
    $\begingroup$ Even without beveled edges, you can sometimes see a thin red or blue stripe at the edges. @BarsMonster's answer explains why. $\endgroup$
    – MSalters
    Jun 3, 2019 at 8:20

3 Answers 3


It does create the rainbow, but it is almost impossible to notice.

When light direction is changed on the glass-air interface - there is always a dispersion : light with different wavelength will refract at different angle and thus create rainbow.

The issue is that when light hits second glass-air interface - incidence angle is opposite, and dispersion almost perfectly compensate, and this recombine light into white beam. In this recombined beam there is no angular difference for different colors, just slight lateral mismatch - so you can barely see rainbow at the sharp edges of light beam - but colors do not diverge anymore.

You can still notice rainbow if you take very thick glass (~50mm), and very narrow and perfectly collimated beam (<0.05mm). Here you can see simulation with exaggerated dispersion:

Flat dispersion

In a prism, where incidence angles for first and second refractions are very different - this compensation is not working and one can see the rainbow much easier, as there is now angular difference between different colors.

Prism dispersion

  • $\begingroup$ Over the weekend I noticed the effect through a similar setup to "very thick glass , and very narrow beam". It was a swimming pool. I was looking at the white lines between the blue tiles through 3ft of water in sunlight. The white lines clearly produced a rainbow. You will be also able to reproduce this with a similar setup, of course with glass instead of water. $\endgroup$ Jun 3, 2019 at 5:51
  • 3
    $\begingroup$ @sampathsris It is different in pool, because you have just the first air-water interface - there is no air at the bottom again, so there is no compensation as in a slab of glass. $\endgroup$ Jun 3, 2019 at 7:44
  • 3
    $\begingroup$ ...also the reason why plate glass doesn't need "compensation" while eg camera lenses need a lot of complicated optical measures NOT to produce chromatic aberration (rainbows). $\endgroup$ Jun 3, 2019 at 10:33
  • 2
    $\begingroup$ @rackandboneman Not only cameras. You should see what they did with refraction telescopes back in the day. Some of them got ridiculously long before they realized it might be a good idea to use mirrors instead. $\endgroup$
    – Arthur
    Jun 3, 2019 at 12:21
  • 3
    $\begingroup$ There's also the fact that of the millions of rays coming from a parallel source - the "v's and r's" will mix again - resulting in white light in every spot other than the very most edges $\endgroup$
    – UKMonkey
    Jun 3, 2019 at 12:44

The glass panes in a window don't actually deflect light based on their refractive index (at least not to a reasonable approximation).

Refraction in block of glass

The image shows that if you shine a ray at a perfect rectangle, the light comes out parallel to the incident ray. Thus you don't get dispersion, because there is no net deflection being caused. (For clarity: there deflection at each plane, it just cancels. This deflection is different for each wavelength, so there is a tiny translational shift due to wavelength. But no angular deflection as in a prism.)

Of course, windows don't have perfectly parallel sides, and if you extended them far enough they'd eventually meet. As such, a window looks like a prism with a very small apex angle $A$.

  • $\begingroup$ As the other answers say, light does deflect inside the glass depending on the color. $\endgroup$
    – FGSUZ
    Jun 5, 2019 at 20:20
  • $\begingroup$ @FGSUZ I didn't say otherwise. The point is there are two $n$ dependent deflections that perfectly cancel. The net effect is a slight displacement, which won't cause a rainbow effect if the window is illuminated across its entire breadth. A prism in contrast causes an angular dispersion. $\endgroup$
    – jacob1729
    Jun 5, 2019 at 21:41

Combining BarsMonster's and jacob1729's answers, and UKMonkey's comment, when light hits the air-to-glass interface, difference frequencies of light are refracted at different angles, and there is then dispersion throughout the thickness of the thickness of the glass. If the sides of the glass are parallel, then the refraction at the glass-to-air interface on the other side will be opposite to the original refraction, and there will be no further dispersion; that is, there will be dispersion only within the thickness of the glass.

With a prism, on the other hand, the sides are not parallel but rather at opposite angles to the base. Because of this, the refraction at the glass-to-air interface reinforces, rather than cancels out, that of the air-to-glass interface. Thus, the dispersion continues after the light leaves the prism.

In addition, a prism is thicker but shorter than a window (generally). That is, there is a smaller cross section of light going through more glass. With more dispersion and smaller beam, the prism can separate the different colors into a spectrum. A window, on the other hand, has a large beam with small dispersion, and so the different colors overlap each other.

  • $\begingroup$ But what about lenses? Their sides are not parallel, yet they don’t create dispersion. $\endgroup$
    – Melvin
    Jun 3, 2019 at 15:41
  • 1
    $\begingroup$ @Melvin Where did you get the idea that lenses don't create dispersion? $\endgroup$ Jun 3, 2019 at 15:45
  • $\begingroup$ sorry, I mean that there’s not enough dispersion to notice (like how you don’t see rainbows in glasses) $\endgroup$
    – Melvin
    Jun 3, 2019 at 15:47
  • 9
    $\begingroup$ @Melvin the rainbow effect in lenses is often called chromatic aberration, and there are many techniques for minimizing it. $\endgroup$
    – barbecue
    Jun 3, 2019 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.