Skip to Content
OpenStax Logo
Algebra and Trigonometry

3.5 Transformation of Functions

Algebra and Trigonometry3.5 Transformation of Functions
  1. Preface
  2. 1 Prerequisites
    1. Introduction to Prerequisites
    2. 1.1 Real Numbers: Algebra Essentials
    3. 1.2 Exponents and Scientific Notation
    4. 1.3 Radicals and Rational Exponents
    5. 1.4 Polynomials
    6. 1.5 Factoring Polynomials
    7. 1.6 Rational Expressions
    8. Key Terms
    9. Key Equations
    10. Key Concepts
    11. Review Exercises
    12. Practice Test
  3. 2 Equations and Inequalities
    1. Introduction to Equations and Inequalities
    2. 2.1 The Rectangular Coordinate Systems and Graphs
    3. 2.2 Linear Equations in One Variable
    4. 2.3 Models and Applications
    5. 2.4 Complex Numbers
    6. 2.5 Quadratic Equations
    7. 2.6 Other Types of Equations
    8. 2.7 Linear Inequalities and Absolute Value Inequalities
    9. Key Terms
    10. Key Equations
    11. Key Concepts
    12. Review Exercises
    13. Practice Test
  4. 3 Functions
    1. Introduction to Functions
    2. 3.1 Functions and Function Notation
    3. 3.2 Domain and Range
    4. 3.3 Rates of Change and Behavior of Graphs
    5. 3.4 Composition of Functions
    6. 3.5 Transformation of Functions
    7. 3.6 Absolute Value Functions
    8. 3.7 Inverse Functions
    9. Key Terms
    10. Key Equations
    11. Key Concepts
    12. Review Exercises
    13. Practice Test
  5. 4 Linear Functions
    1. Introduction to Linear Functions
    2. 4.1 Linear Functions
    3. 4.2 Modeling with Linear Functions
    4. 4.3 Fitting Linear Models to Data
    5. Key Terms
    6. Key Concepts
    7. Review Exercises
    8. Practice Test
  6. 5 Polynomial and Rational Functions
    1. Introduction to Polynomial and Rational Functions
    2. 5.1 Quadratic Functions
    3. 5.2 Power Functions and Polynomial Functions
    4. 5.3 Graphs of Polynomial Functions
    5. 5.4 Dividing Polynomials
    6. 5.5 Zeros of Polynomial Functions
    7. 5.6 Rational Functions
    8. 5.7 Inverses and Radical Functions
    9. 5.8 Modeling Using Variation
    10. Key Terms
    11. Key Equations
    12. Key Concepts
    13. Review Exercises
    14. Practice Test
  7. 6 Exponential and Logarithmic Functions
    1. Introduction to Exponential and Logarithmic Functions
    2. 6.1 Exponential Functions
    3. 6.2 Graphs of Exponential Functions
    4. 6.3 Logarithmic Functions
    5. 6.4 Graphs of Logarithmic Functions
    6. 6.5 Logarithmic Properties
    7. 6.6 Exponential and Logarithmic Equations
    8. 6.7 Exponential and Logarithmic Models
    9. 6.8 Fitting Exponential Models to Data
    10. Key Terms
    11. Key Equations
    12. Key Concepts
    13. Review Exercises
    14. Practice Test
  8. 7 The Unit Circle: Sine and Cosine Functions
    1. Introduction to The Unit Circle: Sine and Cosine Functions
    2. 7.1 Angles
    3. 7.2 Right Triangle Trigonometry
    4. 7.3 Unit Circle
    5. 7.4 The Other Trigonometric Functions
    6. Key Terms
    7. Key Equations
    8. Key Concepts
    9. Review Exercises
    10. Practice Test
  9. 8 Periodic Functions
    1. Introduction to Periodic Functions
    2. 8.1 Graphs of the Sine and Cosine Functions
    3. 8.2 Graphs of the Other Trigonometric Functions
    4. 8.3 Inverse Trigonometric Functions
    5. Key Terms
    6. Key Equations
    7. Key Concepts
    8. Review Exercises
    9. Practice Test
  10. 9 Trigonometric Identities and Equations
    1. Introduction to Trigonometric Identities and Equations
    2. 9.1 Solving Trigonometric Equations with Identities
    3. 9.2 Sum and Difference Identities
    4. 9.3 Double-Angle, Half-Angle, and Reduction Formulas
    5. 9.4 Sum-to-Product and Product-to-Sum Formulas
    6. 9.5 Solving Trigonometric Equations
    7. Key Terms
    8. Key Equations
    9. Key Concepts
    10. Review Exercises
    11. Practice Test
  11. 10 Further Applications of Trigonometry
    1. Introduction to Further Applications of Trigonometry
    2. 10.1 Non-right Triangles: Law of Sines
    3. 10.2 Non-right Triangles: Law of Cosines
    4. 10.3 Polar Coordinates
    5. 10.4 Polar Coordinates: Graphs
    6. 10.5 Polar Form of Complex Numbers
    7. 10.6 Parametric Equations
    8. 10.7 Parametric Equations: Graphs
    9. 10.8 Vectors
    10. Key Terms
    11. Key Equations
    12. Key Concepts
    13. Review Exercises
    14. Practice Test
  12. 11 Systems of Equations and Inequalities
    1. Introduction to Systems of Equations and Inequalities
    2. 11.1 Systems of Linear Equations: Two Variables
    3. 11.2 Systems of Linear Equations: Three Variables
    4. 11.3 Systems of Nonlinear Equations and Inequalities: Two Variables
    5. 11.4 Partial Fractions
    6. 11.5 Matrices and Matrix Operations
    7. 11.6 Solving Systems with Gaussian Elimination
    8. 11.7 Solving Systems with Inverses
    9. 11.8 Solving Systems with Cramer's Rule
    10. Key Terms
    11. Key Equations
    12. Key Concepts
    13. Review Exercises
    14. Practice Test
  13. 12 Analytic Geometry
    1. Introduction to Analytic Geometry
    2. 12.1 The Ellipse
    3. 12.2 The Hyperbola
    4. 12.3 The Parabola
    5. 12.4 Rotation of Axes
    6. 12.5 Conic Sections in Polar Coordinates
    7. Key Terms
    8. Key Equations
    9. Key Concepts
    10. Review Exercises
    11. Practice Test
  14. 13 Sequences, Probability, and Counting Theory
    1. Introduction to Sequences, Probability and Counting Theory
    2. 13.1 Sequences and Their Notations
    3. 13.2 Arithmetic Sequences
    4. 13.3 Geometric Sequences
    5. 13.4 Series and Their Notations
    6. 13.5 Counting Principles
    7. 13.6 Binomial Theorem
    8. 13.7 Probability
    9. Key Terms
    10. Key Equations
    11. Key Concepts
    12. Review Exercises
    13. Practice Test
  15. A | Proofs, Identities, and Toolkit Functions
  16. Answer Key
    1. Chapter 1
    2. Chapter 2
    3. Chapter 3
    4. Chapter 4
    5. Chapter 5
    6. Chapter 6
    7. Chapter 7
    8. Chapter 8
    9. Chapter 9
    10. Chapter 10
    11. Chapter 11
    12. Chapter 12
    13. Chapter 13
  17. Index

