Exercises — Snell's law — derivation from Fermat's principle
Before we start, one shared picture. The normal is the vertical dashed line; the surface is horizontal; is the wedge between the ray and the normal.

Level 1 — Recognition
Can you read the law and plug numbers straight in?
Recall Solution 1.1
Snell's law: .
- = refractive index of the medium the light starts in (medium 1).
- = refractive index of the medium the light enters (medium 2).
- = angle of incidence, measured from the normal in medium 1.
- = angle of refraction, measured from the normal in medium 2.
The refractive index is defined by , where is the speed of light in vacuum and its speed in the medium: it says how many times slower light moves in that medium than in vacuum. See Refractive Index.
Recall Solution 1.2
Set-up: .
Prediction: Water is denser (), so light slows down entering it. The rule "Slow ⇒ Slant toward the Normal" says the ray bends toward the normal, so .
Why: is conserved. Since , to keep the product equal we need , hence a smaller angle.
Recall Solution 1.3
True. Put into Snell's law: The ray continues straight through. A ray travelling along the normal has zero horizontal run, and it is exactly the horizontal component that must be shared across the boundary — zero stays zero. This is the degenerate (normal-incidence) case.
Level 2 — Application
Solve for the unknown angle or index.
Recall Solution 2.1
Step 1 — write Snell: . Step 2 — isolate the sine: . Why divide? We want alone, so we move the known factor to the other side. Step 3 — undo the sine: . Check: ✔ — bent toward the normal, exactly as predicted.
Recall Solution 2.2
Step 1: . Step 2: . Check: The ray bent away from the normal () on leaving, which is what happens exiting a denser medium — consistent with . ✔
Recall Solution 2.3
Step 1 — speed form of Snell: since (with the vacuum speed of light), the 's cancel: Step 2 — solve: . Step 3: . Check: Slower medium () → bends toward normal → ✔.
Level 3 — Analysis
Reason about limits, critical angles, and when solutions disappear.
Recall Solution 3.1
Step 1 — critical condition: set , so : Step 2: . Step 3: . Beyond the equation demands , which is impossible — so no refracted ray exists and all light reflects: Total Internal Reflection. See also Critical Angle.
The figure below draws this exact critical case: the incident ray (yellow) strikes at and the refracted ray (red) lies flat along the surface at . Notice the green arc marking — as you tilt the incident ray past it, the red arrow has nowhere left to go.

Recall Solution 3.2
But the sine of a real angle can never exceed . Since , no real exists — the light cannot refract out and undergoes total internal reflection instead. What it means physically: the boundary acts as a perfect mirror. This is exactly how light stays trapped in an optical fibre.
Recall Solution 3.3
Set up the geometry locally. Put point in medium 1 and point in medium 2, with the flat boundary horizontal. Define:
- = the height of above the boundary (fixed),
- = the depth of below the boundary (fixed),
- = the horizontal separation between and (fixed),
- = the horizontal position where the ray crosses the boundary — the one free choice light makes.
Then the two straight segments have lengths (medium 1) and (medium 2), and the travel-time function is Setting gives, term by term (the cancels off both sides), Key bound on each side. For any real crossing point, the fraction is a sine, so it can never exceed ; hence the right side can never exceed . Meanwhile the left side can be as large as (at grazing incidence ).
- Dense → rare (): the left side can reach up to , which is bigger than the maximum the right side can supply. So for large enough the equation has no real — there is simply no interior stationary crossing point where a refracted ray can balance the times. That threshold is the critical angle, and beyond it Fermat's least-time path becomes a purely reflected one (see Reflection — law from Fermat's principle).
- Rare → dense (): the left side maxes out at , always within the right side's reach. So a real crossing point — and hence a real — always exists. No critical angle.
In one line: the critical angle is the incidence at which the least-time equation runs out of a real solution, and that can only happen when . See Calculus — minimization and stationary points.
Level 4 — Synthesis
Chain several ideas together.
Recall Solution 4.1
Inside the slab (top face): , so At the bottom face: because the faces are parallel, the internal ray hits the bottom at the same from that face's normal. Apply Snell again, glass → air: Punchline: the exit angle equals the entry angle — the ray emerges parallel to its original direction (just shifted sideways). The cancels completely: .
The figure below traces the whole journey: yellow ray in at , blue ray bent to inside the slab, red ray out at again. Lay a ruler along the yellow and red arrows — they are parallel, offset only sideways, exactly as the algebra predicts.

Recall Solution 4.2
Left side: . Right side: . They agree to rounding (0.7071 vs 0.7068). This common value is the horizontal "optical momentum" , conserved across the boundary — precisely the condition produced in the parent derivation. See Calculus — minimization and stationary points.
Level 5 — Mastery
Build a new result from Fermat's principle itself.
Recall Solution 5.1
Name the free variable. = horizontal position where the ray crosses the boundary; , , are all fixed by where and sit. Everything below hangs on the single choice of .
Path lengths (right triangles, one on each side of the boundary): Total travel time — time for one straight segment is (optical distance) = , and is the sum of the two segments: Differentiate — and here is the why of each derivative. We need . Write , so the term is . The chain rule says: differentiate the outer power, then multiply by the derivative of the inside. Why the chain rule? Because is buried inside the square root — we cannot differentiate a composite function directly, we peel it layer by layer. For the second term the inside is , whose derivative is (another chain-rule layer, the from ), giving .
Putting both terms together and setting the result to zero: Read the geometry: in the right triangle in medium 1, the horizontal run is opposite the angle from the normal, and is the hypotenuse, so . Likewise . Multiply the whole equation by (it cancels): The single free variable was the crossing point ; least time fixed it, and the fix is Snell's law.
Recall Solution 5.2
Why numerically? This equation cannot be untangled into a clean closed form — the unknown sits inside two different square roots. So we solve it by successive refinement (a numeric root-finder / Newton's method), which converges to Read off the angles at this crossing point:
- Medium 1: , so .
- ; Medium 2: , so . Check the stationary balance (this is what the solver enforced, and it is Snell's law once multiplied by ): LHS RHS to three decimals ✔. Equivalently equals ? — no: note is not what balances here; the correct conserved statement is only when both are read off the same stationary , and indeed . Final answer: , , , and . Lesson: trust the stationary equation, solve it numerically, then verify — never eyeball or assume .
Recall Self-test summary
One-liners to check you own this page.
Which line are Snell angles measured from? ::: The normal (perpendicular to the surface). Air→water at 45°, water n=1.33 — refracted angle? ::: About 32.1°, bent toward the normal. Critical-angle condition (dense→rare)? ::: , valid only when . Why does a parallel slab not change ray direction? ::: The two faces cancel: , so exit angle = entry angle. What single free variable does Fermat minimise over? ::: The horizontal crossing point ; setting yields Snell's law.
Connections
- Fermat's Principle
- Refractive Index
- Total Internal Reflection
- Critical Angle
- Reflection — law from Fermat's principle
- Optical Path Length
- Huygens' Principle and Snell's Law
- Calculus — minimization and stationary points