You might have heard people talk about Einstein’s speed of light, and that it’s always the same. The part that most people leave out is that this is only true in a vacuum—when there’s no pesky molecules of air or water to slow it down. But when light moves through a more familiar medium like air, it moves more slowly due to the interactions of individual photons with the molecules in the material. In general, the more optically dense the medium, the slower the light will move. So what happens to the light when it goes from one medium to another?
Light changes speed
Imagine that you and your friends are at the beach. You all decide to swim together, so you link arms and approach the water as a straight line. As you start walking into the water, you all slow down, because it’s harder to walk through water than through air. So imagine that you approach the water at an angle relative to the shoreline. The person on the end will meet the water and slow down first, then the next person in line, then the next, until everyone is walking through the water. Because one end of the line slowed down before the other end, the line of people becomes crooked, with the people who are still on the beach at a different angle relative to the water’s edge than the people who have already entered the ocean.
You can say that the water bends the path of of each individual toward a normal line drawn perpendicularly to the shoreline, since the people still on the shore are bent further away from the shoreline than those in the water.
The same thing happens to a light ray when it moves from air to water, or from any fast medium to a slow medium: it bends toward the normal.
Least time principle
Another way to think of this is to imagine you and your friend are racing out to a raft in the middle of a lake. You have to travel across a beach and then through the water.
Your friend decides to make a beeline for the raft and runs down the beach. You know that you can run faster than you can swim, so you head toward the water at an angle so that you run for longer than you will swim.
Sure enough, your strategy pays off, and you get to the raft first. Your friend took the shortest path in terms of distance, but you took into account the difference in speed in each medium, and took the shortest path in terms of time. That means you took the path of least time.
Light does exactly that when moving between mediums. It takes the path that will take the shortest amount of time, when you account for the difference in speed between the mediums.
For example, imagine you are looking out the window. You have air, glass, and then air again. Glass is denser than air, so the light from outside passes from a fast medium, through a slow medium and into a fast medium again. The light will take the path from outside to your eye that spends the least time
You can also see that the rule from earlier still applies: when the light enters the glass the ray is bent towards the normal. When it leaves the glass, it is bent away from the normal, and regains the same angle as before it entered the glass.
Consider the following
Say you’re at the aquarium, and there’s a tank that’s totally full of water, so there’s glass over the top and sides. If you stand back a little, you can see the same stingray through the top of the tank and the wall of the tank.
Because you see the light coming through the glass at two different points, you see two images of the same stingray.