Learning Objectives

In this section, you will:
  • Graph functions using vertical and horizontal shifts.
  • Graph functions using reflections about the x-axis x-axis and the y-axis. y-axis.
  • Determine whether a function is even, odd, or neither from its graph.
  • Graph functions using compressions and stretches.
  • Combine transformations.
A photograph of two children staring at themselves in a distorting mirror.
Figure 1 (credit: "Misko"/Flickr)

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.

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 g(x)=f(x)+k, g(x)=f(x)+k,the function f( x ) f( x )is shifted vertically k kunits. See Figure 2 for an example.

Graphing is shown on a set of x and y axes. The scale is minus three to plus three for both x and y. Two graphs are shown. A blue curve for the cube root of x, and an orange curve for the cube root of x plus one. The blue curve goes from the third quadrant through the origin into the first quadrant. The orange curve is shifted one unit up.
Figure 2 Vertical shift by k=1 k=1 of the cube root function f(x)= x 3 . f(x)= x 3 .

To help you visualize the concept of a vertical shift, consider that y=f( x ). y=f( x ). Therefore, f( x )+k f( x )+k is equivalent to y+k. y+k. Every unit of y y is replaced by y+k, y+k, so the y-value increases or decreases depending on the value of k. k. The result is a shift upward or downward.

Vertical Shift

Given a function f( x ), f( x ), a new function g(x)=f(x)+k, g(x)=f(x)+k, where k k is a constant, is a vertical shift of the function f( x ). f( x ). All the output values change by k k units. If k k is positive, the graph will shift up. If k k is negative, the graph will shift down.

Example 1

Adding a Constant to a Function

To regulate temperature in a green building, airflow vents near the roof open and close throughout the day. Figure 3 shows the area of open vents V V (in square feet) throughout the day in hours after midnight, t. t.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.

A blue graph is shown on a set of t and v axes. The scale is minus four to plus twenty-four for t and minus four to three hundred for v. The graph lies along the t axis from the origin to eight, then rises as a straight line to ten, two hundred twenty. Then it is a horizontal straight line to seventeen, two hundred twenty. It then is a straight line to the t axis at nineteen. It is then a straight line along the t axis until t equals twenty four.
Figure 3

How To

Given a tabular function, create a new row to represent a vertical shift.

  1. Identify the output row or column.
  2. Determine the magnitude of the shift.
  3. Add the shift to the value in each output cell. Add a positive value for up or a negative value for down.

Example 2

Shifting a Tabular Function Vertically

A function f( x ) f( x ) is given in Table 2. Create a table for the function g(x)=f(x)3. g(x)=f(x)3.

x x 2 4 6 8
f(x) f(x) 1 3 7 11
Table 2

Analysis

As with the earlier vertical shift, notice the input values stay the same and only the output values change.

Try It #1

The function h(t)=4.9 t 2 +30t h(t)=4.9 t 2 +30t gives the height h h of a ball (in meters) thrown upward from the ground after t t seconds. Suppose the ball was instead thrown from the top of a 10-m building. Relate this new height function b(t) b(t) to h(t), h(t), and then find a formula for b(t). b(t).

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, shown in Figure 5.

A graph is shown on a set of x and y axes. The scale is minus three to plus three for both x and y. Two graphs are shown. A blue curve for the cube root of x, and an orange curve for the cube root of (x plus one). The blue curve goes from the third quadrant through the origin into the first quadrant. The orange curve is shifted one unit to the left.
Figure 5 Horizontal shift of the function f(x)= x 3 . f(x)= x 3 .Note that h=+1 h=+1shifts the graph to the left, that is, towards negative values of x. x.

For example, if f(x)= x 2 , f(x)= x 2 , then g(x)= (x2) 2 g(x)= (x2) 2 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 f. f.

Horizontal Shift

Given a function f, f, a new function g( x )=f( xh ), g( x )=f( xh ), where h h is a constant, is a horizontal shift of the function f. f. If h his positive, the graph will shift right. If h h is negative, the graph will shift left.

Example 3

Adding a Constant to an Input

Returning to our building airflow example from Figure 3, 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.

Analysis

Note that V(t+2) V(t+2) 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 F( t ) F( t ) uses the same outputs as V( t ), V( t ), but matches those outputs to inputs 2 hours earlier than those of V( t ). V( t ). Said another way, we must add 2 hours to the input of V V to find the corresponding output for F:F(t)=V(t+2). F:F(t)=V(t+2).

How To

Given a tabular function, create a new row to represent a horizontal shift.

  1. Identify the input row or column.
  2. Determine the magnitude of the shift.
  3. Add the shift to the value in each input cell.

Example 4

Shifting a Tabular Function Horizontally

A function f(x) f(x)is given in Table 4. Create a table for the function g(x)=f(x3). g(x)=f(x3).

x x 2 4 6 8
f(x) f(x) 1 3 7 11
Table 4

Analysis

Figure 7 represents both of the functions. We can see the horizontal shift in each point.

Graph of the points from the previous table for f(x) and g(x)=f(x-3).
Figure 7

Example 5

Identifying a Horizontal Shift of a Toolkit Function

Figure 8 represents a transformation of the toolkit function f(x)= x 2 . f(x)= x 2 .Relate this new function g(x) g(x)to f(x), f(x),and then find a formula for g(x). g(x).

Graph of a parabola.
Figure 8

Analysis

