25.3k views
4 votes
Find the reflection of the point (x,y) in the line y=mx+c​

User Abdur
by
4.0k points

1 Answer

1 vote

Answer:


\displaystyle \left((-(m^(2)-1)\, x + 2\, m\, y - 2\, m \, c)/(m^(2) + 1),\, ((m^(2) - 1)\, y + 2\, m \, x + 2\, c)/(m^(2) + 1)\right).

Explanation:

Consider the line that is perpendicular to
y = m\, x + c and goes through
(x,\, y).

Both
(x,\, y) and the reflection would be on this new line. Besides, the two points would be equidistant from the intersection of this new line and line
y = m\, x + c.

Hence, if the vector between
(x,\, y) and that intersection could be found, adding twice that vector to
(x,\, y)\! would yield the coordinates of the reflection.

Since this new line is perpendicular to line
y = m\, x + c, the slope of this new line would be
(-1/m).

Hence,
\langle 1,\, -1/m\rangle would be a direction vector of this new line.


\langle m,\, -1\rangle (a constant multiple of
\langle 1,\, -1/m\rangle would also be a direction vector of this new line.)

Both
(x,\, y) and the aforementioned intersection are on this new line. Hence, their position vectors would differ only by a constant multiple of a direction vector of this new line.

In other words, for some constant
\lambda,
\langle x,\, y \rangle + \lambda\, \langle m,\, -1 \rangle = \langle x + \lambda \, m,\, y - \lambda \rangle would be the position vector of the reflection of
(x,\, y) (the position vector of
(x,\, y)\! is
\langle x,\, y \rangle.)


( x + \lambda \, m,\, y - \lambda ) would be the coordinates of the intersection between the new line and
y = m\, x + c.
\lambda\, \langle m,\, -1 \rangle would be the vector between
(x,\, y) and that intersection.

Since that intersection is on the line
y = m\, x + c, its coordinates should satisfy:


y - \lambda = m\, (x + \lambda \, m) + c.

Solve for
\lambda:


y - \lambda = m\, x + m^(2)\, \lambda + c.


\displaystyle \lambda = (y - m\, x - c)/(m^(2) + 1).

Hence, the vector between the position of
(x,\, y) and that of the intersection would be:


\begin{aligned} & \lambda\, \langle m,\, -1 \rangle \\= \; & \left\langle (m\, (y - m\, x - c))/(m^(2) + 1),\, ((-1)\, (y - m\, x - c))/(m^(2) + 1)\right\rangle \\ =\; &\left\langle (-m^(2)\, x + m\, y - m\, c )/(m^(2) + 1),\, (-y + m\, x + c)/(m^(2) + 1)\right\rangle \end{aligned}.

Add twice the amount of this vector to position of
(x,\, y) to find the position of the reflection,
\langle x,\, y \rangle + 2\, \lambda \,\langle m,\, -1 \rangle.


x-coordinate of the reflection:


\begin{aligned} & x + 2\, \lambda\, m \\ = \; & x + (-2\, m^(2)\, x + 2\, m \, y - 2\, m \, c)/(m^(2) + 1) \\ =\; & (-(m^(2) - 1) \, x + 2\, m \, y - 2\, m \, c)/(m^(2) + 1)\end{aligned}.


y-coordinate of the reflection:


\begin{aligned} & y + (-2\, \lambda)\\ = \; & y + (- 2\, y + 2\, m\, x + 2\, c)/(m^(2) + 1) \\ =\; & ((m^(2) - 1) \, y + 2\, m \, x + 2\, m \, c)/(m^(2) + 1)\end{aligned}.

User Dolly Aswin
by
4.5k points