5
$\begingroup$

This problem came up while discussing using a simplex to solve systems of equations.
(By the way, yes, this is very similar to this one.)

Given three points, how do I find the location of the point that results from reflecting one of them over the line between the other two?

This is what I mean:
Whoohoo MS Paint! :P

How do I find $C'$?

  • 0
    Why are you answering your own question, immediately after it's asked? Perhaps you should go ahead an accept your own answer?2011-05-25
  • 1
    @mixedmath: http://meta.math.stackexchange.com/questions/2244/answering-own-question-ahead-of-time2011-05-25
  • 0
    That's interesting. Having read through that topic and the one referenced, I suppose I just thought along the same lines as Pete Clark with respect to questions where the OP knows the answer. Thank you for the explanation.2011-05-25
  • 0
    @mixedmath: You're welcome. :)2011-05-25
  • 1
    @mixedmath: look at [El'endia's profile](http://math.stackexchange.com/users/10537/elendia-starman)... Quite an awesome youthful grandma (or -pa?!) we have here :)2011-05-25
  • 0
    @Theo: [guffaw] For starters, I'm male. The name is a pseudonym that happens to end in an "a"... :P Also, 91 was the oldest I could get it to go. :P2011-05-25

1 Answers 1

5

For reference:
WHOOHOO More MS Paint! :P

Let...
$\vec{P} = \langle x-a, y-b \rangle$
$\vec{Q} = \langle c-a, d-b \rangle$
$\theta = \text{ the angle between } \vec{P} \text{ and } \vec{Q}$

First off, let's start with projecting $\vec{P}$ onto $\vec{Q}$. In math...

$\vec{K} = \text{Proj}_{\vec{Q}} \vec{P} = \displaystyle \frac{\vec{P} \cdot \vec{Q}}{||\vec{Q}||^2} \vec{Q}$

This gives us the vector $\vec{K}$ that goes from $A$ to the "intersection" of the two lines $\overline{AB}$ and $\overline{CC'}$. To find the vector from $C$ to that intersection, simply subtract $\vec{K}$ from $\vec{P}$. You can then multiply this vector by two and add to $C$ to get $C'$, or in other words $2(\vec{K}-\vec{P}) + \vec{P}$. This is equivalent to $2\vec{K}-\vec{P}$. Substituting the formula for $\vec{K}$ back in gives:

$\vec{P'} = \displaystyle 2\frac{\vec{P} \cdot \vec{Q}}{||\vec{Q}||^2} \vec{Q} - \vec{P}$

You can now add $\vec{P'}$ to $A$ to get $C'$. That sufficient for your needs?

  • 0
    Plenty sufficient for mine, in fact. Nice question and answer!2011-05-25
  • 1
    By the way: did you ever try [GeoGebra](http://www.geogebra.org/cms/)? After a short while of getting used to it, you can create quite awesome pictures with that.2011-05-25
  • 0
    @Theo: Oh cool! Definitely gonna check that out! :D2011-05-25
  • 1
    Maybe it is interesting for you that your approach can be generalized to the reflection at planes in arbitrary dimensions. It is known (at least numerical people) as [Householder transformation](http://en.wikipedia.org/wiki/Householder_transformation).2011-05-25
  • 0
    @Fabian: Sweet! Always nice to have an approach that is generalizable. :D2011-05-25