To determine whether the shift is +2 +2or 2 2, consider a single reference point on the graph. For a quadratic, looking at the vertex point is convenient. In the original function, f(0)=0. f(0)=0.In our shifted function, g(2)=0. g(2)=0. To obtain the output value of 0 from the function f, f,we need to decide whether a plus or a minus sign will work to satisfy g(2)=f(x2)=f(0)=0. g(2)=f(x2)=f(0)=0. For this to work, we will need to subtract 2 units from our input values.

Example 6

Interpreting Horizontal versus Vertical Shifts

The function G(m) G(m)gives the number of gallons of gas required to drive m mmiles. Interpret G(m)+10 G(m)+10and G(m+10). G(m+10).

Try It #2

Given the function f(x)= x , f(x)= x ,graph the original function f(x) f(x)and the transformation g(x)=f(x+2) g(x)=f(x+2)on the same axes. Is this a horizontal or a vertical shift? Which way is the graph shifted and by how many 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.

  1. Identify the vertical and horizontal shifts from the formula.
  2. 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.
  3. 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.
  4. Apply the shifts to the graph in either order.

Example 7

Graphing Combined Vertical and Horizontal Shifts

Given f(x)=| x |, f(x)=| x |,sketch a graph of h(x)=f(x+1)3. h(x)=f(x+1)3.

Try It #3

Given f(x)=| x |, f(x)=| x |,sketch a graph of h(x)=f(x2)+4. h(x)=f(x2)+4.

Example 8

Identifying Combined Vertical and Horizontal Shifts

Write a formula for the graph shown in Figure 11, which is a transformation of the toolkit square root function.

Graph of a square root function transposed right one unit and up 2.
Figure 11

Analysis

Note that this transformation has changed the domain and range of the function. This new graph has domain [1,) [1,)and range [2,). [2,).

Try It #4

Write a formula for a transformation of the toolkit reciprocal function f( x )= 1 x f( x )= 1 x that shifts the function’s graph one unit to the right and one unit up.

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. The reflections are shown in Figure 12.

Graph of the vertical and horizontal reflection of a function.
Figure 12 Vertical and horizontal reflections of a function.

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 f(x), f(x), a new function g(x)=f(x) g(x)=f(x)is a vertical reflection of the function f(x), f(x),sometimes called a reflection about (or over, or through) the x-axis.

Given a function f(x), f(x),a new function g(x)=f(x) g(x)=f(x)is a horizontal reflection of the function f(x), f(x),sometimes called a reflection about the y-axis.

How To

Given a function, reflect the graph both vertically and horizontally.

  1. Multiply all outputs by –1 for a vertical reflection. The new graph is a reflection of the original graph about the x-axis.
  2. Multiply all inputs by –1 for a horizontal reflection. The new graph is a reflection of the original graph about the y-axis.

Example 9

Reflecting a Graph Horizontally and Vertically

Reflect the graph of s(t)= t s(t)= t (a) vertically and (b) horizontally.

Try It #5

Reflect the graph of f(x)=|x1| f(x)=|x1| (a) vertically and (b) horizontally.

Example 10

Reflecting a Tabular Function Horizontally and Vertically

A function f(x) f(x)is given as Table 6. Create a table for the functions below.

  1. g(x)=f(x) g(x)=f(x)
  2. h(x)=f(x) h(x)=f(x)
x x 2 4 6 8
f(x) f(x) 1 3 7 11
Table 6
Try It #6

A function f(x) f(x)is given as Table 9. Create a table for the functions below.

  1. g(x)=f(x) g(x)=f(x)
  2. h(x)=f(x) h(x)=f(x)
x x −2 0 2 4
f(x) f(x) 5 10 15 20
Table 9

Example 11

Applying a Learning Model Equation

A common model for learning has an equation similar to k(t)= 2 t +1, k(t)= 2 t +1, where k k is the percentage of mastery that can be achieved after t t practice sessions. This is a transformation of the function f(t)= 2 t f(t)= 2 t shown in Figure 15. Sketch a graph of k(t). k(t).

Graph of k(t)
Figure 15

Analysis

As a model for learning, this function would be limited to a domain of t0, t0,with corresponding range [0,1). [0,1).

Try It #7

