When light meets a smooth surface it reflects with a strict symmetry: the angle of incidence equals the angle of reflection, both measured from the normal, the line at right angles to the surface. That one rule builds every mirror image, including the puzzle that a mirror seems to swap left and right when it actually swaps front and back: your reflection's raised hand is the one on the same side as yours, interpreted by your brain as a person facing you. Rough surfaces reflect too, scattering the rays in all directions, which is why paper is visible from every angle while a mirror shows an image only from the right one. Specular reflection from smooth surfaces and diffuse reflection from rough ones are the same law applied ray by ray to surfaces of different tidiness.
Cross into a material where light travels at a different speed and the ray bends, because one side of the wavefront changes speed before the other, swinging the whole front around like a marching band wheeling at a kerb. Snell's law gives the exact trade: n1 sin theta1 equals n2 sin theta2, where n, the refractive index, measures how much the material slows light compared with vacuum. Air sits at almost exactly 1, water at 1.33, common glass near 1.5, diamond at 2.42, which is why diamond traps and throws light so dramatically. Entering a denser material bends the ray toward the normal; leaving bends it away. The Snell's law calculator on this site finds the refracted angle from the two indices and the incoming angle, and the effect explains the bent straw in a glass, the shallow looking pool, and the rainbow's geometry.
Leaving a dense material for a thinner one, the ray bends away from the normal, and at one specific incoming angle, the critical angle, the refracted ray would run exactly along the surface. Beyond that angle there is no refracted ray at all: the light reflects completely inside the material, total internal reflection. For glass to air the critical angle is about 42 degrees. Optical fibres are built on this: light injected into a glass fibre at a shallow angle reflects from wall to wall without escaping, carrying signals for kilometres, around corners, through endoscopes into the body and across oceans as the backbone of the internet. Gem cutters exploit the same cage, cutting facets so light entering a diamond bounces internally and exits through the top in flashes. A bending rule and a limiting angle, and between them most of optical technology.
Light bends when it crosses into a material where it travels at a different speed. Enter the two refractive indices and the incoming angle to find the refracted angle.
Open the calculator