The optical path between any two points is proportional to the time of travel.
The distance traversed by light in a medium of refractive index μ in time t is given by d=vt .......(i)
Where v is velocity of light in the medium. The distance traversed by light in a vacuum in this time,
s=ct
=c×vd [from equation (i)]
=dvc=μd .....(ii) (Sinceμ=vc)
This distance is the equivalent distance in vacuum and is called optical path.
Here, optical path for first ray =n1L1
Optical path for second ray =n2L2
Path difference =n1L1−n2L2
Now, phase difference =λ2π×path difference
=λ2π×(n1L1−n2L2)