Given the toolkit function f(x)= x 2 , f(x)= x 2 ,graph g(x)=f(x) g(x)=f(x)and h(x)=f(x). h(x)=f(x).Take note of any surprising behavior for these functions.

Determining Even and Odd Functions

Some functions exhibit symmetry so that reflections result in the original graph. For example, horizontally reflecting the toolkit functions f(x)= x 2 f(x)= x 2 or f(x)=| x | f(x)=| x | 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 f(x)= x 3 f(x)= x 3 or f(x)= 1 x f(x)= 1 x were reflected over both axes, the result would be the original graph, as shown in Figure 17.

Graph of x^3 and its reflections.
Figure 17 (a) The cubic toolkit function (b) Horizontal reflection of the cubic toolkit function (c) Horizontal and vertical reflections reproduce the original cubic function.

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, f(x)= 2 x f(x)= 2 x is neither even nor odd. Also, the only function that is both even and odd is the constant function f(x)=0. f(x)=0.

Even and Odd Functions

A function is called an even function if for every input x x

f(x)=f(x) f(x)=f(x)

The graph of an even function is symmetric about the y- y-axis.

A function is called an odd function if for every input x x

f(x)=f(x) f(x)=f(x)

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.

  1. Determine whether the function satisfies f(x)=f(x). f(x)=f(x).If it does, it is even.
  2. Determine whether the function satisfies f(x)=f(x). f(x)=f(x).If it does, it is odd.
  3. If the function does not satisfy either rule, it is neither even nor odd.

Example 12

Determining whether a Function Is Even, Odd, or Neither

Is the function f(x)= x 3 +2x f(x)= x 3 +2xeven, odd, or neither?

Analysis

Consider the graph of f fin Figure 18. Notice that the graph is symmetric about the origin. For every point ( x,y ) ( x,y )on the graph, the corresponding point ( x,y ) ( x,y )is also on the graph. For example, (1, 3) is on the graph of f, f,and the corresponding point (−1,−3) (−1,−3) is also on the graph.

Graph of f(x) with labeled points at (1, 3) and (-1, -3).
Figure 18
Try It #8

Is the function f(s)= s 4 +3 s 2 +7 f(s)= s 4 +3 s 2 +7even, odd, or neither?

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. Figure 19 shows a function multiplied by constant factors 2 and 0.5 and the resulting vertical stretch and compression.

Graph of a function that shows vertical stretching and compression.
Figure 19 Vertical stretch and compression

Vertical Stretches and Compressions

Given a function f(x), f(x),a new function g(x)=af(x), g(x)=af(x),where a ais a constant, is a vertical stretch or vertical compression of the function f(x). f(x).

  • If a>1, a>1,then the graph will be stretched.
  • If 0<a<1, 0<a<1,then the graph will be compressed.
  • If a<0, a<0,then there will be combination of a vertical stretch or compression with a vertical reflection.

How To

Given a function, graph its vertical stretch.

  1. Identify the value of a. a.
  2. Multiply all range values by a. a.
  3. If a>1, a>1,the graph is stretched by a factor of a. a.

    If 0<a<1, 0<a<1,the graph is compressed by a factor of a. a.

    If a<0, a<0,the graph is either stretched or compressed and also reflected about the x-axis.

Example 13

Graphing a Vertical Stretch

A function P( t ) P( t )models the population of fruit flies. The graph is shown in Figure 20.

Graph to represent the growth of the population of fruit flies.
Figure 20

A scientist is comparing this population to another population, Q, Q,whose growth follows the same pattern, but is twice as large. Sketch a graph of this population.

How To

Given a tabular function and assuming that the transformation is a vertical stretch or compression, create a table for a vertical compression.

  1. Determine the value of a. a.
  2. Multiply all of the output values by a. a.

Example 14

Finding a Vertical Compression of a Tabular Function

A function f fis given as Table 10. Create a table for the function g(x)= 1 2 f(x). g(x)= 1 2 f(x).

x x 2 4 6 8
f(x) f(x) 1 3 7 11
Table 10

Analysis

The result is that the function g(x) g(x)has been compressed vertically by 1 2 . 1 2 .Each output value is divided in half, so the graph is half the original height.

Try It #9

A function f fis given as Table 12. Create a table for the function g(x)= 3 4 f(x). g(x)= 3 4 f(x).

