3
$\begingroup$

I am trying to remember how to compute the symmetric point to an $(x=a,y=b)$ point with respect to a line, i.e. $y=mx +b$, without luck.

Is there a closed form equation for this type of transformation?

As an example, we can consider $(5,10)$ w.r.t the line $y=-x$.

$\endgroup$

1 Answer 1

3
$\begingroup$

Yes. Let $p$ be the point, $v$ be the vector of the line's direction, and $c$ be any point on the line.

First, take the vector $p-c$ and compute its component $n$ orthogonal to the line:

$$n = (p-c) - \frac{(p-c)\cdot v}{\|v\|^2}v$$

Now reflect $p$ about the line by subtracting twice $n$ from it, to get the reflected point $r$:

$$r = p - 2n.$$


Addendum: in the case your line is in slope-intercept form, you can take $c = (0,b)$ and $v = (1,m)$.

For your example we have $b=(0,0)$ and $p-b = (5,10)$. Since $v=(1,-1)$ we get $$n = (5,10) - \frac{-5}{2}(1,-1) = (15/2, 15/2).$$

Finally $$p-2n = (-10, -5).$$

$\endgroup$
2
  • $\begingroup$ Thanks! I wonder if there is any way to could quickly check this for the example I provided. Perhaps in mathematica? $\endgroup$
    – Josh
    Jan 13, 2015 at 18:42
  • 2
    $\begingroup$ @Josh Added a worked example $\endgroup$
    – user7530
    Jan 13, 2015 at 18:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .