Often when given a problem, we try to model the scenario using mathematics in the form of words, tables, graphs, and equations. One method we can employ is to adapt the basic graphs of the toolkit functions to build new models for a given scenario. There are systematic ways to alter functions to construct appropriate models for the problems we are trying to solveOpenStax Transformations
One simple kind of transformation involves shifting the entire graph of a function up, down, right, or left. The simplest shift is a vertical shift, moving the graph up or down, because this transformation involves adding a positive or negative constant to the function. In other words, we add the same constant to the output value of the function regardless of the input. For a function \( g(x)=f(x)+k \), the function \( f(x) \) is shifted vertically k units. See Figure for an example.
\(f\left( x \right) + k\) Vertical translation up k units.
\(f\left( x \right) - k\) Vertical translation down k units.
Here we see \(f\left( x \right)=x^2\) graphed dashed in blue. Move the slider to the effects of adding k.
We just saw that the vertical shift is a change to the output, or outside, of the function. We will now look at how changes to input, on the inside of the function, change its graph and meaning. A shift to the input results in a movement of the graph of the function left or right in what is known as a horizontal shift.
\(f\left( x + h \right)\) Horizontal translation left h units.
\(f\left( x - h \right)\) Vertical translation right h units.
Here we see \(f\left( x \right)=x^2\) graphed dashed in blue. Move the slider to see the effects of adding h before applying the function.
Now that we have two transformations, we can combine them. Vertical shifts are outside changes that affect the output (y-) values and shift the function up or down. Horizontal shifts are inside changes that affect the input (x-) values and shift the function left or right. Combining the two types of shifts will cause the graph of a function to shift up or down and left or right.