Learning Objectives
In this section, you will:
- Define transformation of functions using vertical and horizontal shifts.
- Define transformation of functions using reflections about the x-axis and the y-axis
- Determine whether a function is even, odd, or neither from its graph.
- Define transformation of functions using compressions and stretches.
- Define transformation of functions that combine transformations.
We all know that a flat mirror enables us to see an accurate image of ourselves and whatever is behind us. When we tilt the mirror, the images we see may shift horizontally or vertically. But what happens when we bend a flexible mirror? Like a carnival funhouse mirror, it presents us with a distorted image of ourselves, stretched or compressed horizontally or vertically. In a similar way, we can distort or transform mathematical functions to better adapt them to describing objects or processes in the real world. In this section, we will take a look at several kinds of transformations. We will apply these transformations to different toolkit functions as we explore them in future sections.
Graphing Functions Using Vertical and Horizontal Shifts
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 solve.
Identifying Vertical Shifts
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 the function
is shifted vertically
units.
To help you visualize the concept of a vertical shift, consider that . Therefore,
is equivalent to
. Every unit of
is replaced by
so the y-value increases or decreases depending on the value of
. The result is a shift upward or downward.
Vertical Shift
Given a function a new function
where
is a constant, is a vertical shift of the function
. All the output values change by
units. If
is positive, the graph will shift up. If
is negative, the graph will shift down.
Adding a Constant to a Function
To regulate temperature in a green building, airflow vents near the roof open and close throughout the day. The graph below shows the area of open vents (in square feet) throughout the day in hours after midnight
. During the summer, the facilities manager decides to try to better regulate temperature by increasing the amount of open vents by 20 square feet throughout the day and night. Sketch a graph of this new function.
Show Solution
We can sketch a graph of this new function by adding 20 to each of the output values of the original function. This will have the effect of shifting the graph vertically up, as shown below.
Notice for each input value, the output value has increased by 20, so if we call the new function we could write
.
This notation tells us that, for any value of t , can be found by evaluating the function
at the same input and then adding 20 to the result. This defines
as a transformation of the function
in this case a vertical shift up 20 units. Notice that, with a vertical shift, the input values stay the same and only the output values change.
Identifying Horizontal Shifts
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.
For example, if then
is a new function. Each input is reduced by 2 prior to squaring the function. The result is that the graph is shifted 2 units to the right, because we would need to increase the prior input by 2 units to yield the same output value as given in
.
Horizontal Shift
Given a function a new function
where
is a constant, is a horizontal shift of the function
. If
is positive, the graph will shift right. If
is negative, the graph will shift left.
Adding a Constant to an Input
Returning to our building airflow example, suppose that in autumn the facilities manager decides that the original venting plan starts too late, and wants to begin the entire venting program 2 hours earlier. Sketch a graph of the new function.
Show Solution
We can set to be the original program and
to be the revised program.
In the new graph, at each time, the airflow is the same as the original function was 2 hours later. For example, in the original function
the airflow starts to change at 8 a.m., whereas for the function
the airflow starts to change at 6 a.m. The comparable function values are
. Notice also that the vents first opened to
at 10 a.m. under the original plan, while under the new plan the vents reach
at
In both cases, we see that, because starts 2 hours sooner,
. That means that the same output values are reached when
.
Analysis
Note that has the effect of shifting the graph to the left.
Horizontal changes or “inside changes” affect the domain of a function (the input) instead of the range and often seem counterintuitive. The new function uses the same outputs as
but matches those outputs to inputs 2 hours earlier than those of
. Said another way, we must add 2 hours to the input of
to find the corresponding output for
.
Interpreting Horizontal versus Vertical Shifts
The function gives the number of gallons of gas required to drive
miles. Interpret
and
.
Show Solution
can be interpreted as adding 10 to the output, gallons. This is the gas required to drive
miles, plus another 10 gallons of gas. The graph would indicate a vertical shift.
can be interpreted as adding 10 to the input, miles. So, this is the number of gallons of gas required to drive 10 miles more than
miles. The graph would indicate a horizontal shift.
Try It
Given the function graph the original function
and the transformation
on the same axes. Is this a horizontal or a vertical shift? Which way is the graph shifted and by how many units?
Show Solution
The graphs of and
are shown below. The transformation is a horizontal shift. The function is shifted to the left by 2 units.
Combining Vertical and Horizontal Shifts
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.
How To
Given a function and both a vertical and a horizontal shift, sketch the graph.
- Identify the vertical and horizontal shifts from the formula.
- The vertical shift results from a constant added to the output. Move the graph up for a positive constant and down for a negative constant.
- The horizontal shift results from a constant added to the input. Move the graph left for a positive constant and right for a negative constant.
- Apply the shifts to the graph in either order.
Graphing Combined Vertical and Horizontal Shifts
Given sketch a graph of
.
Show Solution
The function is our toolkit absolute value function. We know that this graph has a V shape, with the point at the origin. The graph of
has transformed
in two ways:
is a change on the inside of the function, giving a horizontal shift left by 1, and the subtraction by 3 in
is a change to the outside of the function, giving a vertical shift down by 3.
Let us follow one point of the graph of .
- The point
is transformed first by shifting left 1 unit:
- The point
is transformed next by shifting down 3 units:
The graph below shows the graph of .
Try It
Given sketch a graph of
.
Show Solution
Identifying Combined Vertical and Horizontal Shifts
Write a formula for the graph shown in (Figure), which is a transformation of the toolkit square root function.

