<s>[INST] Finding the reflection that reflects in an arbitrary line y=mx+b How can I find the reflection that reflects in an arbitrary line, $y=mx+b$
I've examples where it's $y=mx$ without taking in the factor of $b$
But I want to know how you can take in the factor of $b$
And after searching through for some results, I came to this matrix which i think can solve my problems. But it doesn't seem to work.
$$
\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} =
\begin{bmatrix}
\frac{1-m^2}{1 + m^2} & \frac{-2m}{1 + m^2} & \frac{-2mb}{1 + m^2} \\
\frac{-2m}{1 + m^2} & \frac{m^2-1}{1 + m^2} & \frac{2b}{1 + m^2} \\
0 & 0 & 1
\end{bmatrix}
\begin{bmatrix} x \\ y \\ 1 \end{bmatrix}.
$$
The example I tried to use using this matrix is
the point $(0,8)$ reflected on $y=-\frac{1}{2}x+2$.
The result I get from that matrix is $[6.4,-0.6,0]$.
The actual answer should be $[-4.8, -1.6]$ , according to Geogebra
 [/INST] Geometrical Approach:
In general (see derivation), when a given point $P(x_0, y_0)$ is reflected about the line: $y=mx+c$ then the co-ordinates of the point of reflection $P'(x', \ y')$ are calculated by the following formula 
$$\color{blue}{(x', y')\equiv \left(\frac{(1-m^2)x_0+2m(y_0-c)}{1+m^2}, \frac{2mx_0-(1-m^2)y_0+2c}{1+m^2}\right)}$$ 
now, the point of reflection of $(0, 8)$ about the given line: $y=-\frac{1}{2}x+2$ is calculated  by setting the corresponding values, $x_0=0, \ y_0=8, \ m=-\frac{1}{2}$ & $c=2$ as follows$$\left(\frac{(1-\left(-\frac{1}{2}\right)^2)(0)+2\left(-\frac{1}{2}\right)(8-2)}{1+\left(-\frac{1}{2}\right)^2}, \frac{2\left(-\frac{1}{2}\right)(0)-(1-\left(-\frac{1}{2}\right)^2)(8)+2(2)}{1+\left(-\frac{1}{2}\right)^2}\right)\equiv\left(\frac{-24}{5}, \frac{-8}{5}\right)\equiv \color{red}{(-4.8, \ -1.6)}$$ 
So the answer $[-4.8, -1.6]$ according to Geogebra is correct. 
</s>