<s>[INST] reflecting a function about a line Say you have a function $f(x)$ and a line $g(x)=ax+b$. How do you reflect $f$ about $g$?
I am apparently supposed to write more text, but the line above is all I am after, hence I wrote this sentence as well.
 [/INST] Represent the graph of f parametrically by $x=t, y=f(t)$.  
If we reflect the point $(t, f(t))$ in the line $y=ax+b$ to get the point $(x,y)$, then
$\color{red}{y-f(t)=-\frac{1}{a}(x-t)}$ 
since the line and the line segment between $(t, f(t))$ and $(x,y)$ are perpendicular to each other.
We also have that $\frac{y+f(t)}{2}=a\left(\frac{x+t}{2}\right)+b$ and therefore $\color{red}{y+f(t)=a(x+t)+2b}$ 
since the midpoint of the line segment lies on the line.
Subtracting these equations gives $2f(t)=ax+at+\frac{1}{a}x-\frac{1}{a}t+2b=\left(\frac{a^2+1}{a}\right)x+\left(\frac{a^2-1}{a}\right)t+2b$,
and solving for x gives $\displaystyle \color{blue}{x=\frac{1-a^2}{1+a^2}t+\frac{2a}{a^2+1}\left(f(t)-b\right)}$.
Solving for x in the first equation gives $-ay+af(t)=x-t$ and so $\color{red}{x=-ay+af(t)+t}$.
Substituting into the second equation gives 
$y+f(t)=a\big(-ay+af(t)+2t\big)+2b=-a^2y+a^2f(t)+2at+2b,$ and solving for y gives
$(a^2+1)y=(a^2-1)f(t)+2(at+b)$ so $\displaystyle\color{blue}{y=\frac{a^2-1}{a^2+1}f(t)+\frac{2}{a^2+1}(at+b)}$.
</s>