Show Solution
The graph of the toolkit function starts at the origin, so this graph has been shifted 1 to the right and up 2. In function notation, we could write that as

Using the formula for the square root function, we can write

Analysis
Note that this transformation has changed the domain and range of the function. This new graph has domain and range
.
Try It
Write a formula for a transformation of the toolkit reciprocal function that shifts the function’s graph one unit to the right and one unit up.
Show Solution
Graphing Functions Using Reflections about the Axes
Another transformation that can be applied to a function is a reflection over the x– or y-axis. A vertical reflection reflects a graph vertically across the x-axis, while a horizontal reflection reflects a graph horizontally across the y-axis.

Notice that the vertical reflection produces a new graph that is a mirror image of the base or original graph about the x-axis. The horizontal reflection produces a new graph that is a mirror image of the base or original graph about the y-axis.
Reflections
Given a function a new function
is a vertical reflection of the function
sometimes called a reflection about (or over, or through) the x-axis.
Given a function a new function
is a horizontal reflection of the function
sometimes called a reflection about the y-axis.
How To
Given a function, reflect the graph both vertically and horizontally.
- Multiply all outputs by –1 for a vertical reflection. The new graph is a reflection of the original graph about the x-axis.
- Multiply all inputs by –1 for a horizontal reflection. The new graph is a reflection of the original graph about the y-axis.
Reflecting a Graph Horizontally and Vertically
Reflect the graph of (a) vertically and (b) horizontally.
Show Solution
- Reflecting the graph vertically means that each output value will be reflected over the horizontal t-axis as shown below.
Because each output value is the opposite of the original output value, we can write
Notice that this is an outside change, or vertical shift, that affects the output
values, so the negative sign belongs outside of the function.
- Reflecting horizontally means that each input value will be reflected over the vertical axis as shown below.
Because each input value is the opposite of the original input value, we can write
Notice that this is an inside change or horizontal change that affects the input values, so the negative sign is on the inside of the function.
Note that these transformations can affect the domain and range of the functions. While the original square root function has domain
and range
the vertical reflection gives the
function the range
and the horizontal reflection gives the
function the domain
.
Determining Even and Odd Functions
Some functions exhibit symmetry so that reflections result in the original graph. For example, horizontally reflecting the toolkit functions or
will result in the original graph. We say that these types of graphs are symmetric about the y-axis. A function whose graph is symmetric about the y-axis is called an even function.
If the graphs of or
were reflected over both axes, the result would be the original graph, as shown below.
We say that these graphs are symmetric about the origin. A function with a graph that is symmetric about the origin is called an odd function.
Note: A function can be neither even nor odd if it does not exhibit either symmetry. For example is neither even nor odd. Also, the only function that is both even and odd is the constant function
.
Even and Odd Functions
A function is called an even function if for every input

The graph of an even function is symmetric about the axis.
A function is called an odd function if for every input

The graph of an odd function is symmetric about the origin.
How To
Given the formula for a function, determine if the function is even, odd, or neither.
- Determine whether the function satisfies
.If it does, it is even.
- Determine whether the function satisfies
.If it does, it is odd.
- If the function does not satisfy either rule, it is neither even nor odd.
Determining whether a Function Is Even, Odd, or Neither
Is the function even, odd, or neither?
Show Solution
Without looking at a graph, we can determine whether the function is even or odd by finding formulas for the reflections and determining if they return us to the original function. Let’s begin with the rule for even functions.

This does not return us to the original function, so this function is not even. We can now test the rule for odd functions.

