Fermat’s Principle of Least Time Made Easy

Adam Shaari
4 min readDec 1, 2020


This is the easiest way to understand the principle. Just to understand the concept and a little math.

Fermat’s Principle of Least Time, just like the name suggests, explains how light travels in a path that takes the least amount of time. Let’s have a look at Figure 1 below to understand more about this.

Figure 1

This is a simple concept for everyone to understand. Light travels from point A in a straight line and reaches the glass block at point B, bends towards the normal line to the glass surface, then light reaches point C, bends away from normal line as it exits the glass towards point D.

The angle of refraction is related to the angle of incident by the equation below.

n1/n2 = (sin α2)/(sin α1)

α1 is the angle of incident, n1 is the refractive index of the first medium (in this case, the air), α2 is the angle of refraction, n2 is the refractive index of the second medium (in this case, the glass block).

Fermat’s principle of least time explains that the path taken by the light is the path that will result in the least amount of time. But why didn’t the light travel in a straight line from point A, to point E, then to point C?

Refraction of Light — Situation

To understand more about this, we will consider these situations.

Figure 2

Based on Figure 2, you are walking by a pool. You are at point K when you see someone drowning at point M. What is the fastest way to go and save that person? You are a good swimmer but there is no way your running speed is faster than your swimming speed. Hence, you should not take the path of a straight line from K to M. You can run all the way to point N and then start swimming from there, but that will be more time consuming provided you are a good swimmer. So, you run to point L and swim from there, now that you have reduced the distance that you have to travel in the water and on land to the optimum. Yes, it is the path that takes the least amount of time.

Figure 3

The second situation is based on Figure 3, you are walking by a swamp with very thick mud. You are at point P when you see a person stuck in that swamp at point R. You can help get that person but you cannot swim in the swamp as it is full of mud. However, you can slowly walk across the swamp. Which path would you take? Path PQR, which is a straight line from you to that person, or path PSR, the path with a minimum distance that you have to travel in the swamp.

Notice that the harder it is for you to move in one particular area, the shorter the distance you choose to travel in that area.

Refraction of Light

The higher the value of the refractive index of a medium, the smaller the angle of refraction. This is the same as the situation of refraction of light. Light moves from air to a medium of higher refractive index, a glass. Light moves slower in a glass. Same as, you move slower in water. Even slower in the mud. So, light takes the path with the least amount of time.

Reflection of Light — Situation

Figure 4

Next situation is based on Figure 4. You are sprinting from point Y to point Z. But your hand has to touch ANY point on the wall before finishing your sprint.

You can take the Blue Path to run from point Y to touch the wall first, then start running to point Z, or take the Green Path to run diagonally to the center of the wall and then to point Z. Let’s do some math here. What will be the total distance traveled if you take the Blue Path?

Blue Path = 20m + √(20 +100)

Blue Path = 121.98m

Now, what will be the total distance traveled if u take the Green Path?

Green Path = 2 x (50 + 50)

Green Path = 107.7m

The Green Path is objectively the path that takes the least amount of time. Like in a situation of reflection of light.

Figure 5

Based on Figure 5, you are standing at point T and your friend is standing at point U. The way light travels from point T to the mirror, to point U is by reflecting at a point on the mirror halfway the distance between T and U. Because light travels in a path that takes the least amount of time. And of course, you see your friend in the mirror standing at point V.

Of course, the real math and philosophy behind it are more interesting than this. But, you get the gist of it.



Adam Shaari

Physicist | Optics Engineer | Front-end Developer | Writer