Project 27: Fermat's principle Implies Snell's law

Previous project Next project

Snell's law from optics says that light traveling from point P to point Q reflects off a mirror so that the angle of incidence equals the angle of reflection. This is illustrated in Figure 27.1. The angle of incidence is i between the incoming ray of light and the normal to the mirror. The angle of reflection is r between the normal and the outgoing ray of light.


Figure 27.1: Snell's law, Angle of Incidence, i=r, Angle of Reflection

Fermat gave a more general variational principle governing the path of light. Fermat's principle says that light travels along the path that requires the least time. Among all paths reflected off a flat mirror, we can see geometrically that light will reflect at the point where the angle of incidence equals the angle of reflection. In other words, Fermat's principle implies Snell's law.

To show that Fermat's principle gives Snell's law, suppose light reflected at a different point S on the mirror. We will show that the time required for light to travel from P to Q through S is more than the time required to travel from P to Q through R, where i=r as shown in Figure 27.1.

Construct the point P' an equal distance below the mirror on a line normal to the mirror. Since the angles i and r are equal, the points P', R, and Q lie on a line. By similar triangles, the distance traveled by light going from P to R is the same as that traveled by light going from P' to R, so the distance traveled from P to R to Q is the length of P'Q.

The distance traveled by light going from P to S is the same as that traveled by light going from P' to S by similar triangles, so the distance traveled by light going from P to S and then to Q is the sum of the two lengths P'S plus SQ. Since these segments form the sides of a triangle with P'Q as a base, P'S+SQ>P'Q. In other words, P to R to Q is the shortest reflected path.


Figure 27.2: Proof of Snell's law for a Flat Mirror

Finally, light travels at constant speed c in air, so the shortest path is fastest and Fermat's principle says light must reflect at the point R that makes i=r. In other words, Fermat's principle implies Snell's law.

Before we move on to study reflection off curved mirrors, it is worthwhile to give a calculus proof of the shortest path. We need to formulate the problem analytically.

  • Fermat Snell by Calculus
    Place coordinates on Figure 27.1 above so that the mirror forms the x-axis. Put P at the point (a,b) and Q at (u,v).

    1) Use the Pythagorean theorem to show that the length of the line segment from (a,b) to the reflection point (x,0) is .

    2) Use the Pythagorean theorem to show that the length of the line segment from (x,0) to (u,v) is .

    3) Light travels at speed c, so the time required for light to go from (a,b) to (x,0) is the distance over c. Similarly, the time required to go from (x,0) to (u,v) is that distance over c. Show that the total time required for a ray of light to travel this path is

    4) Show that


    Figure 27.3: Coordinates for the Path of Light

    5) The angles of incidence and reflection at (x,0) are shown on Figure 27.4. Prove that

    5) Prove Snell's law, that the shortest reflected path makes i[x]=r[x]. Why is the critical point minimal?

    27.1 Reflection off a Curved Mirror

    Now we reflect light off a curved mirror. For simplicity, we assume that the mirror is in the shape of a graph y=f[x]. A light ray hitting the graph at (x,f[x]) is shown in Figure 27.5.


    Figure 27.4: Reflection off y=f[x]

    The length and the length (by the length formula or Pythagorean theorem), so the time required for light to pass along the path is


    To minimize t[x], we begin by computing critical points,


    so that critical points satisfy

    In order to easily interpret this formula, we need the fact that the cosine of the angle between two vectors


    is given by the simple formula


    Figure 27.5: The angle between and .

    You can study this formula in Chapter 15 of the text, or just use it now. Applying this formula to the angles between the tangent vector and each of the vectors from P to (x,f[x]), , and (x,f[x]) to Q, , gives the cosines of the angles,


  • Use these formulas to show that Fermat's least time principle implies Snell's law of equal angles of incidence and reflection for curved mirrors.

    27.2 Computation of Reflection Angles

    Now that we know Snell's law for curves, we can turn the reflection law around and ask for the direction of a ray that reflects off a curve when it is emitted from a given point. In other words, we assume that (a,b) is given and compute the position (u,v) as a function of x. Since we mostly want a direction, we may either take LQ=1 or change x by 1, u=x+1.

    In this problem, it helps to use the geometry as an intermediate step, even though our final calculations will all be based on slopes. The connection with geometry is that the slope of the segment from (a,b) to (x,f[x]) is the tangent of the angle the segment forms with the horizontal,



    Figure 27.6: Slope of Incoming Line =

    The slope of the tangent line to the curve y=f[x] is the tangent of the angle it makes with the horizontal,



    Figure 27.7: Slope of Tangent Line =

    The angle between the first ray and the tangent line is .

  • % Let denote the angle from the horizontal to the segment from (x,f[x]) to (u,v). Note the angles , , and on the figure of a reflection off a curve.


    Figure 27.8: Slope of Reflected Line =

    Show that Snell's law requires that , , so


    We can easily compute the tangents of the first two angles, since we can find the slopes.

  • The trig identities

    allow us to find the slope of the reflection ray without actually finding any angles. Use the addition formulas for sine and cosine to prove these formulas, for example,

    Divide numerator and denominator by and simplify to prove the first formula for tangent.

    Now use the tangent identity to find the slope of the reflected ray without actually computing angles.

  • % Write a short numerical computer program to find if you assign a, b, x and have a defined function f[x].

    Test your program on the function , when a=0, b=6, and x=4. You should get:



    Figure 27.9: Test Reflection

    Once we know the slope of the reflected ray, , we can write an equation for that line. The formula "y=mx+b" or point-slope formula is the idea, but since we have used x at the point (x,f[x]) and since we know that the point (x,f[x]) lies on the line, we need new variables.

  • Let dx represent a displacement away from the fixed point x so that u=x+dx. Show that the y-coordinate of the point (u,v) on the reflected ray is

    We can use this in a computer program to draw the reflected ray from (x,f[x]) to (u,v). Test your program on the function , when a=0, b=6, x=4, and dx=2. You should get u=6 and v=15.

    Vertical Incoming Light

    If the incoming light ray is vertical, , then is undefined. The ray is perfectly OK, but the math breaks down.


    Figure 27.10: Vertical Incoming Light