Because this is an odd function.
Analysis
Consider the graph of below. Notice that the graph is symmetric about the origin. For every point
on the graph, the corresponding point
is also on the graph. For example, (1, 3) is on the graph of
and the corresponding point
is also on the graph.
Try It
Is the function even, odd, or neither?
Show Solution
even
Graphing Functions Using Stretches and Compressions
Adding a constant to the inputs or outputs of a function changed the position of a graph with respect to the axes, but it did not affect the shape of a graph. We now explore the effects of multiplying the inputs or outputs by some quantity.
We can transform the inside (input values) of a function or we can transform the outside (output values) of a function. Each change has a specific effect that can be seen graphically.
Vertical Stretches and Compressions
When we multiply a function by a positive constant, we get a function whose graph is stretched or compressed vertically in relation to the graph of the original function. If the constant is greater than 1, we get a vertical stretch; if the constant is between 0 and 1, we get a vertical compression. The graph below shows a function multiplied by constant factors 2 and 0.5 and the resulting vertical stretch and compression.
Vertical Stretches and Compressions
Given a function a new function
where
is a constant, is a vertical stretch or vertical compression of the function
.
- If
then the graph will be stretched.
- If
then the graph will be compressed.
- If
then there will be combination of a vertical stretch or compression with a vertical reflection.
How To
Given a function, graph its vertical stretch or compression.
- Identify the value of
.
- Multiply all range values by
.
- If
, the graph is stretched by a factor of
.If
, the graph is compressed by a factor of
. If
, the graph is either stretched or compressed and also reflected about the x-axis.
Graphing a Vertical Stretch
A function models the population of fruit flies. The graph is shown below.
A scientist is comparing this population to another population whose growth follows the same pattern, but is twice as large. Sketch a graph of this population.
Show Solution
Because the population is always twice as large, the new population’s output values are always twice the original function’s output values. Graphically, this is shown in below.
If we choose four reference points, (0, 1), (3, 3), (6, 2) and (7, 0) we will multiply all of the outputs by 2.
The following shows where the new points for the new graph will be located.

Symbolically, the relationship is written as

This means that for any input the value of the function
is twice the value of the function
.Notice that the effect on the graph is a vertical stretching of the graph, where every point doubles its distance from the horizontal axis. The input values
stay the same while the output values are twice as large as before.
Recognizing a Vertical Stretch
The graph below is a transformation of the toolkit function .Relate this new function
to
and then find a formula for
.
Show Solution
When trying to determine a vertical stretch or shift, it is helpful to look for a point on the graph that is relatively clear. In this graph, it appears that .With the basic cubic function at the same input
. Based on that, it appears that the outputs of
are
the outputs of the function
because
.From this we can fairly safely conclude that
.
We can write a formula for by using the definition of the function
.

Try It
Write the formula for the function that we get when we stretch the identity toolkit function by a factor of 3, and then shift it down by 2 units.
Show Solution
Horizontal Stretches and Compressions
Now we consider changes to the inside of a function. When we multiply a function’s input by a positive constant, we get a function whose graph is stretched or compressed horizontally in relation to the graph of the original function. If the constant is between 0 and 1, we get a horizontal stretch; if the constant is greater than 1, we get a horizontal compression of the function.

Given a function the form
results in a horizontal stretch or compression. Consider the function
.The graph of
is a horizontal stretch of the graph of the function
by a factor of 2. The graph of
is a horizontal compression of the graph of the function
by a factor of 2.
Horizontal Stretches and Compressions
Given a function a new function
where
is a constant, is a horizontal stretch or horizontal compression of the function
.
- If
then the graph will be compressed by
.
- If
then the graph will be stretched by
.
- If
then there will be combination of a horizontal stretch or compression with a horizontal reflection.
How To
Given a description of a function, sketch a horizontal compression or stretch.
- Write a formula to represent the function.
- Set
where
for a compression or
for a stretch.
Graphing a Horizontal Compression
Suppose a scientist is comparing a population of fruit flies to a population that progresses through its lifespan twice as fast as the original population. In other words, this new population will progress in 1 hour the same amount as the original population does in 2 hours, and in 2 hours, it will progress as much as the original population does in 4 hours. Sketch a graph of this population.
Show Solution
Symbolically, we could write
See the graphs below for a graphical comparison of the original population and the compressed population.
Analysis
Note that the effect on the graph is a horizontal compression where all input values are half of their original distance from the vertical axis.
Recognizing a Horizontal Compression on a Graph
Relate the function to
seen below.

