topic badge

3.05 Graphing linear functions

Introduction

We will continue to expand on our knowledge of key features of functions by focusing on the characteristics of linear functions that we have seen in 8th grade. We will identify, compare, and graph key features of linear functions.

Characteristics of linear functions

The characteristics or key features of a function are useful in helping to interpret information about the function in a given context.

Exploration

Consider the following representations

A table with 5 rows and 2 columns titled x and f of x. The data is as follows: 0, 2; 1, 3.5; 2, 5; 8, 14, and 15, 24.5.
Table
A line in quadrant one of the coordinate plane. Labeled Depth in inches along the y-axis and Time in hours along the x-axis. The line passes through (0,2), (1,3.5), (2,5), (8,14), (13, 21.5).
Graph
A text saying The initial depth of snow is 2 inches. The snow falls at a rate of 1.5 inches per hour.
Description
An equation. f of x equals 1.5 x plus 2.
Equation
  1. What do the table, description, graph, and equation representations have in common?
  2. What is different about each representation?

Tables, descriptions, graphs, and equations all model the same set of points (or solutions) in different ways. Key features can be identified and connected between the different forms.

Linear function

A function that has a constant rate of change.

One of the defining characteristics of linear functions is that they have a constant rate of change since the rate of change is always the same over every interval of the function. We call this the slope.

Slope

The ratio of the change in the vertical direction (y-direction) to change in the horizontal direction (x-direction).

We can use the following formula to calculate the slope of a linear function.

\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

This formula is very similar to the average rate of change:\dfrac{f(b)-f(a)}{b-a}However, we don't have to take into account the interval a \leq x \leq b since the rate of change of a linear function is constant.

Examples

Example 1

Consider functions f and g shown below:

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
x-10123
g(x)22222
a

Compare the domain and range of each function.

Worked Solution
Create a strategy

The domain of a function is the set of all x-values that correspond to a point on the graph. The range of a function is the set of all y-values that correspond to a point on the graph.

Apply the idea

The domain of both functions is all real values of x since both functions are linear and have no domain restrictions from their contexts.

In the graph of f, as x increases toward infinity y also increases toward infinity, and as x decreases toward negative infinity y also decreases toward negative infinity. Thus, the range of f is all real numbers.

On the other hand, g is a constant function whose only y value is 2. So the range of g is just {2}.

b

Compare the intercepts of each function.

Worked Solution
Create a strategy

The x-intercepts of a function are the points where it intersects the x-axis. Similarly, the y-intercept of a function is the point where it intersects the y-axis.

As these are linear functions, they will have at most one of each type of intercept.

Apply the idea

We can see that function f crosses the x-axis at the point \left(2, 0\right), and crosses the y-axis at the point \left(0, -2\right).

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

Function g crosses the y-axis at the point \left(0, 2\right) based on the table. Since it is a constant function, it is parallel to the x-axis and it does not have an x-intercept.

Reflect and check

We should be able to find the key features of a linear function no matter what form it's given in, however, we can also model the functions in the same representation to make comparisons easier.

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

Compare the slope of each function.

Worked Solution
Create a strategy

The slope of a line is the ratio of its change in the vertical direction to the change in the horizontal direction.

Apply the idea

For function f we can see that at any point on the graph, if we move 1 unit to the right (in the x-direction), we also move 1 unit up (in the y-direction).

So the slope of f is 1.

Function g is a constant function, which has no change in its y-values. That is, at any point on the graph, moving 1 unit to the right corresponds to 0 units of change in the vertical direction.

So the slope of g is 0.

The slope of f is steeper than the slope of g.

Idea summary

The key features of a linear function are the slope, x-intercept and y -intercept. We can find the key features in different ways depending on how the function is represented:

Slope:

  • From a graph: Count the slope as the rise over the run or find two points and use the slope formula.
  • Table: Find the difference in two consecutive and the difference in the corresponding inputs and write the slope as a ratio of change in output divided by change in input or find two input-output pairs and use the slope formula.
  • Description: The slope is the rate given in the problem.

Intercepts:

  • From a graph: The x-intercept is the point where the line crosses the x-axis, and the y-intercept is the point where the line crosses the y-axis.
  • From a table: x-intercept is when y=0 and the y-intercept is when x=0.
  • From a description: The x-intercept is when the output is equal to 0, and the y-intercept is usually the initial value.

Graphing linear functions

Exploration

During a snowstorm, the initial depth of snow is 2 inches. The snow falls at a rate of 1.5 inches per hour.

The following graph and equation both represent this situation.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
\text{x, Time (hours)}
2
4
6
8
10
12
14
16
18
20
22
\text{y, Depth (inches)}

