|
|
|
|
derivation of 2D reflection matrix
|
(Derivation)
|
|
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 terms 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 :
Computing the matrix product (with the help of the double angle identity) yields:
![$\displaystyle [T]_{xy} = \begin{bmatrix}\cos 2\theta & \sin 2\theta \ \sin 2\theta & -\cos 2\theta \end{bmatrix} .$ $\displaystyle [T]_{xy} = \begin{bmatrix}\cos 2\theta & \sin 2\theta \ \sin 2\theta & -\cos 2\theta \end{bmatrix} .$](http://images.planetmath.org:8080/cache/objects/7262/l2h/img21.png) |
(1) |
For the information 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.
Note also that and are orthogonal matrices, with determinant , as expected.
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 source code 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
:
 |
(2) |
Notice that if we put
and
in matrix (2), we get matrix (1), as it should be.
There is another form for the matrix (1). We set
to be the slope of the line of reflection and use the identities:
When these equations are substituted in matrix (1), we obtain an alternate expression for it in terms of only:
 |
(3) |
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.
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
![$\displaystyle [T]_{xy} = \begin{bmatrix}\cos \phi & \sin \phi \ \sin \phi & -\cos \phi \end{bmatrix} .$ $\displaystyle [T]_{xy} = \begin{bmatrix}\cos \phi & \sin \phi \ \sin \phi & -\cos \phi \end{bmatrix} .$](http://images.planetmath.org:8080/cache/objects/7262/l2h/img55.png) |
(4) |
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.
|
"derivation of 2D reflection matrix" is owned by stevecheng.
|
|
(view preamble)
Cross-references: number, one-point compactification, projective line, real, homeomorphic, mean, endpoints, interval, range, one-to-one, invariant, points, opposite, circle, projective plane, topology, operation, limit, expression, equations, identities, slope, divide, transformation, decomposition, trigonometric functions, unit, determinant, orthogonal matrices, linear algebra, onto, rotate, double angle identity, matrix product, side, coordinates, matrix, components, reflection, direction vector, axis, positive, angle, line, vectors, reflect, plane, unit vectors, perpendicular
There is 1 reference to this entry.
This is version 11 of derivation of 2D reflection matrix, born on 2005-07-25, modified 2006-03-13.
Object id is 7262, canonical name is DerivationOf2DReflectionMatrix.
Accessed 17073 times total.
Classification:
| AMS MSC: | 15-00 (Linear and multilinear algebra; matrix theory :: General reference works ) |
|
|
|
|
|
|
Pending Errata and Addenda
|
|
|
|
|
|
|
|
|
|
|