Solution:
Its velocity and wavelength decrease when light travels from a rarer to a denser medium.A denser medium will have a refractive index greater than a rarer medium. Thus, according to the law of refraction, speed will decrease while travelling from a rarer to a denser medium, and according to the relation
Where is the refractive index, is the speed of light in a vacuum, and is the speed of light in the new medium.
We can see that and are inversely proportional, which means that the higher the , the lower the velocity. So, for example, if the light moved from the air to glass , the increased, and thus the velocity must decrease because the speed of light in a vacuum is constant.