Why reflection matrices matter in linear algebra
Reflections are distance‑preserving transformations used in geometry and graphics. A reflection matrix is orthogonal, so its transpose equals its inverse, and it flips orientation with determinant −1. This calculator produces matrices you can plug into coordinate pipelines, test on sample points, and store for documentation. Because reflections are linear (or affine in homogeneous form), they compose with rotations, scalings, and translations via matrix multiplication. In teaching, it also helps students connect geometric intuition to algebraic structure, symmetry constraints, and debugging habits.
Standard 2D reflections and quick matrices
In 2D, standard reflections are easy to recognize. Across the x‑axis, y changes sign; across the y‑axis, x changes sign. Across the line y=x, coordinates swap; across y=−x, they swap and negate. When you choose a preset, the tool outputs the exact matrix and shows the reflected point so you can confirm the symmetry visually and numerically.
Reflection across an arbitrary line
For a line not aligned with axes, the matrix depends on the line’s unit direction and its normal. For a line through the origin with unit direction u, the reflection is R = 2uuᵀ − I. For a shifted line, the calculator derives a unit normal n and an offset, then builds an affine transform that keeps points on the line fixed. This supports mirroring sketches and aligning measured profiles.
3D reflections across planes and origin
In 3D, reflecting across a plane uses the plane’s unit normal n. For planes through the origin, the reflection is R = I − 2nnᵀ. For planes with equation Ax+By+Cz+D=0, the calculator also applies a translation term so the plane stays invariant. The 4×4 homogeneous output fits common 3D pipelines, and the origin option performs central inversion as a symmetry case.
Validation checks for reliable results
Simple checks keep results reliable. A valid reflection matrix satisfies RᵀR ≈ I and det(R) ≈ −1, within rounding tolerance. Applying the matrix twice should recover the original coordinates. CSV and PDF exports store your inputs, matrices, and sample points together. Use these checks when inputs come from measurements, slopes, or user‑entered coefficients.