eli5: Why does y=f(x+2) move it two units to the left (not right)?

226 views

This is also the case where y=f(2x) where it dilates by a factor of 1/2. Why are they seemingly the opposite of what intuition tells me?

Edit:
Thanks guys 🙂 got it.

In: 0

5 Answers

Anonymous 0 Comments

y=x

When x=0, y=0
When x=1 , y=1
When x=2, y=2
When x=3, y=3
When x=4, y=4

____
y=x+2

When x=-2, y=0
When x=-1, y=1
When x=0, y=2
When x=1, y=3
When x=2, y=4

As such, y=(x+2) lets y achieve its outputs 2 units sooner than y=x does, and sooner is on the left.

____

y=2x

When x=0, y=0
When x=0.5, y=1
When x=1, y=2
When x=1.5, y=3
When x=2, y=4

As such, y=2x lets y achieve its outputs 2 times sooner (or reciprocal: 1/2 the x value) than y=x does, the graph looks like horizontal compression as a result.

Note: For linear functions (and quadratics centered at the origin), a horizontal compression is the same thing as a vertical stretch. A vertical stretch is what I would typically say in this case (y values being twice as large for the same input), it just happens that it can also be looked at as a horizontal compression. For more complex stuff (say a sine/cosine wave), they are not related and f(2x) would be a horizontal compression and 2f(x) would be a vertical stretch.

You are viewing 1 out of 5 answers, click here to view all answers.