topic badge
United States of AmericaVA
Algebra, Functions, and Data Analysis

5.02 Transformations of linear functions

Transformations of graphs

Exploration

In the applet, move the m slider and the b slider.

Loading interactive...
  1. What happens to the graph when the value of m changes?
  2. What happens to the graph when the value of b changes?

The slope of a linear function, m, refers to the steepness of the line, and we can find the slope using the formula:

\displaystyle m= \dfrac{\text{change in }y}{\text{change in }x}=\dfrac{y_2-y_1}{x_2-x_1}
\bm{m}
slope
\bm{\left(x_1,\,y_1\right)}
a point on the line
\bm{\left(x_2,\,y_2\right)}
a second point on the line

The y-intercept, b, represents the point where the function crosses the y-axis.

Many types of functions belong to function families. Functions in the same family have graphs with the same basic shape.

For linear functions, the simplest form is the parent function f(x)=x. We can change, or transform, this parent function by shifting (translating), stretching/compressing (dilating), or flipping (reflecting) it vertically to create other linear functions.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

\,\\\,A vertical translation (or shift) changes the y-intercept. It's represented by adding a value k to the function: f(x)+k.

In this example, the solid line represents the function f(x)=x.

The dashed line represents a shift 2 units down from f(x).

The transformed function is represented by f(x) = x - 2.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

A vertical dilation changes the slope (m) by multiplying the function by a factor k (where k \gt 0): k f(x). If k \gt 1, the line stretches vertically (gets steeper). If 0 \lt k \lt 1, the line compresses vertically (gets less steep).

The black dashed line represents a vertical dilation (stretch) by a factor of 2 on f(x). The equation of the new line becomes f(x) =2x.

The blue dashed line represents a vertical dilation (compression) by a factor of \dfrac{1}{3}. The equation of the new line becomes f(x) =\dfrac{1}{3}x.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

The dashed line represents another transformation on the parent function.

A vertical reflection occurs for k f(x) with k \lt 0.

A change in the slope of f(x) = x from 1 to -1represents a reflection of the line, which becomes f(x) = -x.

This vertical reflection will transform f(x) = x into f(x) = -x.

Transformations on the parent function f(x) = x can be used to graph and write equations.

Examples

Example 1

The graph shows the linear parent function f(x)=x (dashed line) and a transformed function g(x) (solid line). Describe the sequence of transformations applied to f(x) to create g(x).

-5
-4
-3
-2
-1
1
2
3
4
5
x
-5
-4
-3
-2
-1
1
2
3
4
5
y
Worked Solution
Create a strategy

Compare the slope and y-intercept of the transformed function g(x) to the parent function f(x)=x.

The parent function has a slope of 1 and a y-intercept of 0.

Identify any reflection, vertical dilation (stretch or compression), and vertical translation.

  • Check if the slope is negative (reflection).

  • Compare the absolute value of the slope to 1 (dilation).

  • Check the y-intercept (vertical translation).

Apply the idea

First, find the slope and y-intercept of the transformed function g(x). The y-intercept is the point where the line crosses the y-axis, which is (0,\,3). So, b=3.

To find the slope, identify two points on the line g(x). Besides the intercept (0,\,3), the line also passes through (2,\,2).

Using the slope formula: m = \dfrac{2-3}{2-0} = \dfrac{-1}{2} = -0.5

The equation for g(x) is g(x) = -0.5x + 3.

The parent function f(x)=x has a slope of 1 and a y-intercept of 0.

Now, compare the slope and intercept of g(x) to f(x).

  • The slope changed from 1 to -0.5. Since the sign is negative, there was a reflection across the x-axis.

  • The absolute value of the slope changed from |1|=1 to |-0.5|=0.5. Since 0.5 \lt 1, there was a vertical compression by a factor of 0.5 (or \dfrac{1}{2}).

  • The y-intercept changed from 0 to 3. This means there was a vertical translation up 3 units.

Therefore, the transformations from f(x)=x to g(x) are a reflection across the x-axis, a vertical compression by a factor of 0.5, and a vertical translation 3 units up.

