A ray of light when refracted suffers change in velocity. In this cont

A ray of light when refracted suffers change in velocity. In this context, which one among the following statements is correct ?

Velocity increases as the ray passes from a rarer to a denser medium
Velocity decreases as the ray passes from a denser to a rarer medium
Velocity decreases as the ray passes from a rarer to a denser medium
Change of velocity does not depend on the nature of medium
This question was previously asked in
UPSC NDA-1 – 2015
When a ray of light passes from a rarer medium (like air) to a denser medium (like glass or water), its speed decreases. This change in speed is related to the refractive index of the medium; a denser medium has a higher refractive index, causing light to slow down. Conversely, when light passes from a denser medium to a rarer medium, its speed increases.
Understanding how the speed of light changes when it undergoes refraction from one medium to another.
The relationship between the speed of light ($v$), the speed of light in vacuum ($c$), and the refractive index ($n$) of a medium is given by $v = c/n$. A denser medium has a higher refractive index ($n$), resulting in a lower speed of light ($v$). A rarer medium has a lower refractive index, resulting in a higher speed of light.