Sub topic 7
The Critical Angle and Total Internal Reflection
This chapter assumes you can use sine and inverse sine, measure angles from the surface normal, and apply Snell's law, n1 sin θ1 = n2 sin θ2, from the previous chapter. You should also be comfortable with the law of reflection, where the reflected angle equals the incident angle.
The problem Snell's law leaves open
Snell's law gives the refraction angle as
sin θ2 = (n1 / n2) · sin θ1
When light enters a denser medium (n2 > n1), the factor n1/n2 is less than 1, so sin θ2 is always less than 1. A refraction angle always exists.
When light goes the other way, from a denser medium into a less dense one (n1 > n2), the factor n1/n2 is greater than 1. For large enough θ1 the right-hand side exceeds 1. No real angle has a sine larger than 1, so there is no refracted ray at all. The light is reflected completely. This is total internal reflection (TIR).
Deriving the critical angle
Increase θ1 from 0° for a ray travelling from n1 into n2, with n1 > n2. The refraction angle θ2 grows faster than θ1, because the ray bends away from the normal. At some incident angle, θ2 reaches 90°. The refracted ray then travels along the boundary. That incident angle is the critical angle, θc.
Set θ2 = 90° in Snell's law:
n1 sin θc = n2 sin 90° = n2
sin θc = n2 / n1
θc = arcsin(n2 / n1)
This formula only works when n2 < n1. If n2 ≥ n1, then n2/n1 ≥ 1 and the arcsine either equals 90° (equal indices, no boundary effect) or does not exist.
import math
def critical_angle(n1, n2):
"""Critical angle in degrees for light going from n1 into n2; requires n1 > n2."""
if n1 <= n2:
raise ValueError("Total internal reflection requires n1 > n2")
return math.degrees(math.asin(n2 / n1))
print(critical_angle(1.5, 1.0))For glass (n = 1.5) to air, this prints about 41.81°.
What happens on each side of the critical angle
The behavior splits into three regimes.
| Incident angle θ1 | Refracted ray | Reflected ray |
|---|---|---|
| θ1 < θc | Exists, with θ2 < 90° | Present but weak |
| θ1 = θc | Exists, with θ2 = 90° (grazes the boundary) | Strong |
| θ1 > θc | Does not exist | Carries all the incident light, with θr = θ1 |
Below θc, you get ordinary partial reflection and partial refraction. As θ1 approaches θc, the refracted ray bends toward the boundary and gets dimmer, and the reflected ray gets brighter. Above θc, the boundary acts as a perfect mirror. The law of reflection still applies, so the reflected angle equals the incident angle.
Two conditions, both required
TIR needs both of the following:
- The light must start in the medium with the larger refractive index (n1 > n2).
- The angle of incidence, measured from the normal, must be larger than θc.
If either fails, there is no TIR. A common mistake is to think a steep ray in air can be totally reflected off water or glass. It cannot, because going from air into a denser medium never satisfies condition 1.
Critical angles for common pairs
The table uses typical refractive indices for visible light. The values depend slightly on wavelength, which a later chapter covers.
| Boundary (from → to) | n1 | n2 | Critical angle θc |
|---|---|---|---|
| Water → air | 1.333 | 1.000 | about 48.6° |
| Glass → air | 1.5 | 1.000 | about 41.8° |
| Diamond → air | 2.42 | 1.000 | about 24.4° |
| Glass → water | 1.5 | 1.333 | about 62.7° |
A higher n1 relative to n2 gives a smaller critical angle. Diamond's small θc means most light entering a cut diamond hits an internal face above the critical angle and is reflected back. This is a large part of its sparkle. The glass-to-water row shows that a smaller index step gives a larger θc, so TIR is harder to reach.
Worked example: a right-angle prism
A ray travels through a glass prism (n = 1.5) and strikes an internal face at 45° from the normal. The surrounding medium is air.
- The critical angle for glass to air is about 41.81°.
- The incident angle of 45° is larger than 41.81°.
- The ray is totally internally reflected.
A 45° right-angle prism uses this to turn a beam by 90° with no mirror coating. Because the reflection is total, no light is lost to the surface (aside from small losses at the entry and exit faces).
Now change the ray to 40° at the same face. The critical angle is still 41.81°, so 40° is below it:
sin θ2 = 1.5 · sin 40° ≈ 1.5 × 0.6428 ≈ 0.9642
θ2 ≈ 74.6°
A refracted ray exists, bent strongly away from the normal, and some light also reflects. Notice how a 5° change in the incident angle switches the face from nearly transparent to a perfect mirror.
Handling TIR in code
The first Snell's-law function from the previous chapter returned None when sin θ2 exceeded 1. In practice you also need to handle the exact critical angle, where floating-point rounding can push the computed value slightly above or below 1.
import math
def trace(n1, n2, theta1_deg):
"""Classify what happens to a ray and return (outcome, angle in degrees).
For "refracted" the angle is the refraction angle. For "grazing" it is 90.
For "total internal reflection" it is the reflection angle, which equals theta1.
"""
s = n1 * math.sin(math.radians(theta1_deg)) / n2
if math.isclose(s, 1.0, abs_tol=1e-9):
return "grazing", 90.0
if s > 1:
return "total internal reflection", theta1_deg
return "refracted", math.degrees(math.asin(s))
for angle in (30, 40, 45, 60):
print(angle, trace(1.5, 1.0, angle))The loop reports refraction at 30° and 40°, and total internal reflection at 45° and 60°. At 40° the refraction angle is about 74.6°, matching the hand calculation above.
For TIR, the reflected direction comes from the same vector rule used for any mirror. The refracted ray no longer exists, so reflection is the only outcome:
def reflect(d, n):
"""Reflect direction vector d off a surface with unit normal n (2D tuples)."""
dot = d[0] * n[0] + d[1] * n[1]
return (d[0] - 2 * dot * n[0], d[1] - 2 * dot * n[1])
print(reflect((1, -1), (0, 1)))This prints (1, 1). A ray moving right and down hits a horizontal surface and leaves moving right and up.
Edge cases and subtleties
The exact critical angle
At θ1 = θc, the refracted ray runs along the boundary at 90°. Real beams are never perfectly one angle, so in practice the transition from partial to total reflection is sharp but not infinitely sharp. In a simulation, comparisons with == on floating-point numbers are unreliable. Use a tolerance, as the isclose call above does.
The evanescent wave
Even during TIR, the electromagnetic field does not stop exactly at the boundary. It leaks a very short distance into the second medium, on the order of one wavelength, and decays exponentially with distance. This is called an evanescent wave. It carries no energy away from the surface while the second medium is empty, which is why the reflection stays total.
If you bring a third medium of higher index close to the boundary (within about a wavelength), the evanescent wave can couple into it and carry energy across the gap. This is frustrated total internal reflection. Some touch sensors and fingerprint scanners use this: a fingertip pressed on a glass surface changes the reflection where it touches. You do not need the wave equations here. The point is that "total" means no energy leaves into a lossless second medium, and the field itself still extends past the boundary.
Wavelength dependence
The refractive index changes slightly with wavelength, so θc does too. Blue light typically sees a slightly higher index in glass than red light, giving it a slightly smaller critical angle. Near the critical angle, one color can still refract while another is already totally reflected. The dispersion chapter returns to this.
Curved and rough surfaces
The critical angle is defined relative to the local normal at the point where the ray hits. On a curved surface the normal changes from point to point, so one beam can partly totally reflect and partly refract. Rough surfaces scatter the normal in many directions, so TIR holds only locally.
Common errors
- Measuring from the surface instead of the normal. The critical angle formula assumes angles from the normal. A ray at 10° to the surface is at 80° from the normal.
- Swapping n1 and n2. The formula is sin θc = n2/n1, with the incident medium's index in the denominator. Swapping them gives a ratio above 1 for the very case where TIR exists.
- Expecting TIR going into a denser medium. It cannot happen, because the ratio n1/n2 is below 1.
- Forgetting the reflected ray exists below θc. TIR is the limit where reflection reaches 100%. Below θc some reflection is still present.
- Mixing degrees and radians.
math.sintakes radians, so convert withmath.radians, and convert results back withmath.degrees.
Summary of the rules
- The critical angle is θc = arcsin(n2/n1), defined only for n1 > n2.
- For θ1 < θc, light partly refracts and partly reflects.
- At θ1 = θc, the refracted ray travels along the boundary.
- For θ1 > θc, all the light reflects, with reflected angle equal to the incident angle.
- Check the ratio n1 sin θ1 / n2 against 1 before taking an arcsine.
Exercise
A ray in water (n = 1.333) hits the water-air surface from below at an incident angle of 55° from the normal. Does it refract into the air or is it totally reflected? Give the critical angle and justify your answer.
Show answer
The critical angle is θc = arcsin(1.000 / 1.333) = arcsin(0.750) ≈ 48.6°. Light is going from the higher index (water) to the lower index (air), so TIR is possible. The incident angle of 55° is larger than 48.6°, so the ray is totally internally reflected. As a check, n1 sin θ1 / n2 = 1.333 × sin 55° ≈ 1.333 × 0.819 ≈ 1.09, which is greater than 1, so no refraction angle exists.
Exercise
A ray travels from glass (n = 1.5) into water (n = 1.333). Find the critical angle. Then say what happens to a ray that hits the boundary at 60° from the normal, and what happens at 65°.
Show answer
θc = arcsin(1.333 / 1.5) = arcsin(0.889) ≈ 62.7°. At 60°, which is below θc, the ray refracts: sin θ2 = 1.5 × sin 60° / 1.333 ≈ 1.5 × 0.866 / 1.333 ≈ 0.975, so θ2 ≈ 77°. Some light also reflects. At 65°, which is above θc, the ray is totally internally reflected, because 1.5 × sin 65° / 1.333 ≈ 1.02 is greater than 1.
Exercise
Why can a ray going from air into glass never be totally internally reflected, no matter how large the angle of incidence?
Show answer
Going from air (n1 = 1.0) into glass (n2 = 1.5), the ratio n1/n2 is 0.667. Then sin θ2 = 0.667 × sin θ1 is at most 0.667, which is below 1. A real refraction angle always exists, with a maximum of about 41.8° as θ1 approaches 90°. TIR needs n1 > n2.