x x 2 4 6 8
f(x) f(x) 12 16 20 0
Table 12

Example 15

Recognizing a Vertical Stretch

The graph in Figure 22 is a transformation of the toolkit function f(x)= x 3 . f(x)= x 3 .Relate this new function g(x) g(x)to f(x), f(x),and then find a formula for g(x). g(x).

Graph of a transformation of f(x)=x^3.
Figure 22

Try It #10

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.

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.

Graph of the vertical stretch and compression of x^2.
Figure 23

Given a function y=f(x), y=f(x),the form y=f(bx) y=f(bx)results in a horizontal stretch or compression. Consider the function y= x 2 . y= x 2 .Observe Figure 23. The graph of y= ( 0.5x ) 2 y= ( 0.5x ) 2 is a horizontal stretch of the graph of the function y= x 2 y= x 2 by a factor of 2. The graph of y= ( 2x ) 2 y= ( 2x ) 2 is a horizontal compression of the graph of the function y= x 2 y= x 2 by a factor of 2.

Horizontal Stretches and Compressions

Given a function f(x), f(x),a new function g(x)=f(bx), g(x)=f(bx),where b bis a constant, is a horizontal stretch or horizontal compression of the function f(x). f(x).

  • If b>1, b>1,then the graph will be compressed by 1 b . 1 b .
  • If 0<b<1, 0<b<1,then the graph will be stretched by 1 b . 1 b .
  • If b<0, b<0,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.

  1. Write a formula to represent the function.
  2. Set g(x)=f(bx) g(x)=f(bx)where b>1 b>1for a compression or 0<b<1 0<b<1 for a stretch.

Example 16

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, R, R,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.

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.

Example 17

Finding a Horizontal Stretch for a Tabular Function

A function f(x) f(x)is given as Table 13. Create a table for the function g(x)=f( 1 2 x ). g(x)=f( 1 2 x ).

x x 2 4 6 8
f(x) f(x) 1 3 7 11
Table 13

Analysis

Because each input value has been doubled, the result is that the function g(x) g(x)has been stretched horizontally by a factor of 2.

Example 18

Recognizing a Horizontal Compression on a Graph

Relate the function g(x) g(x)to f(x) f(x)in Figure 26.

Graph of f(x) being vertically compressed to g(x).
Figure 26

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 1 4 1 4 in our function: f( 1 4 x ). f( 1 4 x ).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 #11

Write a formula for the toolkit square root function horizontally stretched by a factor of 3.

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 2f(x)+3, 2f(x)+3,which transformation should we start with? The answer here follows nicely from the order of operations. Given the output value of f(x), f(x),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 g(x)=f(2x+3), g(x)=f(2x+3),for example, we have to think about how the inputs to the function g grelate to the inputs to the function f. f.Suppose we know f(7)=12. f(7)=12.What input to g gwould produce that output? In other words, what value of x xwill allow g(x)=f(2x+3)=12? g(x)=f(2x+3)=12?We would need 2x+3=7. 2x+3=7.To solve for x, x,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.

f(bx+p)=f( b( x+ p b ) ) f(bx+p)=f( b( x+ p b ) )

Let’s work through an example.

f( x )= ( 2x+4 ) 2 f( x )= ( 2x+4 ) 2

We can factor out a 2.

f( x )= ( 2( x+2 ) ) 2 f( x )= ( 2( x+2 ) ) 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 af(x)+k, af(x)+k,first vertically stretch by a aand then vertically shift by k. k.

When combining horizontal transformations written in the form f(bx-h), f(bx-h),first horizontally shift by h hand then horizontally stretch by 1 b . 1 b .

When combining horizontal transformations written in the form f(b(x-h)), f(b(x-h)),first horizontally stretch by 1 b 1 b and then horizontally shift by h. h.

Horizontal and vertical transformations are independent. It does not matter whether horizontal or vertical transformations are performed first.

Example 19

Finding a Triple Transformation of a Tabular Function

Given Table 15 for the function f(x), f(x),create a table of values for the function g(x)=2f(3x)+1. g(x)=2f(3x)+1.

x x 6 12 18 24
f(x) f(x) 10 14 15 17
Table 15

Example 20

Finding a Triple Transformation of a Graph

