Functions & Transformations

horizontal shift

A horizontal shift slides a graph left or right without altering its shape. Like the vertical shift, every point moves the same distance — but this time the motion is sideways rather than up and down.

You produce it by changing the input inside the function. The graph of f(x - h) is the graph of f(x) moved h units to the right when h is positive, and to the left when h is negative. The catch is that it goes the opposite way from how it reads: subtracting moves the graph right, and adding moves it left.

Why the reversal? The new graph reaches the old output only when its input has caught up by h. To get the same value the original had at x, you now need x - h to equal that old input, so you must move further right. This sign flip is one of the most common stumbling blocks in graphing, so it is worth pausing on.

y = (x - 2)^2 is y = x^2 shifted 2 units right; the vertex moves from (0, 0) to (2, 0).

Change the input, move left or right.

Counterintuitive but true: f(x - 3) moves the graph right, and f(x + 3) moves it left. The shift opposes the sign you see.

Also called
horizontal translation左右平移左右平移