why ray of light bend towards normal when moving from rarer to denser medium and not away from normal
when light travels from rarer to denser medium , the one which travels at an angle will slow down its velocity and changes its direction . The wave which is coming at perpendicular direction to the plane normal , changes its velocity but not direction. Now , we know λ (= v/f) , as speed slows down then λ will become small if frequency has to be kept constant as shown in Fig. 1 . Additionally, All the wave fronts are not reaching at same time to the boundary because they are coming at an angle . the one which reaches first will slow down its speed first i.e decreases its wavelength and at the same time others will travel with their own regular velocity. And when will slow down their velocity when reaches to boundary. As the incoming wave has the same wavelength through out . suddenly it changes at the boundary , in order to maintain same frequency it has to change its direction. so light bends. Now the rays which is travelling at perpendicular direction to the boundary has all the wave fronts reaching at same time, so they will only slows down their velocity but will not bend.
from above it is clear that why light bends when it passes from rarer to denser medium.