derivation of 2D reflection matrix
Reflection across a line of given angle
Let be perpendicular unit vectors in the plane. Suppose we want to reflect vectors (perpendicularly) over a line that makes an angle with the positive axis. More precisely, we are given a direction direction vector for the line of reflection. A unit vector perpendicular to is (as is easily checked). Then to reflect an arbitrary vector , we write in of its components in the axes: , and the result of the reflection is to be .
We compute the matrix for such a reflection in the original coordinates.
Denote the reflection by . By the matrix change-of-coordinates formula, we have
where and denote the matrix representing with respect to the and coordinates respectively; is the matrix that changes from coordinates to coordinates, and is the matrix that changes coordinates the other way.
The three matrices on the right-hand side are all easily derived from the description we gave for the reflection :
For the of the reader, we note that there are other ways of “deriving” this result. One is by the use of a diagram, which would show that gets reflected to and gets reflected to . Another way is to observe that we can rotate an arbitrary mirror line onto the x-axis, then reflect across the x-axis, and rotate back. (The matrix product can be seen as operating this way.) We took neither of these two approaches, because to justify them rigorously takes a bit of work, that is avoided by the pure linear algebra approach.
Reflection across a line of given direction vector
Suppose instead of being given an angle , we are given the unit direction vector to reflect the vector . We can derive the matrix for the reflection directly, without involving any trigonometric functions.
In the decomposition , we note that . Therefore
(In fact, this is the formula used in the to draw the diagram in this entry.) To derive the matrix with respect to coordinates, we resort to a trick:
Therefore the matrix of the transformation is
If was not a unit vector to begin with, it of course suffices to divide by its magnitude before proceeding. Taking this into account, we obtain the following matrix for a reflection about a line with direction :
Reflection across a line of given slope
There is another form for the matrix (1). We set to be the slope of the line of reflection and use the identities:
Thus we have derived the matrix for a reflection about a line of slope .
Alternatively, we could have also substituted and in matrix (2) to arrive at the same result.
Topology of reflection matrices
Of course, formula (3) does not work literally when (the line is vertical). However, that case may be derived by taking the limit — this limit operation can be justified by considerations of the topology of the space of two-dimensional reflection matrices.
What is this topology? It is the one-dimensional projective plane , or simply, the “real projective line”. It is formed by taking the circle, and identifying opposite points, so that each pair of opposite points specify a unique mirror line of reflection in . Formula (1) is a parameterization of . Note that (1) involves the quantity , not , because for a point on the circle, its opposite point specify the same reflection, so formula (1) has to be invariant when is replaced by .
But (1) might as well be written
where . For this parameterization of to be one-to-one, can range over interval , and the endpoints at overlap just as for a circle, without identifying pairs of opposite points. What does this mean? It is the fact that is homeomorphic to the circle .
The real projective line is also the one-point compactification of (i.e. ), as shown by formula (3); the number corresponds to a reflection across the vertical axis. Note that this “” is not the same as the usual , because here and are actually the same number, both representing the slope of a vertical line.
|Title||derivation of 2D reflection matrix|
|Date of creation||2013-03-22 15:25:05|
|Last modified on||2013-03-22 15:25:05|
|Last modified by||stevecheng (10074)|