A reflected ray does not usually travel directly backward along its incoming path. At an ideal planar mirror, the component parallel to the surface is preserved and the perpendicular component changes sign. That construction gives a compact vector calculation for robot optical models and explains a familiar angular effect: rotating a mirror can turn the outgoing direction through twice the mirror angle.

The examples here describe ideal geometric directions. They are not a scanner calibration, a laser experiment, a claim about a photographed sensor, or a prediction of reflection intensity. Surface roughness, polarization, wavelength-dependent reflectance, and beam shape are outside this direction-only model. All coordinates and angles below are independently chosen.

OpenStax states the equal-angle law with angles measured from the surface normal. Khronos's official reflect reference gives the vector expression I - 2 dot(N,I) N and requires a normalized normal. These are the two source relationships used here. Their numerical consequences can be checked by decomposing an incoming vector rather than by treating the expression as an unexplained software command.

Use an incoming propagation vector i that points toward the mirror at the point of interaction. Let n be a unit normal to its plane. Define a = i dot n. The normal component is a n and the tangential component is t = i - a n. Because n dot n = 1, t dot n = 0. The decomposition therefore separates perpendicular directions.

Keeping t and reversing a n gives the outgoing propagation vector r = t - a n = i - 2a n. It follows immediately that r dot n = -a. The normal projection has reversed sign. Meanwhile r - (r dot n)n = t, so the tangential projection remains the same. Reversing the entire vector, -i, would reverse the tangent too and generally give a different ray.

For a horizontal mirror line in a two-dimensional xy sketch, take n = (0, 1) and i = (0.6, -0.8). The incoming vector has unit length. Its normal scalar is -0.8, and its tangent is (0.6, 0). Reflection gives r = (0.6, 0.8). The positive horizontal component survives while the downward component becomes upward.

The incidence and reflection angles relative to the normal both have cosine 0.8, giving approximately 36.8699 degrees. Their angles to the mirror surface are instead approximately 53.1301 degrees. Using one surface angle and one normal angle would appear to violate the equal-angle law, even though the two vectors satisfy it exactly.

The length check follows from the orthogonal decomposition. The squared magnitude of i is the squared magnitude of t plus a squared; the same is true of r. In the numerical example both squared lengths are 0.36 + 0.64 = 1. This geometric reflection changes a direction without changing the vector's magnitude. It says nothing by itself about reflected optical power.

Normal orientation can be changed without changing the reflection. Replacing n by -n changes a to -a, so the product a n remains unchanged. Both normals describe the same plane. This sign invariance is useful when checking a direction calculation, although a separate surface model may still use normal orientation to distinguish sides of an object.

Normal magnitude is a different matter. Incorrectly substitute m = (0, 2) into the unit-normal expression for the same incoming i. Its dot product with i is -1.6, and the computed result becomes (0.6, 5.6), rather than (0.6, 0.8). Its squared length is 31.72. This is not a physically different mirror; it is the result of violating the formula's normalization assumption.

For a nonzero normal m of arbitrary magnitude, normalizing it first is equivalent in exact algebra to r = i - 2[(i dot m)/(m dot m)]m. With m = (0, 2), division by m dot m = 4 restores the correct result. A zero vector cannot define a plane normal, so that alternative expression is undefined for m = 0.

The incident vector need not have unit length to demonstrate this magnitude-preserving geometry. Taking i = (3, -4) with unit n = (0, 1) gives r = (3, 4), with both magnitudes equal to five. An application that intends to store unit ray directions would still normalize its directional representation separately.

Now hold the incoming direction vertically downward at i = (0, -1), and rotate the mirror counterclockwise by delta around the interaction point. A unit normal is n = (-sin delta, cos delta). Substitution into the reflection expression gives r = (-sin(2 delta), cos(2 delta)). The direction is therefore rotated counterclockwise by 2 delta from its original upward direction.

For a five-degree mirror rotation, the new reflected vector is approximately (-0.1736482, 0.9848078). Its direction is ten degrees left of vertical. The angle between the incoming ray and the new normal, interpreted at the surface, has changed by five degrees; the outgoing direction relative to fixed world axes has changed by ten. These are different angular comparisons.

This doubled-angle result assumes a fixed incident direction and a common plane of rotation. It does not automatically describe a beam spot on a distant, tilted detector: finding that spot also requires the detector plane and ray-plane intersection. Nor does it imply that any arbitrary three-dimensional orientation change can be represented by doubling three independent angle components.

Applying the same plane reflection twice restores the original vector: the first operation reverses the normal component and the second reverses it again. Together with equal lengths and unchanged tangents, that supplies several independent checks for an analytical robot ray model. No rendering library, optical instrument, or robot test was executed for this article.

Concept illustration: an existing site-library robot-and-optical-inspection scene represents optical-model context. It does not show the example mirror, an actual reflected beam path, or a verified sensor configuration.

Sources checked October 24, 2026: Khronos, reflect reference source, https://raw.githubusercontent.com/KhronosGroup/OpenGL-Refpages/main/gl4/reflect.xml ; OpenStax, The Law of Reflection, https://openstax.org/books/university-physics-volume-3/pages/1-2-the-law-of-reflection .