So, I know that the formula for a generic point is $$\left(\frac{1-m^2}{1+m^2}x + \frac{2m}{1+m^2}(y-b), \left(\frac{2m}{1+m^2}\right)x - \left(\frac{1-m^2}{1+m^2}\right)(y-b)+b\right)$$ when you reflect it over the line $y=mx+b$. It's straightforward enough to derive that with complex mappings.
I need to derive the same result using the dot product and the projection of vectors in $\mathbb{R}^2$. I'd really appreciate any help on this. Thanks!
Let's m <> Infinity (otherwise we have to use another line description). P=(px, py) is point to reflect, P0=(x0, y0) is projection of P point to the line. Vector PP0 is perpendicular to direction vector of the line (1, m), so scalar product of these vectors is zero:
Solve this equation against x0, then find
y0 = m * x0 + b, then calculate reflection point