what are the function of light rays
Lenses serve to refract light at each boundary. As a ray of light enters a lens, it is refracted; and as the same ray of light exits the lens, it is refracted again. The net effect of the refraction of light at these two boundaries is that the light ray has changed directions.