Use the graph of f( x ) f( x )in Figure 27 to sketch a graph of k(x)=f( 1 2 x+1 )3. k(x)=f( 1 2 x+1 )3.

Graph of a half-circle.
Figure 27

Media

Access this online resource for additional instruction and practice with transformation of functions.

3.5 Section Exercises

Verbal

1.

When examining the formula of a function that is the result of multiple transformations, how can you tell a horizontal shift from a vertical shift?

2.

When examining the formula of a function that is the result of multiple transformations, how can you tell a horizontal stretch from a vertical stretch?

3.

When examining the formula of a function that is the result of multiple transformations, how can you tell a horizontal compression from a vertical compression?

4.

When examining the formula of a function that is the result of multiple transformations, how can you tell a reflection with respect to the x-axis from a reflection with respect to the y-axis?

5.

How can you determine whether a function is odd or even from the formula of the function?

Algebraic

For the following exercises, write a formula for the function obtained when the graph is shifted as described.

6.

f(x)= x f(x)= x is shifted up 1 unit and to the left 2 units.

7.

f(x)=| x | f(x)=| x | is shifted down 3 units and to the right 1 unit.

8.

f(x)= 1 x f(x)= 1 x is shifted down 4 units and to the right 3 units.

9.

f(x)= 1 x 2 f(x)= 1 x 2 is shifted up 2 units and to the left 4 units.

For the following exercises, describe how the graph of the function is a transformation of the graph of the original function f. f.

10.

y=f(x49) y=f(x49)

11.

y=f(x+43) y=f(x+43)

12.

y=f(x+3) y=f(x+3)

13.

y=f(x4) y=f(x4)

14.

y=f(x)+5 y=f(x)+5

15.

y=f(x)+8 y=f(x)+8

16.

y=f(x)2 y=f(x)2

17.

y=f(x)7 y=f(x)7

18.

y=f(x2)+3 y=f(x2)+3

19.

y=f(x+4)1 y=f(x+4)1

For the following exercises, determine the interval(s) on which the function is increasing and decreasing.

20.

f(x)=4 (x+1) 2 5 f(x)=4 (x+1) 2 5

21.

g(x)=5 (x+3) 2 2 g(x)=5 (x+3) 2 2

22.

a(x)= x+4 a(x)= x+4

23.

k(x)=3 x 1 k(x)=3 x 1

Graphical

For the following exercises, use the graph of f(x)= 2 x f(x)= 2 x shown in Figure 31 to sketch a graph of each transformation of f(x). f(x).

Graph of f(x).
Figure 31
24.

g(x)= 2 x +1 g(x)= 2 x +1

25.

h(x)= 2 x 3 h(x)= 2 x 3

26.

w(x)= 2 x1 w(x)= 2 x1

For the following exercises, sketch a graph of the function as a transformation of the graph of one of the toolkit functions.

27.

f(t)= (t+1) 2 3 f(t)= (t+1) 2 3

28.

h(x)=|x1|+4 h(x)=|x1|+4

29.

k(x)= (x2) 3 1 k(x)= (x2) 3 1

30.

m(t)=3+ t+2 m(t)=3+ t+2

Numeric

31.

Tabular representations for the functions f,g, f,g,and h hare given below. Write g(x) g(x)and h(x) h(x)as transformations of f(x). f(x).

x x −2 −1 0 1 2
f(x) f(x) −2 −1 −3 1 2
x x −1 0 1 2 3
g(x) g(x) −2 −1 −3 1 2
x x −2 −1 0 1 2
h(x) h(x) −1 0 −2 2 3
32.

Tabular representations for the functions f,g, f,g,and h hare given below. Write g(x) g(x)and h(x) h(x)as transformations of f(x). f(x).

x x −2 −1 0 1 2
f(x) f(x) −1 −3 4 2 1
x x −3 −2 −1 0 1
g(x) g(x) −1 −3 4 2 1
x x −2 −1 0 1 2
h(x) h(x) −2 −4 3 1 0

For the following exercises, write an equation for each graphed function by using transformations of the graphs of one of the toolkit functions.

33.
Graph of an absolute function.
34.
Graph of a parabola.
35.
Graph of a square root function.
36.
Graph of an absolute function.
37.
Graph of a parabola
38.
Graph of a square root function.
39.
Graph of an absolute function.
40.
Graph of a square root function.

