topic badge

3.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 recall 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.

There are several function familiesthat share the same general shape but may have been shifted or reflected in some way. As we examine linear functions, we notice that we can transform the parent function f\left(x\right)= x by translating, dilating, or reflecting it vertically to create new functions.

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

\,\\\,A vertical translation, or shift, to the y-intercept of f\left(x\right) represents the transformed function f\left(x\right)+k.

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

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

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

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

\,\\\,A horizontal translation, or shift, to the x-intercept of f\left(x\right) represents the transformed function f\left(x+k\right).

The solid line represents the function f\left(x\right)=x, which is the same as above. Notice we can achieve the same transformed function by shifting the parent function 2 units right.

The dashed line represents a shift 2 units right from f\left(x\right). The transformed function is represented by f\left(x+2\right) = x.

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

The slope of a line can be transformed by a vertical dilation, represented as k f\left(x\right) with k>0. The line will either compress or stretch depending on the factor used on the slope, m.

The black dashed line represents a vertical dilation (stretch) by a factor of 2 on f\left(x\right). The equation of the new line becomes f\left(x\right) =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\left(x\right) =\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\left(x\right) with k<0.

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

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

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

Examples

Example 1

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 whether the transformation can be achieve through a transformation, dilation, or reflection.

Apply the idea

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

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

For our equation, f(x) = -2x.

Example 2

Consider the graph of the parent function f\left(x\right) = x. Graph the function after a vertical stretch of 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 3

By first identifying the slope and y-intercept, describe the transformations of the following lines from the parent line f\left(x\right) = x.

a

g\left(x\right) = 5x

Worked Solution
Create a strategy

The functions f\left(x\right) and g\left(x\right) 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\left(x\right)=x has been vertically stretched (made steeper) by a factor of 5.

b

g\left(x\right) = x - 2

Worked Solution
Create a strategy

The functions f\left(x\right) and g\left(x\right) 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\left(x\right) = x has been vertically translated (shifted) 2 units down.

c

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

Worked Solution
Create a strategy

The functions f\left(x\right) and g\left(x\right) 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\left(x\right) = 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 4

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\left(x\right)=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\left(x\right) that represents their profit.

Worked Solution
Create a strategy

Profit is calculated by subtracting cost from the revenue.

Apply the idea

P\left(x\right)=4x-45

b

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

Worked Solution
Create a strategy

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

Apply the idea

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

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\left(x\right)=8x represents their new revenue function.

Describe the transformation from the original revenue function, R\left(x\right), to the new revenue function, N\left(x\right).

Worked Solution
Create a strategy

When comparing R\left(x\right)=4x and N\left(x\right)=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\left(x\right) is double the slope of R\left(x\right). This means R\left(x\right) has been vertically stretched by a factor of 2 to get N\left(x\right).

Reflect and check

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

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

Example 5

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 form 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\left(x\right) = x can be transformed to write new functions with changes to the slope and y-intercept.

A vertical shift represented by f\left(x\right) + k will translate the graph of a total of k units up if k \gt 0 or k units down if k \lt 0

A horizontal shift represented by f\left(x +k\right) will translate the graph of a total of k units right if k \gt 0 or k units left if k \lt 0

A transformation of a vertical dilation kf\left(x\right) will stretch a graph's slope if k \gt 1 or compress the graph if 0 \lt k \lt 1

A vertical reflection of k will change the sign of the slope.

Outcomes

A.F.1

The student will investigate, analyze, and compare linear functions algebraically and graphically, and model linear relationships.

A.F.1b

Investigate and explain how transformations to the parent function y = x affect the rate of change (slope) and the y-intercept of a linear function.

A.F.1f

Graph a linear function in two variables, with and without the use of technology, including those that can represent contextual situations.

A.F.1h

Compare and contrast the characteristics of linear functions represented algebraically, graphically, in tables, and in contextual situations.

What is Mathspace

About Mathspace