Reflection over a line $y= ax + b$ - How to find the according point?

1.2k Views Asked by At

Let's take a point $E = (x_A, y_A)$ and line $p: Ax+By+C=0$ Let's find the reflection point of point $E$ over the line $p$

  1. I find the equation of a line perpendicular to $p$ and passing through point E
  2. I find the distance between $E$ and $p$: $d(E,p)$
  3. I solve the equation $$d(E,p)=\frac{|Ax_A +B(x_A+m)+C|}{\sqrt{A^2+B^2}}$$

Is there a more effective way to reflect a point around a line?

2

There are 2 best solutions below

0
On
  1. Take a point on the line, for example, $P\colon (0,-\frac{C}{B})$ or $(-\frac{C}{A},0)$.
  2. Find the projection of the vector $\vec{PE}$ on the normal vector $\vec{n}=(A,B)$ using the scalar product $$ \vec{u}=\frac{\vec{PE}\cdot \vec{n}}{|\vec{n}|^2}\,\vec{n}. $$
  3. The reflection point of $E$ is $E'=E-2\vec{u}$. enter image description here
0
On

A small modification to your method will do the trick. To reflect a point in a line, you need to reverse its orthogonal rejection from the line.

Recall that, for the line $Ax+By+C=0$, the vector $(A,B)$ is normal to the line. The signed quantity $${Ax_A+By_A+C\over\sqrt{A^2+B^2}}$$ gives the distance from the line to $E$ in the direction of this normal, so that the orthogonal rejection of $E$ from the line is $$E_\perp={Ax_A+By_A+C\over A^2+B^2}(A,B).$$ The reflection of $E$ in the line is then $E-2E_\perp$.

This is essentially what $А.Г.$ proposes in his answer, except that this doesn’t require knowing any points on the line.