How Do Projection and Reflection Linear Transformations Work?
At a glance
- 1. Write the projection
For a line through the origin with direction vector u, project x using P = uuᵀ/(uᵀu).
- 2. Write the reflection
For reflection across a line, use R = 2P − I; for reflection across the x-axis, use diag(1, −1).
- 3. Set the order
If you project first and reflect second, the composite matrix is RP. Reversing the order gives PR.
- 4. Check eigenvalues
A projection has eigenvalues 0 and 1; a reflection has eigenvalues 1 and −1. A composite may have different eigenvalues.
Projection and reflection are both linear transformations when the subspace or mirror passes through the origin. To combine them, represent each transformation by a matrix and multiply the matrices in the order the transformations are applied. The order matters: projection followed by reflection is generally not the same as reflection followed by projection.
The formulas below use column vectors. They also show why eigenvalues of a composite transformation cannot always be inferred from the eigenvalues of its individual steps.
Projection onto a line
Let a line through the origin have direction vector . The orthogonal projection of a vector onto that line is
so its matrix is
A projection leaves vectors already on the line unchanged and maps vectors perpendicular to it to zero. In matrix terms, : applying the projection twice has the same effect as applying it once. Its eigenvalues can only be and : vectors in the projected subspace have eigenvalue , and vectors in its orthogonal complement have eigenvalue . Both occur when the subspace and its orthogonal complement are nonzero.
For example, the projection onto the line spanned by uses , giving
Indeed, .
Reflection across a line
If is the orthogonal projection onto a line, reflection across that same line is
A vector on the line stays fixed, while its perpendicular component changes sign. Consequently, reflection matrices satisfy . For a reflection across a line in the plane, the eigenvalues are and ; more generally, both occur when the fixed and reversed subspaces are nonzero.
As a simpler example, reflection across the -axis is
because it sends to .
Compose the transformations in the right order
For column vectors, the matrix on the right acts first. Thus:
- Project, then reflect: , so the composite matrix is .
- Reflect, then project: , so the composite matrix is .
These products can differ because matrix multiplication is not generally commutative; for some choices, .
If the projection and reflection use the same line, then , and
This makes geometric sense: after projection, the vector lies on the mirror line, so reflecting it does nothing. If the two lines differ, the composite can have a different effect.
Worked example: project onto the diagonal, then reflect across the x-axis
Use the projection matrix onto the line spanned by and the reflection matrix across the -axis:
Projection comes first, so multiply by first and use :
For a concrete vector , projection gives ; reflection across the -axis then gives . The composite matrix produces the same result:
This particular composite is not itself a projection or a reflection. Its square is the zero matrix:
Therefore its only eigenvalue is . Geometrically, the composite maps every vector to a multiple of , and applying it again gives zero because is perpendicular to the projection line. This illustrates why you should calculate the composite matrix before making claims about its eigenvalues.
Common mistakes
- Reversing the product: With column vectors, means apply first, then . Read the product from right to left.
- Treating projection and reflection as the same operation: Projection discards the perpendicular component; reflection reverses it.
- Assuming the composite inherits the eigenvalues: The eigenvalues of are not generally obtained by combining the eigenvalues of and .
- Using a reflection matrix for a mirror not through the origin: Reflection across a line that does not pass through the origin is an affine transformation, not a linear one. It can still be written using matrices in homogeneous coordinates, but it is not represented by an ordinary linear map.
- Forgetting the vector convention: The product order stated here assumes column vectors. Row-vector conventions reverse the way transformations are written.
References
- Linear Algebra and Its Applications — David C. Lay, Steven R. Lay, and Judi J. McDonald
- Introduction to Linear Algebra — Gilbert Strang
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.