Explaining Horizontal Shifting and Scaling

20.7k Views Asked by At

I always find myself wanting for a clear explanation (to a college algebra student) for the fact that horizontal transformations of graphs work in the opposite way that one might expect.

For example, $f(x+1)$ is a horizontal shift to the left (a shift toward the negative side of the $x$-axis), whereas a cursory glance would cause one to suspect that adding a positive amount should shift in the positive direction. Similarly, $f(2x)$ causes the graph to shrink horizontally, not expand.

I generally explain this by saying $x$ is getting a "head start". For example, suppose $f(x)$ has a root at $x = 5$. The graph of $f(x+1)$ is getting a unit for free, and so we only need $x = 4$ to get the same output before as before (i.e. a root). Thus, the root that used to be at $x=5$ is now at $x=4$, which is a shift to the left.

My explanation seems to help some students and mystify others. I was hoping someone else in the community had an enlightening way to explain these phenomena. Again, I emphasize that the purpose is to strengthen the student's intuition; a rigorous algebraic approach is not what I'm looking for.

12

There are 12 best solutions below

5
On BEST ANSWER

Here is a setting where the students will have experience, having nothing to do with skills in algebra: daylight savings time (since you're in the USA). When we advance clocks ahead by an hour we lose an hour of sleep. Thus replacing $t$ with $t+1$ shifts your schedule for the day back by one hour.

Here, $t$ is the old "function" and $t + 1$ is the new "function". $t$ is one hour behind $t + 1$, but after this transformation, $t + 1$ shortens the day by one hour. So in the end, we lose an hour. Point out to the students that it also works the other way when we turn the clocks back ($t$ is replaced with $t-1$) and then gain an hour in our schedule.

5
On

Intuitively, the graph of $f(x+1)$ is horizontally shifted to the left because the coordinate system itself is shifted to the right. Likewise, the graph of $f(2x)$ is shrunk horizontally because the coordinate system is stretched by a factor of $2$.

0
On

Well we replaced everywhere $x$ by $x'=x+1$, $x'=2x$ or whatever so that the 'old' variable $x$ was shifted by $-1$ ($x=x'-1$), divided by $2$ or whatever. Of course you'll have to convince yourself first! :-)

To expand a bit (and considering Oenamen's comment) I'll add that you may use the physical concept of Active and passive transformation :

  • $f(x)\to f(x)+1$ is an active transformation : in a fixed frame the curve became higher of a unit

  • $f(x)\to f(x+1)$ is a passive transformation : the frame of reference changed (that's the case of interest for you : the old frame moved one unit left)

0
On

What does the graph of $g(x) = f(x+1)$ look like? Well, $g(0)$ is $f(1)$, $g(1)$ is $f(2)$, and so on. Put another way, the point $(1,f(1))$ on the graph of $f(x)$ has become the point $(0,g(0))$ on the graph of $g(x)$, and so on. At this point, drawing an actual graph and showing how the points on the graph of $f(x)$ move one unit to the left to become points on the graph of $g(x)$ helps the student understand the concept. Whether the student absorbs the concept well enough to utilize it correctly later is quite another matter.

4
On

The map $f$ already assigns $\color{Purple}{\sigma x\mapsto f(\sigma x)}$. In order to construct the assignment $\color{DarkBlue}x\mapsto \color{DarkOrange}{f(\sigma x)}$, we must apply the inverse $\sigma^{-1}$ in order to put $f(\sigma x)$ (originally located at $\sigma x$) "back" to $x$, that is

$$(\sigma^{-1},\,\mathrm{Id}):\big(\sigma x,f(\sigma x)\big)\mapsto \big(x,f(\sigma x)\big).$$

The above is, of course, too algebraic. So here's a colorful depiction of what's going on:

$\hskip 1in$ pic

As we can see, "putting it back over the $x$-value" does the inverse of the transform to the actual graph (squiggly line) of $f$.

0
On

In a basic way, I'm not sure that there's much that you can do here beyond just plotting points. For example, you could draw a graph of $y=\sqrt{x}$ by plotting a few points, and then draw a graph of $y=\sqrt{x-3}$ by plotting the corresponding points. After you draw the graphs, you can observe that one is obtained by translating the other.

Ultimately, I don't think this has a simple conceptual explanation -- it's just a phenomenon that you observe when you start drawing graphs. It's almost closer in character to a scientific fact than a mathematical fact.

That doesn't mean that there's nothing to teach here. The important thing is that students should understand how the result was obtained, and should be able to re-derive it for themselves if they need it. If I were teaching precalculus, I would give the students challenges like drawing graphs of $f(x^2)$ and $f(x)^2$ from the graph of $f(x)$. The reasoning is essentially the same as for shifting and scaling, and it will help them to improve their overall understanding of graphs.

0
On

After whacking my head for a rather irksome period, I've concluded this is an error in our perception. It's deceptively natural to see the $+$ and immediately think that the graph tends toward the positive, rather than the negative. I think this is one of those cases of mathematical notation gone wrong. Rather than encouraging correct patterns, it is encouraging incorrect patterns.

It's just like how, without knowing any better, one may presume that: $\lim_{x \to 0^{+}}f(x)$ is intuitively the value that $f(x)$ approaches as one approaches $0$ from the right to the left (i.e. it gets big as it comes toward $0$, or more positive) rather than the fact that it actually comes from the left to the right (i.e. it gets smaller as it comes toward $0$ or more negative*). Pardon me if that choice of words is rather confusing; it's more emphatic of how confusing our notation is with regard to 'left' and 'right'.

In short, I don't think there is an adequate intuitive justification for this deceptive notation.

(*=Don't take the phrases "more postive" and "more negative" too seriously in this context. They respectively indicate, "closer to positive numbers" and "closer to negative numbers".)

1
On

I'm not sure how effective this will be for a kid these days, but this was how I managed to grasp it when I was once one.

I find that scaling and shifting is a lot more natural when one considers parametric equations. Given some curve

$$\begin{align*}x&=f(t)\\y&=g(t)\end{align*}$$

we find adding a nonnegative quantity to either component does the expected shift behavior:

$$\begin{align*}x&=h+f(t)\\y&=k+g(t)\end{align*}$$

with $h,k \geq 0$ shifts $h$ units to the right and $k$ units upwards (negative $h,k$ of course does the opposite direction); and

$$\begin{align*}x&=c\,f(t)\\y&=c\,g(t)\end{align*}$$

with $c > 0$ scales the curve as expected.

(Note that the matrix-vector treatment also works here; the first bit is adding a translation vector, and the second bit is multiplication of a vector by a diagonal scaling matrix.)

Now, letting $f(t)=t$ (thus yielding a trivial set of parametric equations for $y=g(x)$), and eliminating variables, we then have this strange artifact of this natural transformation:

$$\begin{align*}x&=h+t\\y&=k+g(t)\end{align*}$$

$$\begin{align*}x-h&=t\\y&=k+g(t)\end{align*}$$

and eliminating the parameter gives

$$y=k+g(x-h)$$

and that's where the minus sign in shifting an explicit form horizontally comes from.

For scaling, we have

$$\begin{align*}x&=ct\\y&=c\,g(t)\end{align*}$$

$$\begin{align*}\frac{x}{c}&=t\\y&=c\,g(t)\end{align*}$$

from which we can obtain

$$y=c\,g\left(\frac{x}{c}\right)$$

and that's why we have to divide instead of multiplying when scaling horizontally in explicit form.

0
On

You should change variables when changing the coordinate system! x + 1 is confusing because you're re-using the variable. x is already used for representing our "home base" frame of reference.

For instance, pick the symbols s and t, and change to the coordinate system:

let s = x + 1
let t = y + 3

Now this does not mean we are moving up and to the right!

Think: where is the origin of the <s, t> coordinate system in the <x, y> coordinate system? It is at <-1, -3>, because we have to solve by setting <s, t> to <0, 0>; i.e. solve x + 1 = 0 and y + 3 = 0.

The <x, y> system must remain our frame of reference if we are to visualize the motion, and so what we do is rework the equations to isolate x and y:

x = s - 1
y = t - 3

Now you can see that it's a move left and down and this is consistent with the minus signs.

The "backwards" issue arises when you put yourself into the frame of reference of the transformation, but continue using <x, y> to think about that frame. You have to think about the backwards mapping: how do you recover <x, y> from that other frame of reference?

When you see x + 1, you must not imagine that x is moving. (This may be "brain damage" from working in imperative computer programming languages, especially ones like C and BASIC where the = sign is used for assignment: x = x + 1 moves coordinate x to the right.) Rather, x is used as the input to a calculation that produces some other value. And so x is that other value, minus 1.

If I say my money = your money + 1 are you richer than me? No, you're poorer by a dollar! That's easy to see because when the variables have these names, of course you instantly and intuitively put yourself into the your money frame of reference, and easily see that although 1 is being added to your money, the result of that formula expresses my money and not yours! Haha.

0
On

When I shift the graph of $f$ one unit to the right I create a new function $g$. To find out the value $g(x)$ I have to look what the value of $f$ was one unit to the left of $x$. therefore $g(x):=f(x-1)$.

2
On

Enter, the Function Monkey ...

As described in the link, to plot a graph, simply imagine the $x$-axis covered in coconuts, one for every $x$ value, like this:

$$\cdots \quad (-3\;) \quad \color{#9509A5}{(-2\;)} \quad \color{green}{(\;-1\;)} \quad \color{red}{[\;0\;]} \quad \color{ #2B87CD}{(\;1\;)} \color{#D86907}{\quad (\;2\;)} \quad (\;3\;) \quad \cdots$$

with "$\color{red}{[\;\cdot\;]}$" indicating the coconut at the origin. The Function Monkey strolls along the axis, picks up each $x$ coconut, evaluates the corresponding $y$ value (as is his wont), and throws the coconut to the appropriate height (or depth). Graph plotted!

But, wait! No one ever said that the values of the coconuts were required to match the values of the $x$ coordinates which have been coloured for convenience. Hmmmm ...

If the coconut at (the coloured) location $x$ has value $x+1$, then the row of coconuts looks like this: $$\cdots \quad (-2\;) \quad \color{#9509A5}{(\;-1\;)} \quad \color{green}{(\;0\;)} \quad \color{red}{[\;1\;]} \quad \color{ #2B87CD}{(\;2\;)} \color{#D86907}{\quad (\;3\;)} \quad (\;4\;) \quad \cdots$$

Importantly, the coconut locations in colour have not changed. The coconuts still sit on the axis at locations $x = \cdots, -3, \color{#9509A5}{-2},\color{green}{-1}, \color{red}{0},\color{#2B87CD}{1}, \color{#D86907}{2}, 3, \cdots$ still indicating the coconut at the origin.

So far as the Function Monkey is concerned, adding $1$ to each coconut value has effectively shifted the row of coconuts to the left. (Likewise, adding $-1$ to each coconut value effectively shifts the row of coconuts to the right.) Since the Function Monkey throws coconuts vertically, the plotted graph shifts the same way.

In a similar manner, multiplying each (original) coconut value by $2$ yields this row of coconuts:

$$\cdots \quad (-6\;) \quad \color{#9509A5}{(-4\;)} \quad \color{green}{(-2\;)} \quad \color{red}{[\;0\;]} \quad \color{ #2B87CD}{(\;2\;)} \color{#D86907}{\quad (\;4\;)} \quad (\;6\;) \quad \cdots$$

Again, the locations of the coconuts haven't changed, but we see that the span of coconut values from $-6$ to $6$ has been compressed into the space between locations $x=-3$ and $x=3$. The graph will exhibit the same, horizontal, compression.


A plot-less way of thinking about this, which is close to your "head start" interpretation, is that "$f(x+1)$" fools Function Monkey $f$ into thinking that each input value is one unit bigger than it really is. Similarly "$f(2x)$" fools him into thinking that each input is twice its actual size. The effective changes in output values correspond to the Function Monkey's altered perceptions.

0
On

Not sure if this works in every situation but...

Say you have function f(x) = X^2 with domain [-1,1]

and function g(x) = f(x + 1)...

The correct domain for g(x) should be [-2,0]

One can arrive at this conclusion using the domain of f(x)

x + 1 = -1 => x = -1 - 1 => x = -2.

and similarly...

x + 1 = 1 => x = 1 - 1 => x = 0

Giving you the domain for g(x) = [-2, 0]