Physics · Introductory

Snell's law refraction

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

Snell's law describes how a light ray bends when it crosses the boundary between two transparent media. The bending is set by the refractive indices of the media: n1 sin(theta1) = n2 sin(theta2). Light bends toward the normal when entering a slower (higher index) medium and away from it when entering a faster one.

Intuition

Light travels at different speeds in different materials. In a vacuum it moves at c, but in water or glass it is slower by a factor n, the refractive index. When a wavefront hits a boundary at an angle, one side of the wavefront enters the new medium first and slows down while the other side is still moving fast. The wavefront pivots, so the ray changes direction. Think of a marching band moving from pavement onto mud at an angle: the marchers whose feet hit the mud first slow down, and the whole line swings around. Angles are always measured from the normal, the imaginary line perpendicular to the surface, not from the surface itself.

Key equations

n=cv
(1)

Refractive index is the ratio of the speed of light in vacuum to its speed in the medium.

n1sin⁡θ1=n2sin⁡θ2
(2)

Snell's law: relates incident and refracted angles, measured from the normal.

sin⁡θc=n2n1
(3)

Critical angle for total internal reflection, possible only when n1 > n2.

Derivation

  1. Draw a flat boundary and a plane wavefront striking it at incident angle theta1 to the normal. Equivalently, the wavefront makes angle theta1 with the surface.
  2. In the time t, the part of the wavefront in medium 1 travels distance v1 t, while the point already at the boundary sends a wavelet into medium 2 a distance v2 t.
  3. Let L be the length along the boundary between the two wavefront positions. From the geometry in medium 1, sin(theta1) = v1 t / L.
  4. In medium 2, sin(theta2) = v2 t / L.
  5. Divide the equations: sin(theta1)/sin(theta2) = v1/v2.
  6. Substitute v = c/n: v1/v2 = n2/n1.
  7. Therefore n1 sin(theta1) = n2 sin(theta2).

Worked example

Problem

A light ray in air (n = 1.00) hits water (n = 1.33) at 40 degrees from the normal. Find the refracted angle.

  1. Write Snell's law: 1.00 × sin(40°) = 1.33 × sin(theta2).
  2. sin(40°) ≈ 0.643.
  3. sin(theta2) = 0.643 / 1.33 ≈ 0.483.
  4. theta2 = arcsin(0.483) ≈ 28.9°.

Answer About 29 degrees from the normal, bent toward the normal because water is optically denser.

Common mistakes

  • Measuring angles from the surface instead of from the normal.
  • Forgetting that light bends toward the normal when entering a higher-index medium.
  • Applying the critical angle formula when going from low to high index; total internal reflection needs n1 > n2.
  • Thinking the light frequency changes at the boundary; frequency stays the same while speed and wavelength change.
  • Calculating the angle with a calculator set to radians instead of degrees.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

scene.py(65 lines)
import sys
from manim import *
from blocks import *
import numpy as np

N1, N2 = 1.0, 1.5


def refract_angle(theta1_deg, n1=N1, n2=N2):
    """Snell's law: n1 sin(t1) = n2 sin(t2). Returns t2 in degrees."""
    s = n1 * np.sin(np.radians(theta1_deg)) / n2
    return float(np.degrees(np.arcsin(s)))


ANGLES = [20, 40, 60]
TRACE = [(a, refract_angle(a)) for a in ANGLES]


class Main(Scene):
    def construct(self):
        self.camera.background_color = "#101018"
        TitleCard(self, "Snell's law", "n1 sin(θ1) = n2 sin(θ2)")
        # interface: upper half air, lower half glass
        glass = Rectangle(width=9, height=2.6, stroke_width=0,
                          fill_color=C_MAIN, fill_opacity=0.25)
        glass.move_to([0, -1.5, 0])
        surface = Line([-4.5, -0.2, 0], [4.5, -0.2, 0], color=WHITE)
        normal = DashedLine([0, 1.9, 0], [0, -2.8, 0], color=C_DIM)
        n1l = Text("air  n1 = 1.0", font_size=26, color=WHITE)
        n1l.move_to([-4.2, 1.5, 0]).set_z_index(5)
        n2l = Text("glass  n2 = 1.5", font_size=26, color=WHITE)
        n2l.move_to([-3.9, -2.4, 0]).set_z_index(5)
        self.play(FadeIn(glass), Create(surface), Create(normal))
        self.play(FadeIn(n1l), FadeIn(n2l))
        P = np.array([0.0, -0.2, 0.0])
        L = 2.0
        prev = None
        for a, b in TRACE:
            ta, tb = np.radians(a), np.radians(b)
            start = P + L * np.array([-np.sin(ta), np.cos(ta), 0])
            end = P + L * np.array([np.sin(tb), -np.cos(tb), 0])
            inc = Line(start, P, color=C_ACCENT, stroke_width=5)
            ref = Line(P, end, color=C_GOOD, stroke_width=5)
            info = Text(f"θ1={a}°  θ2={b:.1f}°", font_size=26, color=WHITE)
            info.move_to([3.6, 1.5, 0])
            if prev is None:
                self.play(Create(inc), run_time=0.8)
                self.play(Create(ref), FadeIn(info), run_time=0.8)
            else:
                self.play(FadeOut(prev), run_time=0.3)
                self.play(Create(inc), run_time=0.6)
                self.play(Create(ref), FadeIn(info), run_time=0.6)
            self.wait(0.6)
            prev = VGroup(inc, ref, info)
        StepCaption(self, "Entering a denser medium bends light toward the normal.")
        self.wait(1)


if __name__ == "__main__" and "--selftest" in sys.argv:
    assert abs(refract_angle(0)) < 1e-9
    for a, b in TRACE:
        assert abs(N1 * np.sin(np.radians(a)) - N2 * np.sin(np.radians(b))) < 1e-9
        assert b < a
    assert abs(refract_angle(30) - 19.4712) < 1e-3
    print("ok")

The Manim scene code that draws this lesson's animation in the Signals AI app (Python, Manim Community).

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.