# The Secret to Soap Bubbles&#039; Iridescent Rainbows

If you pay attention, you can see some pretty cool stuff that you might otherwise miss. Have you really looked at a soap bubble? Notice how you can see a bunch of different colors? What about that tiny drop of gasoline in a puddle at the gas station—see the rainbow of colors? Oh, there is that weird car too. It appears to have paint that changes colors. These optical effects are all classified as “thin film interference.” You need several physics ideas to really appreciate this optical phenomena—so, let’s get to it.

### Light Is a Wave

Everything we see is due to visible light, the very narrow spectrum of electromagnetic waves that our eyes can detect. Since it’s difficult to visualize the wave properties of light, however, let’s consider another wave—a wave on a string. Imagine a string on the ground. If I continually shake one end, I will create a repeating disturbance that travels down the length of the string. For this wave, there are three important properties: wave speed, wavelength, and frequency.

Rhett Allain

If you watched one of the disturbance peaks move along the string, the speed of this peak is the wave speed (v). The distance from one peak to the next is the wavelength (λ) and the rate that a peak passes a particular stationary point is the frequency (f). These three variables are not completely independent. The product of the wavelength and the frequency will give you the wave speed.

The speed of light is set at about 3 x 108 meters per second. If it’s visible light, it has a very tiny wavelength with a value between about 380 nanometers and 740 nanometers, where a nanometer is 10-9 meters. Yes, that is super small. Our human eyes interpret different wavelengths as different colors. A wavelength of 380 to 450 nm would appear violet and the longer wavelengths of 630 to 740 nm would be red.

### Interference of Waves

Let’s go back to the wave on a string. What happens when you have two different waves on the same string? Imagine that you make a single pulse on the string and it travels from left to right. At the same time, you make another wave pulse on the same string—but from the other side. These two pulses will move towards each other, but they don’t collide. When they meet, these two waves will simply add together to make a single bigger pulse. After that, they will just continue along and pass through each other.

Rhett Allain

When these waves combine to make a higher amplitude pulse, we call this constructive interference. What if one of the wave pulses is inverted? In that case, the two waves still add together—but in this case they will cancel (just for an instant).

Rhett Allain

This is called destructive interference. It doesn’t just happen with waves on a string—it also happens with light waves.

### Reflection and Transmission

What happens when light hits some type of transparent surface—like a glass window? Your first answer might be that the light travels through the glass. That is mostly true. However, when a wave (like light) goes from one material to another (like air to glass), some of the light is transmitted and some of the light is reflected.

You might think that’s crazy, but just think of the following situation. You are standing outside of a house on a bright sunny day. You try looking into the kitchen window, but guess what? You only see your reflection. You can’t see inside the house at all. That’s because the outside objects are very bright (from the sun), with their light reflecting off the window and into your eyes. Light from the inside of the house also travels through the glass, but your eyes can’t distinguish it because of the super bright reflection.

The same thing happens when light hits the surface of a soap bubble. Some of the light goes into the thin layer of soap and some of it is reflected. This is key to understanding the awesome colors you see in a soap bubble.

### Index of Refraction

If you wanted to skip a section, you could probably pass over this part. It has to do with the way light travels through different materials. That’s fine because it’s actually pretty complicated. Let me give you the simple version.

When a light wave interacts with matter (like the atoms in a soap bubble), the electric field part of the electromagnetic wave creates an oscillation in the atoms in the soap. These oscillating atoms (technically, just the electrons in the atoms) then create their own re-radiated electromagnetic waves. When you combine the original electromagnetic wave with the re-radiated wave, you get a single new wave. This new wave has an apparent wave speed that is slower than the original wave.

If you take the speed of light in a vacuum (we use the symbol c for this value) and then divide that by the new apparent speed of light in the material, you get a ratio. We call this ratio the “index of refraction.”

Rhett Allain

