Reflection matrix

June 22, 2009 11:07 by scibuff

It’s been a while since my last math post. It seems that my previous assertion correlating the quality of question with the period of final exams could not have been further from the truth. It now seems quite likely that the occurrence of a few “good” questions on Yahoo Answers in a short period of time a few weeks back was more of a fluke rather than the norm.

Problem: Find the standard matrix for the linear transformation which reflects points in the x-y plane across the line y = \frac{-2x}{3}.

Solution: To find the matrix representing a given linear transformation all we need to do is to figure out where the basis vectors, i.e.

\vec{e_{1}}=\begin{bmatrix} 1\\ 0 \end{bmatrix} and  \vec{e_{2}}=\begin{bmatrix} 0\\ 1 \end{bmatrix}

are mapped under the transformation.

This is easy to see from the fact that since \vec{e_{1}} and \vec{e_{2}} form a basis of \mathbb{R}^{2} any element

\vec{u}\ \epsilon \ \mathbb{R}^{2}

can be written as

\vec{u} = a \cdot \vec{e_{1}} + b \cdot \vec{e_{2}}

for some a,b\ \epsilon\ \mathbb{R}.

Now let

A : \mathbb{R}^{2} \to \mathbb{R}^{2}

be a linear transformation. Then, by definition

A(\vec{u}) = A(a \cdot \vec{e_{1}} + b \cdot \vec{e_{2}}) = a \cdot A( \vec{e_{1}} ) + b \cdot A( \vec{e_{2}} )

Thus, the image of any element \vec{u}\ \epsilon \ \mathbb{R}^{2} under a linear transformation is completely determined by the image of the basis of the transformation’s domain.

Let’s find the image of \vec{e_{1}}=\begin{bmatrix} 1\\ 0 \end{bmatrix} under a reflection across the line given by y = \frac{-2x}{3}. First, we need to find a line perpendicular to y = \frac{-2x}{3} that passed through the point p_{1} = (1, 0).

In general, a line perpendicular to y = mx + b is given by y = \frac{-x}{m}, i.e in our case, y = \frac{3x}{2}. To find the one particular line with the same slope, that passes through p_{1} = (1, 0), we need to simply plug in the values of x = 1 and y = 0 into the line equation and add a constant value so that the equality will hold. Then we have

(0) = \frac{3(1)}{2}+b

Thus, the line perpendicular to y = \frac{-2x}{3} that passes through p_{1} = (1, 0) is given by y = \frac{3x}{2} - \frac{3}{2}

The lines given by equations (1) - red and (2) - green

The lines given by equations (1) - red and (2) - green

Now let’s find the point q_{1} = (x, y) at which our two lines y = \frac{-2x}{3} and y = \frac{3x}{2} - \frac{3}{2} intersect. This is done easily by solving the two line equation simultaneously:

y = \frac{-2x}{3} \ (1)

y = \frac{3x}{2} - \frac{3}{2} \ (2)

Equating (1) and (2) (and multiplying by 6 for simplicity) gives

-4x = 9x - 9

x = \frac{9}{13}

which then gives

y = \frac{-6}{13}

Thus, our two lines intersect at

q_{1} = \left (\frac{9}{13}, \frac{-6}{13} \right )

Now, let {p_{1}}' = (x, y) be the reflection of p_{1} = (1, 0) across y = \frac{-2x}{3}.  Since {p_{1}}' and p_{1} are symmetric across q_{1} (because that is how the reflection is actually constructed) it follows that

x = q_{1}x - \left | p_{1}x - q_{1}x \right | = \frac{9}{13} - \left | 1 - \frac{9}{13} \right | = \frac{5}{13}

y = q_{1}y - \left | p_{1}y - q_{1}y \right | = \frac{-6}{13} - \left | 0 - \frac{-6}{13} \right | = \frac{-12}{13}

so

A( \vec{e_{1}} ) = \begin{bmatrix} \frac{5}{13} \\ \frac{-12}{13} \end{bmatrix}

Similarly as above, we find the image of \vec{e_{2}}=\begin{bmatrix} 0\\ 1 \end{bmatrix} under a reflection across the line given by y = \frac{-2x}{3}. The line perpendicular to y = \frac{-2x}{3} that passed through the point p_{2} = (0, 1) is given by

y = \frac{3x}{2} + 1 \ (3)

The lines given by equations (1) - red, (2) - green, and (3) - blue

The lines given by equations (1) - red, (2) - green, and (3) - blue

Equating (1) and (3) (and multiplying by 6 again) gives

-4x = 9x + 6

x = \frac{-6}{13}

and so

y = \frac{4}{13}

Therefore, (1) and (3) intersect at

q_{2} = \left (\frac{-6}{13}, \frac{4}{13} \right )

and the image {p_{2}}' = (x, y) of p_{2} = (0, 1) under the reflection across y = \frac{-2x}{3} is given by

x = q_{2}x - \left | p_{2}x - q_{2}x \right | = \frac{-6}{13} - \left | 0 - \frac{-6}{13} \right | = \frac{-12}{13}

y = q_{2}y - \left | p_{2}y - q_{2}y \right | = \frac{4}{13} - \left | 1 - \frac{4}{13} \right | = \frac{-5}{13}

which yields

A( \vec{e_{2}} ) = \begin{bmatrix} \frac{-12}{13} \\ \frac{-5}{13} \end{bmatrix}

Finally, the matrix A : \mathbb{R}^{2} \to \mathbb{R}^{2} for the linear transformation which reflects points in the x-y plane across the line y = \frac{-2x}{3} is given by

A = \begin{bmatrix} \frac{5}{13} & \frac{-12}{13} \\ \frac{5}{13} & \frac{-5}{13} \end{bmatrix}

It turns out (although I’m not going to show to derivation here) that in general, the matrix for a linear transformation which reflects points in the x-y plane across an arbitrary line y = mx + b is given by

A = \begin{bmatrix} cos2\theta & sin2\theta \\ sin2\theta & -cos2\theta \end{bmatrix}

where \theta is the angle that the line makes with the positive x-axis, i.e

\theta = arctan(m) if m \geq 0

and

\theta = arctan(\left | m \right |) + \frac{\pi }{2} if m < 0

Be Sociable, Share!

Comments

3

ali

in the great world wide web finally i found it!
thanks for your single explanation !

Rae Hohle

Can you please show how to derive the general matrix for a linear transformation over y=mx+b?

Aidan Sproat

I wouldn’t spend too long looking for a reflection in the line y = mx + b… Since the origin is invariant under matrix transformation, and any invariant points must lie on the line of reflection, all matrix reflections of the plane must have an axis of reflection passing through the origin.

Leave your comment:
XHTML:You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> . * required