# Shifting the graph of a function

I have a conceptual problem.

If the graph of a function $$f(x)$$ has to be horizontally shifted to the right by $$a$$ units, then the new graph is $$f(x-a)$$.

However, if the graph has to be reflected about a vertical line, e.g. $$x=3$$, then the graph needs to be translated by $$3$$ units to the left, reflected and shifted back to the right by $$3$$ units (as described here). According to the rule above, the new graph should be $$f(x) \rightarrow f(x+3) \rightarrow f(-x-3) \rightarrow f(-x-3-3)=f(-x-6)$$ This is wrong, and the right answer $$f(6-x$$) can only be achieved by switching the operations $$±3$$ for translating to the left and to the right.

Could someone enlighten me?

Shifting right by $$a$$ units is a substitution $$x\to x-a$$. This substitution does not affect anything outside the $$x$$'s. Similarly, reflection about the $$y$$-axis is a substitution $$x\to-x$$, again not affecting other symbols.
Thus the reflection about $$x=3$$ proceeds $$f(x)\to f(x+3)\to f(-x+3)\to f(-(x-3)+3)=f(6-x)$$
• How would the transformation look like if I would have to reflect the graph $y=f(x)$ about a line parallel to the x-axis, e.g. $y=3$? You would have to shift down by 3, reflect, and shift up again. I would then have $$y\to y-3\to -y-3\to -(y+3)-3 = -y-6$$, as $y-3$ shifts down and $y+3$ shifts up. This is wrong, so where is my mistake this time? – FizzleDizzle Oct 7 '18 at 9:12
• @FizzleDizzle $y$-axis transformations affect the entire expression (i.e. they are applied after applying the meat of the function to be transformed, in contrast to $x$-axis transformations, which are applied before). – Parcly Taxel Oct 7 '18 at 11:44
• Ah ok. So $$y\to y-3\to -y+3\to -y+3+3 = -y+6$$ would be correct? – FizzleDizzle Oct 7 '18 at 12:37
Let $$x'$$ be a reflection of $$x$$ wrt. the axis $$x=3$$. Then the arithmetic mean of $$x$$ and $$x'$$ is $$3$$, so $$\frac{x+x'}{2}=3$$, hence $$x'=6-x.$$ Therefore the image of the curve $$y=f(x)$$ under this reflection is $$y=f(6-x).$$