What's the slope of the mirrored line?

963 Views Asked by At

If I have line $M$ with slope $m$, and line $A$ with slope $a$, and I wish to mirror $A$ over $M$ to form some new line $B$, what is the slope of $b$?

3

There are 3 best solutions below

2
On BEST ANSWER

The slope of the mirrored line is $b=\frac{2m-a+am^2}{1+2ma-m^2}$. To get this result, I converted into angles (where the problem is easy) by using $\arctan$, and then converted back. I used some trig identities along the way. For example $\tan(\alpha-\beta)=\frac{\tan\alpha-\tan\beta}{1+\tan\alpha\tan\beta}$ and $\tan(2\alpha)=\frac{2\tan\alpha}{1-\tan^2\alpha}$.

Edited to correct typo.

2
On

First an answer based on elementary geometry and trigonometry.

Let $\mu$ be the angle from positive x-axis to line $M$ and $\alpha$ the angle from positive x-axis to line $A$, and $\beta$ for line $B$. The angle between $A$ and $M$ is $\mu-\alpha$, the angle between $B$ and $M$ is $\beta-\mu$, and by equating them you get $\beta=2\mu-\alpha$.

Now recall that slopes are the tangents of the corresponding angles, so $b=\tan(2*\tan^{-1}(m)-\tan^{-1}(a))$.


A better answer can be derived from linear algebra.

Let $M_1$ be the matrix of rotation that brings x-axis to line $M$, and $M_2$ the matrix of mirroring over x-axis. I am leaving for you to compute $M_1$ and $M_2$, this is an easy exercise.

Mirroring over line $M$ can be represented by the matrix $M_1\cdot M_2\cdot M_1^{-1}$.

The vector representing slope of $A$ is $(1,a)$ or anything proportional. Now multiply $(1,a)$ with $M_1\cdot M_2\cdot M_1^{-1}$ and the another vector $(b_1,b_2)$ that represents the direction of line $B$. The slope will be $b_2/b_1$.

EDIT: derivation of the matrix for mirroring over $M$.

$M_2$, mirroring over x-axis just changes sign of y-coordinate, so the matrix is $\left( \begin{array}{c} 1 & 0 \\ 0 & -1 \end{array} \right)$

$M_1$, the rotation from x-axis to $M$, is an orthogonal matrix obtained by moving $(1,0)$ to $(1/\sqrt{1+m^2},m/\sqrt{1+m^2})$, so the matrix is $\frac{1}{\sqrt{1+m^2}}\left( \begin{array}{c} 1 & -m \\ m & 1 \end{array} \right)$

$M_1^{-1}$ is obtained by transposition of $M_1$: $\frac{1}{\sqrt{1+m^2}}\left( \begin{array}{c} 1 & m \\ -m & 1 \end{array} \right)$

Now multiply them all and you get

$M_1\cdot M_2\cdot M_1^{-1}=\frac{1}{1+m^2}\left( \begin{array}{c} 1-m^2 & -2m \\ -2m & m^2-1 \end{array} \right)$

Finally, you need to find the image of the image of the vector $(1,a)$ under the above transformation. I'm dropping the constant factor because it's immaterial for the slope: $(1-m^2-2am,-2m+a(m^2-1))$.

So the slope of line $B$ is $\frac{-2m+a(m^2-1)}{1-m^2-2am}$.

0
On

EDIT: Sorry, I switched up the variables. Here, $M$ is reflected over $A$ instead of vice-versa.

Write $m=\tan\mu,a=\tan\alpha$. Let $\vec v=\begin{pmatrix}\cos\mu\\\sin\mu\end{pmatrix}$. By rotating by $-\alpha$, flipping the plane across $y=0$, then rotating back, we achieve the same purpose as simply flipping over $y=\alpha x$.

$$\begin{align} \begin{pmatrix}\cos\alpha&-\sin\alpha\\\sin\alpha&\cos\alpha\end{pmatrix}\begin{pmatrix}1&0\\0&-1\end{pmatrix}\begin{pmatrix}\cos\alpha&\sin\alpha\\-\sin\alpha&\cos\alpha\end{pmatrix}&=\begin{pmatrix}\cos\alpha&-\sin\alpha\\\sin\alpha&\cos\alpha\end{pmatrix}\begin{pmatrix}\cos\alpha&\sin\alpha\\\sin\alpha&-\cos\alpha\end{pmatrix}\\ &=\begin{pmatrix}\cos^2\alpha-\sin^2\alpha&2\sin\alpha\cos\alpha\\2\sin\alpha\cos\alpha&\sin^2\alpha-\cos^2\alpha\end{pmatrix}\\ &=\begin{pmatrix}\cos2\alpha&\sin2\alpha\\\sin2\alpha&-\cos2\alpha\end{pmatrix} \end{align}$$

Applying the transformation to $\vec v$:

$$ \begin{pmatrix}\cos2\alpha&\sin2\alpha\\\sin2\alpha&-\cos2\alpha\end{pmatrix}\begin{pmatrix}\cos\mu\\\sin\mu\end{pmatrix}=\begin{pmatrix}\cos\mu\cos2\alpha+\sin\mu\sin2\alpha\\\sin2\alpha\cos\mu-\cos2\alpha\sin\mu\end{pmatrix}=\begin{pmatrix}\cos(2\alpha-\mu)\\\sin(2\alpha-\mu)\end{pmatrix} $$

So the transformed vector has a slope of $$\begin{align}\tan(2\alpha-\mu)&=\tan(2\tan^{-1}a-\tan^{-1}m)\\ &=\tan\left(\tan^{-1}\left(\frac{2a}{1-a^2}\right)-\tan^{-1}m\right)\tag{1}\\ &=\frac{\frac{2a}{1-a^2}-m}{1+m\frac{2a}{1-a^2}}\tag{2}\\ &=\frac{ma^2+2a-m}{1+2a m-a^2}\\ &=-\frac{1}{m}\frac{(1-am)^2-(1+m^2)}{(m-a)^2-(1+m^2)}\end{align}$$

For $(2)$, we use the identity $\tan(x+y)=\frac{\tan x+\tan y}{1-\tan x\tan y}$. Note, then, that $$\tan(2\tan^{-1}x)=\tan(\tan^{-1}x+\tan^{-1}x)=\frac{x+x}{1-x\cdot x}=\frac{2x}{1-x^2}$$

So $2\tan^{-1}x=\tan^{-1}\frac{2x}{1-x^2}$