The n is the index of refraction. It’s typically a value greater than 1. A soap bubble might have an index of refraction between 1.2 and 1.4 (depending on its composition). Oh, we really don’t care about the speed of light in the soap. But since the wave speed is still related to the wavelength, we actually get a different wavelength in the material.

Rhett Allain

The wavelength of light in the material (λn) is the original wavelength (λ) divided by the index of refraction.

### Phase Shifts

One last idea before we get to the good stuff. Let me go back to the model of the wave on a string to explain phase shifts. Suppose the other end of the string is tied to a stick so that it can’t move. When a single wave pulse travels down the string and reaches this pole, it will reflect back. However, since the end is fixed the wave will reflect and be inverted. Like this.

Rhett Allain

This inverted wave pulse is a phase shift. If you took a repeating wave and shifted it over by half a wavelength, you would get the same effect. So we call this a half wavelength phase shift. But something different happens if you let the string be moveable at the point where it is attached to the pole. In that case, it’s not inverted.

Rhett Allain

When it comes to reflected light, you get a half wavelength phase shift if it reflects off a material with a higher index of refraction. If the material that the light reflects off has a lower index of refraction, you don’t get a phase shift.

### Thin Films

Now let’s put this all together. Imagine a beam of light that hits a very thin layer of soap. Some of the light reflects off the first surface and then some of the light reflects off the back surface. Here is a very rough diagram.

Rhett Allain

The key here is that the two reflected light waves travel different distances. If the light ray that goes through the soap and reflects off the back travels a total distance (there and back) of half a wavelength, then it will end up in phase with the other reflected light ray. These two reflected light rays will constructively interfere and make for a brighter reflection. With all of this, the conditions for a bright reflection depend on:

• The thickness of the soap film.
• The wavelength (color) of the light.
• The index of refraction of the film.
• The angle of incidence for the light.

Let me quickly explain the angle of incidence. If the light hits the film at a perpendicular angle, then the distance traveled in the film will be twice the thickness. However, if the light comes in at a lower angle, the light will go a greater distance inside the film. This means that the interference pattern will also depend on the angle at which the light strikes the film.

How about some examples? Here is a thin film of soap mounted vertically while exposed to white light. Remember that white light has all the colors of visible light.

Rhett Allain

Since this film is vertical, it gets thicker at the bottom of the frame. As the film thickness changes, different wavelengths of light achieve constructive interference. That’s why you see those nice bands of different colors. But what happens if you let the film settle for a longer time? It will continue to get thinner at the top. Here’s what that looks like.

Rhett Allain

Notice that the top of the frame is black. There is no wavelength of light that has constructive interference to be visible. This is because the soap film at the top is VERY thin. It’s so thin that there is no noticeable path length difference between the light reflected from the front and back of the soap film. However, there is still a phase shift from the reflection of the front part of the film—this makes the two reflected light waves out of phase such that they destructively interfere and cancel.

What happens if you illuminate the film with monochromatic light? Monochromatic means it’s just one color (and one wavelength) of light. This isn’t pure monochromatic light, but it’s pretty close since I’m using LEDs for the lights. In this composite image, I have different colors of light right next to each other—originally from different images.

Rhett Allain

Notice that with a single color, the interference is either black or the original color. For each wavelength, the dark bands repeat—but they repeat at different intervals for different colors. The red light has a larger wavelength. That means it requires the soap film to get much thicker in order to have an integer number of wavelengths for destructive interference.

Actually, you can also get thin film interference using air as the film. Take two very flat pieces of glass. In my case, I am using two microscope slides. Put one on top of the other. That’s pretty much it. The two glass plates will form a very small and thin gap of air. This gap will act essentially the same as the soap film. You can even change the thickness of the air by pushing on the plate with your finger.

Rhett Allain

That’s pretty cool. Oh, what about those cars with the color-changing paint? They actually don’t change colors. Instead, they have something that is very similar to a thin film—when viewed from different angles you get different colors of light that constructively interfere. This is the same reason that peacock feathers look so cool (and some other animals can do this too). Just keep your eyes open and you can find stuff like this in lots of different places.