Example 2

For each function, describe the transformations from the parent function f(x) = x by first identifying the slope and y-intercept.

a

g(x) = 5x

Worked Solution
Create a strategy

The functions f(x) and g(x) have the same y-intercept, but different slopes. This means a vertical dilation has occurred.

  • When the scale factor is greater than 1, a stretch has occurred.

  • When the scale factor between 0 and 1, a compression has occurred.

Apply the idea

The slope is 5.

The y-intercept is 0.

f(x)=x has been vertically stretched (made steeper) by a factor of 5.

b

g(x) = x - 2

Worked Solution
Create a strategy

The functions f(x) and g(x) have the same slope, but different y-intercepts. This means a vertical translation has occurred.

Apply the idea

The slope is 1.

The y-intercept is -2.

f(x) = x has been vertically translated (shifted) 2 units down.

c

g(x) = -\dfrac{2}{3}x + 4

Worked Solution
Create a strategy

The functions f(x) and g(x) have different slopes and different y-intercepts. This means a vertical dilation and a translation have occurred. In addition, the new slope is negative, which means a reflection has occurred.

Apply the idea

The slope is -\dfrac{2}{3}.

The y-intercept is 4.

f(x) = x has been reflected across the x-axis, compressed vertically (made less steep) by a factor of \dfrac{2}{3}, and vertically translated 4 units up.

Example 3

Determine what transformation has occurred from the parent function f(x) = x.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Worked Solution
Create a strategy

First, determine if the graph shows a vertical translation, dilation, or reflection compared to the parent function f(x)=x.

Apply the idea

Since the slope is negative, a vertical reflection has occurred, which means it is in the form k f(x) with k \lt 0.

The line has also been stretched by a scale factor of 2, so k=-2.

The slope changed from 1 (in f(x)=x) to -2. Since the slope is negative, a vertical reflection across the x-axis occurred.

The absolute value of the slope changed from |1|=1 to |-2|=2. Since 2 \gt 1, a vertical stretch by a factor of 2 occurred.

The transformation is a vertical reflection and a vertical stretch by a factor of 2.

Example 4

Graph the function f(x) = x after a vertical stretch by a factor of 3, and a vertical translation of -2 units. Write the equation of the transformed line.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Worked Solution
Create a strategy

A dilation will affect the slope of the line, and a translation will affect the y-intercept.

Apply the idea

A scale of 3 to the vertical stretch means the original slope of 1 will be multiplied by 3. This creates the equation y=3x, which is shown in the graph:

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

The second shift is 2 negative units, which means the y-intercept will change by -2, so the graph becomes:

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

The equation of the transformed line is y = 3x - 2.

Example 5

The drama club is raising money for a field trip to see a Broadway musical. To raise the money, they plan to set up a face-painting stand during the high-school football game, and charge \$4 per person. The function {R(x)=4x} represents their revenue in dollars where x represents the number of faces painted.

a

The club members spent \$45 on face-painting supplies. Write the function P(x) that represents their profit.

Worked Solution
Create a strategy

Profit is calculated by subtracting cost from the revenue.

Apply the idea

P(x)=4x-45

b

Describe the transformation applied to R(x) to get P(x).

Worked Solution
Create a strategy

We have subtracted 45 from the revenue function which can be represented by P(x)=R(x)-45. The two functions have the same slope, but their y-intercepts are different, meaning a translation has occurred.

Apply the idea

R(x) has been translated down 45 units to get P(x).

Reflect and check

In context, this means that the revenue is decreased by the costs of the supplies, and that is how we get the profit function.

c

The drama team realizes that they will need to paint 11 faces to break even at the current rate, so they decide to increase the cost per person to \$8.

The function N(x)=8x represents their new revenue function. Describe the transformation from the original revenue function, R(x), to the new revenue function, N(x).

Worked Solution
Create a strategy

When comparing R(x)=4x and N(x)=8x, we can see the only difference is a change in the slope. This means a dilation has occurred.

Apply the idea

