In Euclidean geometry, a ray, or half-line, given two distinct points A (the origin) and B on the ray, is set of points C on the line containing points A and B such that A is not strictly between C and B.
In most simple cases, light rays within a given medium are straight lines. Light passing from one medium to another undergoes refraction or total internal reflection following Snell's law.