Imagine a ray of light being reflected by a mirror. The law of reflection says that the angle between the incoming ray and the mirror is equal to the angle between the reflected ray and the mirror.

To see what exactly this means, let’s think about this set-up in two dimensions – it’s alright to do this since the incoming ray and the reflected ray determine a plane, and in order to understand how the reflection works we only need to consider that plane. The mirror is now represented by a straight line segment, and so are the incoming and reflected rays of light. Let’s write \(P\) for the point at which the ray meets the mirror. See the image below. The angle \(\alpha\) is called the angle of incidence and the angle \(\beta\) is called the angle of reflection. The law of reflection says that \(\alpha=\beta.\)

A line from A to point P at angle alpha to the normal, and a line from P to B at angle beta to the normal

Note that \(\alpha\) and \(\beta\) are the angles between the ray segments and the line that is perpendicular to the mirror, which is called the normal at \(P\). This is just a convention. We could equally well have phrased the law in terms of the angles at which the rays meet the mirror, as these are just \(90-\alpha\) and \(90 - \beta\) respectively.

How do we know that light always behaves in this way when it is being reflected? We can actually prove that it does if we assume that light always takes the path of shortest distance (via the mirror) when travelling between two points. (It’s a reasonable assumption: when you shine a torch at night, the beam will always be a straight line as long as there is no obstacle to reflect or refract it in the way.) Let’s write \(A\) for the point at which the incoming light ray starts and \(B\) for the point at which we observe the reflected ray.

By playing with the animation below convince yourself that the distance from \(A\) to \(B\) via the point \(P\) (since we are reflecting) is shortest when the angles \(\alpha\) and \(\beta\) are equal. Move the slider to vary the position of \(P\) and thereby the size of the angles.

Since light travels at constant speed (it doesn’t speed up or slow down), assuming that it travels along the path of shortest distance (via the mirror) is equivalent to assuming it travels along the path that takes the shortest time. This idea is known as Fermat’s principle, after the 17th century mathematician Pierre de Fermat (although others had come up with the principle before him). It’s an example of a principle of least action: the assumption that, when faced with a choice, nature always chooses the option that involves the least effort. For another method of approaching this optimisation problem, see Calculus of variations.

We can derive the law of reflection from Fermat’s principle mathematically, using a little calculus. In the diagram below we have written \(d\) for the horizontal distance between \(A\) and \(B\) and \(x\) for the horizontal distance between \(A\) and the normal. The horizontal distance between \(B\) and the normal is therefore \(d-x\). The vertical distances from \(A\) and \(B\) to the mirror are \(a\) and \(b\) respectively.

line from A to P, and another from P to B, with distances described as above

What is the distance \(AP\)?

Pythagoras’ theorem tells us that the distance from \(A\) to \(P\) is \[\sqrt{x^2+a^2}\]

What is the distance \(BP\)?

Using Pythagoras again, the distance from \(B\) to \(P\) is \[\sqrt{(d-x)^2+b^2}.\]

What is the total distance travelled by the ray?

The total distance travelled by the ray before and after reflection is \(AP + BP\), which is

\[L(x) = \sqrt{x^2+a^2} + \sqrt{(d-x)^2+b^2}.\]

We write this distance as \(L(x)\) because it depends on the length \(x\), which in turn depends on the angle \(\alpha\).

What value of \(x\) minimises the function \(L(x)\) (makes it the shortest)?

We can do this by differentiating with respect to \(x\) and setting the derivative to zero:

\[\frac{DL}{dx} = \frac{1}{2}\frac{2x}{\sqrt{x^2+a^2}} - \frac{1}{2}\frac{2(d-x)}{\sqrt{(d-x)^2+b^2}}=0.\]

Bringing the second term over to the right and simplifying the fractions gives

\[\frac{x}{\sqrt{x^2+a^2}} = \frac{d-x}{\sqrt{(d-x)^2+b^2}}.\]

But

\[\frac{x}{\sqrt{x^2+a^2}} = \sin{\alpha}\] and

\[\frac{d-x}{\sqrt{(d-x)^2+b^2}} = \sin{\beta}\]

so we have \[\sin{\alpha} = \sin{\beta}.\]

Since both \(\alpha\) and \(\beta\) are less than \(90^\circ\) this implies that \(\alpha=\beta\). We deduce that since the derivative of \(L(x)\) is \(0\) when \(\alpha=\beta,\) the function \(L(x)\) has either a minimum, a maximum or a turning point at the corresponding point \(x\). By sketching the graph of \(L(x)\), we can see that it indeed has a minimum – which proves that the law of reflection follows from Fermat’s theorem.

the function L of x, as found above