The slope of N(x) is double the slope of R(x). This means R(x) has been vertically stretched by a factor of 2 to get N(x).

Reflect and check

Using technology to compare the graphs of R(x) and N(x), we can see that N(x) does represent a vertical stretch, and its outputs are double the outputs of R(x).

-3
-2
-1
1
2
3
x
-16
-12
-8
-4
4
8
12
16
y

Example 6

The graph shows the linear parent function f(x)=x (dashed line) and a transformed function g(x) (solid line). Write the equation for g(x).

-5
-4
-3
-2
-1
1
2
3
4
5
x
-5
-4
-3
-2
-1
1
2
3
4
5
y
Worked Solution
Create a strategy

To write the equation of the transformed line g(x), we need its slope (m) and y-intercept (b). We can determine these directly from the graph. The equation will be in the form g(x) = mx+b.

Apply the idea

Identify the y-intercept (b) where the solid line crosses the y-axis. The graph shows the line crosses at (0,\,-3). So, b = -3.

Identify another point on the solid line to calculate the slope. The graph also passes through the point (1,\,-1).

Calculate the slope (m) using the points (0,\,-3) and (1,\,-1).

m = \dfrac{\text{change in } y}{\text{change in } x} = \dfrac{-1 - (-3)}{1 - 0} = \dfrac{-1 + 3}{1} = \dfrac{2}{1} = 2

The slope is m = 2 and the y-intercept is b=-3.

Substitute these values into the slope-intercept form g(x) = mx+b.

The equation for the transformed function is g(x) = 2x - 3.

Reflect and check

We can check this by comparing to the parent function f(x)=x. The slope changed from 1 to 2, which represents a vertical stretch by a factor of 2. The y-intercept changed from 0 to -3, which represents a vertical translation down 3 units. These transformations match the appearance of the graph g(x) compared to f(x).

Example 7

Use transformations from the parent function f(x) = x to graph the function f(x) = 3x-4.

Worked Solution
Create a strategy

First, identify the transformations from the parent function. Then, use the transformations to graph the function.

Apply the idea
-6
-5
-4
-3
-2
-1
1
2
3
4
5
6
x
-6
-5
-4
-3
-2
-1
1
2
3
4
5
6
y

\,\\\,\\\,\\\,First, we can perform the vertical dilation by a scale factor of 3. Every y-value will be 3 times the value of the y-value of the parent function.

The resulting function is f(x) = 3x.

-6
-5
-4
-3
-2
-1
1
2
3
4
5
6
x
-6
-5
-4
-3
-2
-1
1
2
3
4
5
6
y

\,\\\,\\\,\\\,Next, we can perform the vertical translation down 4 units. Every y-value will be 4 less than the y-value of the function y = 3x.

The resulting function is f(x) = 3x-4.

Idea summary

The slope of a line is represented by

\displaystyle m= \dfrac{\text{change in }y}{\text{change in }x}=\dfrac{y_2-y_1}{x_2-x_1}
\bm{m}
slope
\bm{\left(x_1,\,y_1\right)}
a point on the line
\bm{\left(x_2,\,y_2\right)}
a second point on the line

The parent function f(x) = x can be transformed to write new functions with changes to the slope and y-intercept.

A vertical translation, represented by f(x) + k, shifts the graph vertically and changes the y-intercept b.

The graph shifts up by k units if k \gt 0, or down by |k| units if k \lt 0.

A vertical dilation represented by kf(x) changes the slope m. It stretches the graph vertically (makes it steeper) if |k| \gt 1 and compresses the graph vertically (makes it less steep) if 0 \lt |k| \lt 1.

A vertical reflection across the x-axis, represented by kf(x) where k \lt 0, changes the sign of the slope m.

Outcomes

AFDA.AF.1b

Describe the transformation from the parent function given the equation or the graph of the function.

AFDA.AF.1d

Write the equation of a linear, quadratic, or exponential function, given a graph, using transformations of the parent function.

AFDA.AF.1f

Graph a function given the equation of a function, using transformations of the parent function. Use technology to verify transformations of functions.

What is Mathspace

About Mathspace