How to find the equation of the graph reflected about a line?

Consider the graph of $y = e^x$

(a) Find the equation of the graph that results from reflecting about the line $y = 4$.

(b) Find the equation of the graph that results from reflecting about the line $x = 5$.

I get that in order for the equation to reflect about the $y$-axis, the function would have to be $y= – e^x$, and also for it to reflect about the $x$-axis the function should be something like $y= e^{-x}$.

But what to do when a line is not one of the coordinate axes?

Solutions Collecting From Web of "How to find the equation of the graph reflected about a line?"

Since we only know how to reflect about the $x$ or $y$ axis, we’re going to have to reduce the given problem to a simpler problem. Notice that reflecting about the line $y = 4$ is equivalent to:

  • Translating $4$ units down.
  • Reflecting about the $x$-axis.
  • Translating $4$ units up.

So we get:
\begin{align*}
\boxed{y = e^x}
&\xrightarrow{~~~~\text{subtract }4~~~~~} \boxed{y = e^x – 4} \\
&\xrightarrow{\text{multiply by }-1} \boxed{y = 4 – e^x} \\
&\xrightarrow{~~~~~~~~~\text{add }4~~~~~~~~} \boxed{y = 8 – e^x} \\
\end{align*}
See if you can do something similar for the other problem.

Use the reflection formula:
$$\frac{x’-x}a=\frac{y’-y}b=\frac{-2(ax+by+c)}{a^2+b^2}\quad\text{for line }ax+by+c=0$$
Case A:

Line is $y-4=0$:
$$\frac{x’-x}0=\frac{y’-y}1=\frac{-2(y-4)}{1}$$
where a convention is to take $0/0$ which is a result of the derivation.
$$\implies x’=x,y’=8-y$$
So curve becomes:
$$y’=8-e^{x’}\equiv y=8-e^x$$

Case B:

Line is $x-5=0$:
$$\frac{x’-x}1=\frac{y’-y}0=\frac{-2(x-5)}{1}$$
where a convention is to take $0/0$ which is a result of the derivation.
$$\implies x’=10-x,y’=y$$
So curve becomes:
$$y’=e^{10-x’}\equiv y=e^{10-x}$$

Case C:

Let the line be $2x+3y+4=0$:
$$\frac{x’-x}2=\frac{y’-y}3=\frac{-2(2x+3y+4)}{13}$$
$$\implies x’=\frac1{13}(5x-12y-16), y’=\frac1{13}(-12x-5y-24)$$
Or:
$$x=\frac1{13}(5x’-12y’-16),y=\frac1{13}(-12x’-5y’-24)$$
So curve becomes:
$$\large (-12x’-5y’-24)=13e^{(5x’-12y’-16)/13}\\\large \equiv -12x-5y-24=13e^{(5x-12y-16)/13}$$
enter image description here

Adding to @Adriano’s answer, if you want to reflect $y=f(x)$ across $y=mx+b$ you have to reflect the function by the x-axis and then rotate it by $\theta=\pi+2\tan^{-1}(m)$ radians.

So if we have $y=f(-x)$, then by using the rotation matrix in linear algebra, we can set $x=x’\cos(\theta)+y’\sin(\theta)$ and $y=y’\cos(\theta)-x’\sin(\theta)$.

So the reflection over $y=mx$ equals

$$\left(\frac{2m}{2m^2+1}x’-\frac{1-m^2}{m^2+1}y’\right)=f\left(-\left(-\frac{2m}{m^2+1}y’-\frac{1-m^2}{m^2+1}x’\right)\right)$$

A better explanation for this formula is shown here.

Then with $b$, you have to shift $y=f(-x)$ down $b$ vertically to get $(y+7)=f(-x)$. Then after the rotation, the rotated function should be shifted up vertically by seven. Thus the final formula is

$$\left(\frac{2m}{2m^2+1}x’-\frac{1-m^2}{m^2+1}(y’-b)+b\right)=f\left(\frac{2m}{m^2+1}(y’-b)+\frac{1-m^2}{m^2+1}x’\right)$$

Now substitute $f(x)=e^{-x}$