1
$\begingroup$

This question is regarding a detail in the calculation for an answer in the question Find a formula in terms of $a$, $b$ and $c$, for reflection in an arbitrary line $ax+by+c=0 \in R^2$.

The posted answer gives us a system of two linear equations, and while it seems straightforward I believe I'm missing a detail in the calculation and can't figure it out.

The system is:

$$ \begin{cases} y_1 - y_0 = \dfrac{b}{a}(x_1 - x_0) \\ a\left(\dfrac{x_0 + x_1}{2}\right) + b\left( \dfrac{y_0 + y_1}{2} \right) + c = 0 \end{cases} $$

The first equation is motivated by the fact that if we have some point $P(x_0, y_0) \in \Bbb{R}^2$ then we want the line going through $P$ and its reflection $P'$ to be orthogonal to the line $ax + by + c = 0$.

The second equation is motivated by the fact that we want the midpoint between $P$ and $P'$ to lie on the original line.

My approach is to first change each equation so that we may add or subtract the two equations to solve for $x_1$ or $y_1$ first.

Equation 1:

$$ \begin{align} y_1 - y_0 & = \dfrac{b}{a}(x_1 - x_0) \\ ay_1 - ay_0 & = b(x_1 - x_0) \\ bx_1 - ay_1 & = bx_0 - ay_0 \\ abx_1 - a^2 y_1 & = abx_0 - a^2 y_0 \end{align} $$

Equation 2:

$$ \begin{align} a\left( \dfrac{x_0 + x_1}{2} \right) + b\left( \dfrac{y_0 + y_1}{2} \right) + c & = 0 \\ a(x_0 + x_1) + b(y_0 + y_1) + 2c & = 0 \\ ax_1 + by_1 & = -ax_0 -by_0 -2c \\ abx_1 + b^2y_1 & = -abx_0 - b^2y_0 -2bc \end{align} $$

So now we have:

$$ \begin{cases} abx_1 - a^2y_1 = \phantom{-}abx_0 - a^2y_0 \\ abx_1 + b^2y_1 = -abx_0 -b^2y_0 -2bc \end{cases} $$

subtracting the two results in:

$$ (a^2 + b^2)y_1 = -2abx_0 + (a^2 - b^2)y_0 -2bc $$

My confusion stems from the fact that the correct answer for $y_1$ is:

$$ y_1 = -y_0 - \dfrac{2bc}{a^2 + b^2} $$

I've tried backtracking and putting that:

$$ -2abx_0 + (a^2 - b^2)y_0 = -(a^2 + b^2)y_0 $$

and get the result:

$$ y_0 = \dfrac{b}{a}x_0 $$

but I don't know where this came from.

Could anybody point out where I went wrong? I feel like I simply missed something but can't seem to find it. Thanks in advance.

$\endgroup$
2
  • $\begingroup$ It’s no wonder you’re confused since the final solution in that answer you linked is incorrect. It’s easy to verify that the point doesn’t lie on the perpendicular through $(x_0,y_0)$ as it should. $\endgroup$
    – amd
    Commented Apr 12, 2020 at 5:00
  • $\begingroup$ Incidentally, there’s a more illuminating way to write the resulting formula for the reflection: $(x_0,y_0)-2{ax_0+by_0+c\over a^2+b^2}(a,b)$. $\endgroup$
    – amd
    Commented Apr 12, 2020 at 5:02

1 Answer 1

1
$\begingroup$

Your derivation is correct and the solution for $y_1$ is

$$ y_1 =\frac{ -2b(ax_0 +c)+ (a^2 - b^2)y_0}{a^2 + b^2} $$

Note that, if $P(x_0,y_0)$ is on the given line, i.e. $ax_0+c=-by_0$, substitute into above solution to get $y_1=y_0$, i.e. the reflection is itself as expected. (The answer given is incorrect.)

$\endgroup$
2
  • $\begingroup$ Thanks for the answer! Just to be sure, the answer that I wrote for $y_1$ is incorrect right? I had a hunch because I simply couldn't make out the answer no matter what I did. $\endgroup$
    – Sean
    Commented Apr 12, 2020 at 3:37
  • 1
    $\begingroup$ @Seankala - you are correct up to the point $ (a^2 + b^2)y_1 = -2abx_0 + (a^2 - b^2)y_0 -2bc $ $\endgroup$
    – Quanto
    Commented Apr 12, 2020 at 3:40

You must log in to answer this question.

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