Fermat postulated that rays of light follow the path that takes the least
time. This is a very profound idea! There is something very deep in it. It
also gives the experimentally observed results! Lets apply it to reflection
and see what results:
We want to find the length (which is the same as time times the speed) AEB. To
do this we construct a fake point B' which is on the other side of the surface
the same perpendicular distance from the surface such that the line BB' is a
perpendicular to the surface. Then clearly the length AEB equals the length
AEB'. So which point on the surface gives the shortest path to B, the one that
gives the shortest path to B' and that clearly lies on the straight line AB'.
I have labeled this point C.
Now clearly
θ
r
=
θ
r
′
θ
r
=
θ
r
′
and also
θ
r
′
=
θ
i
θ
r
′
=
θ
i
so we get
θ
r
=
θ
i
θ
r
=
θ
i
Now lets apply Fermat's principle to refraction. Look at the next
figure:
We want the shortest time from A to B. Clearly that is
t
=
h
2
+
x
2
v
i
+
b
2
+
(
a
−
x
)
2
v
t
t
=
h
2
+
x
2
v
i
+
b
2
+
(
a
−
x
)
2
v
t
To find the minimum we want to solve for
x
x
such that
ⅆ
t
ⅆ
x
=
0
ⅆ
t
ⅆ
x
=
0
Thus
ⅆ
t
ⅆ
x
=
x
v
i
h
2
+
x
2
+
−
(
a
−
x
)
v
t
b
2
+
(
a
−
x
)
2
=
0
ⅆ
t
ⅆ
x
=
x
v
i
h
2
+
x
2
+
−
(
a
−
x
)
v
t
b
2
+
(
a
−
x
)
2
=
0
which
is obviously
sin
θ
i
v
i
=
sin
θ
t
v
t
sin
θ
i
v
i
=
sin
θ
t
v
t
or
Snell's law
n
t
sin
θ
t
=
n
i
sin
θ
i
n
t
sin
θ
t
=
n
i
sin
θ
i
If light travels via many different media then the time is
t
=
d
1
v
1
+
d
2
v
2
+
d
3
v
3
+
⋯
+
d
m
v
m
+
t
=
d
1
v
1
+
d
2
v
2
+
d
3
v
3
+
⋯
+
d
m
v
m
+
or
we can rewrite this as
t
=
1
c
∑
i
=
1
m
n
i
d
i
t
=
1
c
∑
i
=
1
m
n
i
d
i
The
quantity
∑
i
=
1
m
n
i
d
i
∑
i
=
1
m
n
i
d
i
is the optical path length
(
O
P
L
)
(
O
P
L
)
.
For a continuously varying medium then the summation becomes (for light
traveling from
S
S
to
P
P
)
O
P
L
=
∫
S
P
n
(
s
)
ⅆ
s
O
P
L
=
∫
S
P
n
(
s
)
ⅆ
s
Fermat's
principle could be restated that we minimize the
O
P
L
O
P
L
In fact this is inadequate, for example one can construct an example where the
optical path length is not the minimum.(See for example figure 4.37 in the
book "Optics" by Hecht (Fourth Edition).The correct statement of Fermat's
principle is that there is a stationary point in the optical path length. (Ie.
its derivative is zero).