Equation: y=1.5x+2

  1. Choose any point on the line, substitute its coordinates into the equation, and evaluate.
  2. Repeat with two more points on the line. What do you notice?
  3. Choose any point not on the line, substitute its coordinates into the equation, and evaluate.
  4. Repeat with two more points, not on the line. What do you notice?
  5. Substitute a value between 1 and 15 into the equation for x and evaluate.
  6. Explain the relationship between the equation and the points on the graph.

The graph of a line is made up of all of the points that are solutions to the equation that represents it. Any point that is not a solution to the equation will not be on the line. This means we can draw the graph of a line by graphing the points that are solutions to its equation.

To graph a linear function we can find any two points and connect them with a line. We can do this by constructing a table of values and plugging in two different values for x. If we know the slope, we can find one point and use the slope to identify a second point on the graph.

Examples

Example 2

Consider the linear function f\left(x\right) = 4x - 8:

a

Graph f\left(x\right).

Worked Solution
Create a strategy

We can construct a table of values and find two input-output pairs to plot on our graph.

Apply the idea
xf(x)=4x-8y
04(0)-8-8
14(1)-8-4

The ordered pairs from the table are (0,-8), (1,-4).

-8
-6
-4
-2
2
4
6
8
x
-8
-6
-4
-2
2
4
6
8
y
Reflect and check

We can verify our graph is correct by finding additional points from f(x) and check that the line passes through them. For example, f(2)=0 and f(3)=4 which we can see on the graph as the points (2,0) and (3,4).

-8
-6
-4
-2
2
4
6
8
x
-8
-6
-4
-2
2
4
6
8
y
b

Determine whether f(x) has a greater rate of change than the function shown in the following graph:

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

We know that the rate of change is the slope of a function, and we can use the slope formula to calculate the slope of a given graph. We need two points from each graph.

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

Suppose we use (0,-2) and (2,4) from the graph. The slope is

m= \dfrac{\text{change in }y}{\text{change in }x}=\dfrac{y_2-y_1}{x_2-x_1}=\dfrac{4-(-2)}{2-0}=\dfrac{6}{2}=3

For f\left(x\right), suppose we use the two ordered pairs, \left(0,-8\right) and \left(1,-4\right), that we found lie on the graph in part (a).m= \dfrac{\text{change in }y}{\text{change in }x}=\dfrac{y_2-y_1}{x_2-x_1}=\dfrac{-4-(-8)}{1-0}=\dfrac{4}{1}=4

Since the slope of this function is 3 and the slope of f(x) is 4, f(x) has the greater rate of change.

Example 3

Whitney is traveling across the city by taking an Uber ride. The cost of the ride is a flat fee of \$2.80 plus and additional \$2.40 for every mile.

a

Graph the function using appropriate labels and scales.

Worked Solution
Create a strategy

The key features of the slope and y-intercept in the problem can be used to graph the function from the description.

Apply the idea

The y-intercept of the function is at (0, 2.80), the flat fee of \$2.80. The rate of change, or slope, of the function is indicated by the charge per mile, \$2.40. This will help us graph the cost of the first few miles. After 1 mile, the ride costs \$5.20.

1
2
3
4
5
6
7
8
9
\text{Distance (miles)}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
\text{Cost (dollars)}
b

If Whitney is traveling a distance of 4 miles, determine the cost of her trip.

Worked Solution
Create a strategy

We want to find the cost of the trip at 4 miles. The larger of the two values will be the cost of Whitney's trip. We can find the cost with numerical caclulations or by using the graph.

Apply the idea

The Uber ribe will cost \$2.40 for each of the 4 miles, plus the flat fee of \$2.80:2.4\left(4\right) + 2.8 = 9.6 + 2.8= 12.4

The cost of her trip will be \$12.40.

c

Verify that the point (20, 50.8) is on the graph of the function.

Worked Solution
Create a strategy

We can use the description of the scenario to determine if traveling 20 miles lead to a cost of \$50.80.

Apply the idea

We have 2.4\left(20\right) + 2.8 = 48 + 2.8= 50.8

Since the cost of the Uber ride is \$50.80 for a 20-mile ride, we can confirm that the point (20, 50.8) is on the graph of the function.

Idea summary

When graphing a linear function, we need one of the following:

  • Any two points on the line of the function
  • A point on the line and the function's slope

Outcomes

A.REI.D.10

Understand that the graph of an equation in two variables is the set of all its solutions plotted in the coordinate plane, often forming a curve (which could be a line).

F.IF.C.7

Graph functions expressed symbolically and show key features of the graph, by hand in simple cases and using technology for more complicated cases.

F.IF.C.7.A

Graph linear and quadratic functions and show intercepts, maxima, and minima.

F.IF.C.9

Compare properties of two functions each represented in a different way (algebraically, graphically, numerically in tables, or by verbal descriptions).

What is Mathspace

About Mathspace