Consider a plane wavefront AB incident on a plane surface XY, separating two media 1 and 2. Medium 1 ∞ rarer & 2 is denser medium. v1&v2 be the velocity of light in medium 1 and medium 2 respectively. v2> v1

The wave front first strikes at A and then the successive points towards C. according to Huygen’s principle from each point of AC, the secondary wavelets will start growing in the second medium with speed v2. Let the disturbance take time t to travel from B to C, then BC=v1t. During the time, the disturbance from B reaches the point C, the secondary wavelets from point A must have spread over a hemi-sphere of radius AD=v2t in the second medium.
The tangent plane CD drawn from point C over this hemisphere of radius v2t will be the new refracted wave front
Let the angles of incidence and refraction be i and r respectively,
From right angle triangle, ∆ABC, we get

This constant is called the refractive index of the second medium with respect to I.