Show Solution
The graph of looks like the graph of
horizontally compressed. Because
ends at
and
ends at
we can see that the
values have been compressed by
because
.We might also notice that
and
.Either way, we can describe this relationship as
.This is a horizontal compression by
.
Analysis
Notice that the coefficient needed for a horizontal stretch or compression is the reciprocal of the stretch or compression. So to stretch the graph horizontally by a scale factor of 4, we need a coefficient of in our function:
.This means that the input values must be four times larger to produce the same result, requiring the input to be larger, causing the horizontal stretching.
Try It
Write a formula for the toolkit square root function horizontally stretched by a factor of 3.
Show Solution
so using the square root function we get
Performing a Sequence of Transformations
When combining transformations, it is very important to consider the order of the transformations. For example, vertically shifting by 3 and then vertically stretching by 2 does not create the same graph as vertically stretching by 2 and then vertically shifting by 3, because when we shift first, both the original function and the shift get stretched, while only the original function gets stretched when we stretch first.
When we see an expression such as which transformation should we start with? The answer here follows nicely from the order of operations. Given the output value of
we first multiply by 2, causing the vertical stretch, and then add 3, causing the vertical shift. In other words, multiplication before addition.
Horizontal transformations are a little trickier to think about. When we write for example, we have to think about how the inputs to the function
relate to the inputs to the function
.Suppose we know
.What input to
would produce that output? In other words, what value of
will allow
We would need
.To solve for
we would first subtract 3, resulting in a horizontal shift, and then divide by 2, causing a horizontal compression.
This format ends up being very difficult to work with, because it is usually much easier to horizontally stretch a graph before shifting. We can work around this by factoring inside the function.

Let’s work through an example.

We can factor out a 2.

Now we can more clearly observe a horizontal shift to the left 2 units and a horizontal compression. Factoring in this way allows us to horizontally stretch first and then shift horizontally.
Combining Transformations
When combining vertical transformations written in the form first vertically stretch by
and then vertically shift by
.
When combining horizontal transformations written in the form first horizontally shift by
and then horizontally stretch by
.
When combining horizontal transformations written in the form first horizontally stretch by
and then horizontally shift by
.
Horizontal and vertical transformations are independent. It does not matter whether horizontal or vertical transformations are performed first.
Finding a Triple Transformation of a Graph
Use the graph of in the graph below to sketch a graph of
.

Show Solution
To simplify, let’s start by factoring out the inside of the function.

By factoring the inside, we can first horizontally stretch by 2, as indicated by the on the inside of the function. Remember that twice the size of 0 is still 0, so the point (0,2) remains at (0,2) while the point (2,0) will stretch to (4,0).
Next, we horizontally shift left by 2 units, as indicated by .
Last, we vertically shift down by 3 to complete our sketch, as indicated by the on the outside of the function.
Access this online resource for additional instruction and practice with transformation of functions.
Key Equations
Vertical shift | ![]() ![]() |
Horizontal shift | ![]() ![]() |
Vertical reflection | ![]() |
Horizontal reflection | ![]() |
Vertical stretch | ![]() ![]() ) |
Vertical compression | ![]() ![]() |
Horizontal stretch | ![]() ![]() |
Horizontal compression. | ![]() ![]() |
Key Concepts
- A function can be shifted vertically by adding a constant to the output.
- A function can be shifted horizontally by adding a constant to the input.
- Relating the shift to the context of a problem makes it possible to compare and interpret vertical and horizontal shifts.
- Vertical and horizontal shifts are often combined.
- A vertical reflection reflects a graph about the
axis. A graph can be reflected vertically by multiplying the output by –1.
- A horizontal reflection reflects a graph about the
axis. A graph can be reflected horizontally by multiplying the input by –1.
- A graph can be reflected both vertically and horizontally. The order in which the reflections are applied does not affect the final graph.
- A function presented in tabular form can also be reflected by multiplying the values in the input and output rows or columns accordingly.
- A function presented as an equation can be reflected by applying transformations one at a time.
- Even functions are symmetric about the
axis, whereas odd functions are symmetric about the origin.
- Even functions satisfy the condition
.
- Odd functions satisfy the condition
.
- A function can be odd, even, or neither.
- A function can be compressed or stretched vertically by multiplying the output by a constant.
- A function can be compressed or stretched horizontally by multiplying the input by a constant.
- The order in which different transformations are applied does affect the final function. Both vertical and horizontal transformations must be applied in the order given. However, a vertical transformation may be combined with a horizontal transformation in any order.