For the following exercises, use the graphs of transformations of the square root function to find a formula for each of the functions.

41.
Graph of a square root function.
42.
Graph of a square root function.

For the following exercises, use the graphs of the transformed toolkit functions to write a formula for each of the resulting functions.

43.
Graph of a parabola.
44.
Graph of a cubic function.
45.
Graph of a square root function.
46.
Graph of an absolute function.

For the following exercises, determine whether the function is odd, even, or neither.

47.

f(x)=3 x 4 f(x)=3 x 4

48.

g(x)= x g(x)= x

49.

h(x)= 1 x +3x h(x)= 1 x +3x

50.

f(x)= (x2) 2 f(x)= (x2) 2

51.

g(x)=2 x 4 g(x)=2 x 4

52.

h(x)=2x x 3 h(x)=2x x 3

For the following exercises, describe how the graph of each function is a transformation of the graph of the original function f. f.

53.

g(x)=f(x) g(x)=f(x)

54.

g(x)=f(x) g(x)=f(x)

55.

g(x)=4f(x) g(x)=4f(x)

56.

g(x)=6f(x) g(x)=6f(x)

57.

g(x)=f(5x) g(x)=f(5x)

58.

g(x)=f(2x) g(x)=f(2x)

59.

g(x)=f( 1 3 x ) g(x)=f( 1 3 x )

60.

g(x)=f( 1 5 x ) g(x)=f( 1 5 x )

61.

g(x)=3f( x ) g(x)=3f( x )

62.

g(x)=f(3x) g(x)=f(3x)

For the following exercises, write a formula for the function g gthat results when the graph of a given toolkit function is transformed as described.

63.

The graph of f(x)=|x| f(x)=|x|is reflected over the y y-axis and horizontally compressed by a factor of 1 4 1 4 .

64.

The graph of f(x)= x f(x)= x is reflected over the x x-axis and horizontally stretched by a factor of 2.

65.

The graph of f(x)= 1 x 2 f(x)= 1 x 2 is vertically compressed by a factor of 1 3 , 1 3 ,then shifted to the left 2 units and down 3 units.

66.

The graph of f(x)= 1 x f(x)= 1 x is vertically stretched by a factor of 8, then shifted to the right 4 units and up 2 units.

67.

The graph of f(x)= x 2 f(x)= x 2 is vertically compressed by a factor of 1 2 , 1 2 ,then shifted to the right 5 units and up 1 unit.

68.

The graph of f(x)= x 2 f(x)= x 2 is horizontally stretched by a factor of 3, then shifted to the left 4 units and down 3 units.

For the following exercises, describe how the formula is a transformation of a toolkit function. Then sketch a graph of the transformation.

69.

g(x)=4 (x+1) 2 5 g(x)=4 (x+1) 2 5

70.

g(x)=5 (x+3) 2 2 g(x)=5 (x+3) 2 2

71.

h(x)=2|x4|+3 h(x)=2|x4|+3

72.

k(x)=3 x 1 k(x)=3 x 1

73.

m(x)= 1 2 x 3 m(x)= 1 2 x 3

74.

n(x)= 1 3 |x2| n(x)= 1 3 |x2|

75.

p( x )= ( 1 3 x ) 3 3 p( x )= ( 1 3 x ) 3 3

76.

q( x )= ( 1 4 x ) 3 +1 q( x )= ( 1 4 x ) 3 +1

77.

a(x)= x+4 a(x)= x+4

For the following exercises, use the graph in Figure 32 to sketch the given transformations.

Graph of a polynomial.
Figure 32
78.

g(x)=f(x)2 g(x)=f(x)2

79.

g(x)=f(x) g(x)=f(x)

80.

g(x)=f(x+1) g(x)=f(x+1)

81.

g(x)=f(x2) g(x)=f(x2)

Citation/Attribution

Want to cite, share, or modify this book? This book is Creative Commons Attribution License 4.0 and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:
    Access for free at https://openstax.org/books/algebra-and-trigonometry/pages/1-introduction-to-prerequisites
  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:
    Access for free at https://openstax.org/books/algebra-and-trigonometry/pages/1-introduction-to-prerequisites
Citation information

© Feb 7, 2020 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License 4.0 license. The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.