Use Sophia to knock out your gen-ed requirements quickly and affordably. Learn more
×

Linear Functions and Graphs

Author: Sophia

what's covered
In this lesson, you will explore several aspects of linear functions. Specifically, this lesson will cover:

Table of Contents

1. Calculating and Interpreting Slope

As you may recall from previous coursework, the slope of a line between two points is fraction numerator change space in space y over denominator change space in space x end fraction comma which is often represented as fraction numerator increment y over denominator increment x end fraction.


Consider the graph shown. Given two points on a line, which we call open parentheses x subscript 1 comma space y subscript 1 close parentheses and open parentheses x subscript 2 comma space y subscript 2 close parentheses comma we calculate the slope as follows.

formula to know
Slope
The slope of a line containing the points open parentheses x subscript 1 comma space y subscript 1 close parentheses and open parentheses x subscript 2 comma space y subscript 2 close parentheses is given by m equals rise over run equals fraction numerator increment y over denominator increment x end fraction equals fraction numerator y subscript 2 minus y subscript 1 over denominator x subscript 2 minus x subscript 1 end fraction.
Using function notation, where y equals f open parentheses x close parentheses comma the slope can also be written m equals fraction numerator f open parentheses x subscript 2 close parentheses minus f open parentheses x subscript 1 close parentheses over denominator x subscript 2 minus x subscript 1 end fraction.

EXAMPLE

Consider the points open parentheses short dash 1 comma space 2 close parentheses and open parentheses 3 comma space 5 close parentheses.



To find the slope of the line containing the points, write open parentheses x subscript 1 comma space y subscript 1 close parentheses equals open parentheses short dash 1 comma space 2 close parentheses and open parentheses x subscript 2 comma space y subscript 2 close parentheses equals open parentheses 3 comma space 5 close parentheses comma then use the slope formula.

The slope of the line containing these points is m equals fraction numerator 5 minus 2 over denominator 3 minus open parentheses short dash 1 close parentheses end fraction equals 3 over 4.

This is depicted on the graph. To get from the left-hand point to the right-hand point, you move up 3 units, then move right 4 units.

Note that this graph describes y as a function of x.

EXAMPLE

Consider the points open parentheses 10 comma space 12 close parentheses and open parentheses 16 comma space 10 close parentheses.



To find the slope of the line containing the points, write open parentheses x subscript 1 comma space y subscript 1 close parentheses equals open parentheses 10 comma space 12 close parentheses and open parentheses x subscript 2 comma space y subscript 2 close parentheses equals open parentheses 16 comma space 10 close parentheses comma then use the slope formula.

The slope of the line containing these points is m equals fraction numerator 10 minus 12 over denominator 16 minus 10 end fraction equals fraction numerator short dash 2 over denominator 6 end fraction equals short dash 1 third.

This is depicted on the graph. To get from open parentheses 10 comma space 12 close parentheses to open parentheses 16 comma space 10 close parentheses comma move down 2 units, then to the right 6 units. This translates to rise over run equals fraction numerator short dash 2 over denominator 6 end fraction equals short dash 1 third.

Note that this graph describes y as a function of x.

EXAMPLE

Consider the points open parentheses 1 comma space 6 close parentheses and open parentheses 5 comma space 6 close parentheses.



To find the slope, write open parentheses x subscript 1 comma space y subscript 1 close parentheses equals open parentheses 1 comma space 6 close parentheses and open parentheses x subscript 2 comma space y subscript 2 close parentheses equals open parentheses 5 comma space 6 close parentheses comma then use the slope formula.

The slope of the line containing these points is m equals fraction numerator 6 minus 6 over denominator 5 minus 1 end fraction equals 0 over 4 equals 0.

This is depicted on the graph. Moving from left to right, there is no rise over a horizontal run of 6 units.

Note that this graph describes y as a function of x.

watch
In this video, we will find the slope of a line given the graph of the line.

Note that the lines in all three examples were functions. Based on this simple fact, we define a linear function as a function whose graph is a line.

big idea
Given a linear function, we make the following connections about slope:
  • A positive slope indicates that the line is rising to the right, indicating that the function is increasing.
  • A negative slope indicates that the line is falling to the right, indicating that the function is decreasing.
  • A zero slope indicates that the line is flat, indicating that the function is constant.

Here is a problem for you to try.

try it
Consider the line that contains the points open parentheses short dash 5 comma space 3 close parentheses and open parentheses 11 comma space 1 close parentheses.
Calculate the slope of the line.
Using the formula m equals fraction numerator y subscript 2 minus y subscript 1 over denominator x subscript 2 minus x subscript 1 end fraction comma the slope is:

fraction numerator 1 minus 3 over denominator 11 minus open parentheses short dash 5 close parentheses end fraction equals fraction numerator short dash 2 over denominator 16 end fraction equals short dash 1 over 8


When x and y represent quantities, the slope can be interpreted as a rate of change.

EXAMPLE

Suppose that in 2017, the population of a small town was 4,124 and in 2021, the population rose to 5,000.

Question: What was the average population growth over the four-year period?

The population increased from 4,124 to 5,000, which is a difference of 876 people. Then, the rate at which the population changed is fraction numerator 876 space people over denominator 4 space years end fraction equals 219 space straight p straight e straight o straight p straight l straight e straight divided by straight y straight e straight a straight r.

Notice how slope can be used to answer this question. If we let y equals the population of the town and x equals the year, then we have two ordered pairs to describe the situation: open parentheses 2017 comma space 4124 close parentheses and open parentheses 2021 comma space 5000 close parentheses.

Then, the slope of the line that joins these two points is:

m equals fraction numerator 500 space people minus 4124 space people over denominator 2021 minus 2017 end fraction equals fraction numerator 876 space people over denominator 4 space years end fraction equals 219 space straight p straight e straight o straight p straight l straight e straight divided by straight y straight e straight a straight r

Thus, the population increased on average by 219 people per year.

big idea
  • The slope can be interpreted as a rate of change.
  • If we view x as the input and y as the output (as with a function), then the units of slope are fraction numerator units space for space the space output space open parentheses y close parentheses over denominator units space for space the space input space open parentheses x close parentheses end fraction.

Here is a problem for you to try on your own.

try it
Jessica is walking home from a friend’s house. Two minutes after leaving, she is 1.4 miles from home. Twelve minutes after leaving, she is 0.9 miles from home.
What is her average rate in miles per hour?
The time frame we are working with is 12 minus 2 equals 10 minutes.

The distance traveled in this time frame is 1.4 minus 0.9 equals 0.5 miles.

Then, Jessica’s average rate of change is fraction numerator 0.05 space miles over denominator 10 space minutes end fraction equals 0.05 space miles space per space minute.

To convert to miler per hour, remember that there are 60 minutes in every hour.

Then, her rate is fraction numerator 0.05 space miles over denominator minute end fraction times fraction numerator 60 space minutes over denominator hour end fraction equals 3 space miles space per space hour.

Now that we have made the connection between slope and linear functions, let’s take a closer look at how these ideas intertwine.

term to know
Linear Function
A function whose graph is a line.


2. Representing Linear Functions

There are four forms that are used to represent a function: word form, equation (function) form, table form, and graph form. Through this tutorial, we will see how these are connected when the situation is modeled by a linear function.

A key connection to make is between the equation of the linear function, its corresponding table of values, and its graph.

Consider the equation f open parentheses x close parentheses equals 2 x plus 3.

Here is a table of values:

bold italic x 0 1 2 3 4
bold italic f open parentheses bold x close parentheses bold equals bold 2 bold italic x bold plus bold 3 3 5 7 9 11

Here is the graph of this function:

Note that f open parentheses x close parentheses equals 2 x plus 3 is a linear function, and therefore must have a slope.

Let’s take two input-output pairs: open parentheses 0 comma space 3 close parentheses and open parentheses 3 comma space 9 close parentheses.

Calculate the slope between them: m equals fraction numerator increment y over denominator increment x end fraction equals fraction numerator 9 minus 3 over denominator 3 minus 0 end fraction equals 2

Let’s choose two other points: open parentheses 1 comma space 5 close parentheses and open parentheses 2 comma space 7 close parentheses.

Calculate the slope between them: m equals fraction numerator increment y over denominator increment x end fraction equals fraction numerator 7 minus 5 over denominator 2 minus 1 end fraction equals 2

In fact, given that the graph is a line, the slope of the line between any two points should be 2.

Notice also that when x equals 0 comma y equals 2 open parentheses 0 close parentheses plus 3 equals 3. This means that the graph has y-intercept open parentheses 0 comma space 3 close parentheses.

Given the equation of any linear function, y equals m x plus b comma we can make some generalizations.

big idea
The equation of a linear function is y equals m x plus b or using function notation, f open parentheses x close parentheses equals m x plus b.

The value of m is the slope and represents the constant rate of change.

The value of b is the y-coordinate of the y-intercept. That is, the point open parentheses 0 comma space b close parentheses is on the line.

You may remember from previous coursework that the equation y equals m x plus b has a special name, called the slope-intercept form.

The slope-intercept form of a line is the most convenient to use to model situations. Through the next few examples, we will see how the graph, table, function, and verbal descriptions relate to each other.

EXAMPLE

John is mountain climbing and begins his journey at an elevation of 500 feet. He also ascends at a rate of 80 feet per hour.

Let t equals the number of hours that John is ascending, and E open parentheses t close parentheses equals his elevation after t hours. Since John is ascending at a constant rate, a linear function can be used to model this situation.

Let’s now look at the four ways to represent this function:

Word form:
John’s initial elevation is 500 feet and increases by 80 feet every hour.

Table form:
Using whole hours as inputs, here is a table:

bold italic t bold equals bold # hours 0 1 2 3 4 5
bold italic E open parentheses bold t close parentheses bold equals elevation (feet) 500 580 660 740 820 900

Note how the value of E open parentheses t close parentheses increases by 80 units for every unit that t increases.

Equation form:
Normally, we seek a model of the form y equals m x plus b. Since t is the input and E open parentheses t close parentheses is the output, our model will have the form E open parentheses t close parentheses equals m t plus b.

To write an equation, note that John’s elevation when t equals 0 is 500 feet, indicating that this is the y-intercept. From the table above, the constant rate of change is 80 feet per hour, indicating that the slope of the model is 80.

At this point, we deduce that E open parentheses t close parentheses equals 80 t plus 500.

Graph form:
Using the points from the table, we have the following graph. Note that the graph rises to the right, indicating that E open parentheses t close parentheses is an increasing function.



Note that only nonnegative values of t are used in this situation. This means the domain of this function is open square brackets 0 comma space infinity close parentheses. Even though the expression for E open parentheses t close parentheses is defined for all possible values of t, only nonnegative values of t will provide meaningful results. This is because John can’t climb mountains for a negative amount of time.

Now that we have this insight, writing the equation of a linear function will be a bit easier.

EXAMPLE

A basement has flooded. After pumping begins, the amount of water (in gallons) in the basement t hours after pumping began is given by the function G open parentheses t close parentheses equals 8000 minus 1200 t.

Let’s find and interpret the other forms of the function. Since the equation was given, the table and graph follow nicely.

Equation form: G open parentheses t close parentheses equals 8000 minus 1200 t

Table form:
bold italic t bold equals bold # hours 0 1 2 3 4 5
bold italic G bold equals bold # gallons remaining 8000 6800 5600 4400 3200 2000

Notice: Every time t increases by one unit, the value of G open parentheses t close parentheses decreases by 1200 units.

Graph form:
Note that the graph falls to the right, which means G open parentheses t close parentheses is decreasing.



Notice that the number of gallons in the basement is decreasing over time. Once there are zero gallons remaining, the pumping will stop. We can use the equation to find when this happens:

G open parentheses t close parentheses equals 0 Set G open parentheses t close parentheses to 0.
8000 minus 1200 t equals 0 Replace G open parentheses t close parentheses with 8000 minus 1200 t.
short dash 1200 t equals short dash 8000 Subtract 8000 from both sides.
t equals fraction numerator short dash 8000 over denominator short dash 1200 end fraction Divide both sides by -1200.
t equals 20 over 3 space or space 6 2 over 3 Simplify.

This means that the basement is empty after 6 2 over 3 hours. Or 6 hours and 40 minutes. This is represented on the graph by the t-intercept.

Word Form:
Initially, there are 8000 gallons of water in the basement. After pumping begins, the water is removed at a constant rate of 1200 gallons per hour.

We have seen examples with rates of change that led to increasing and decreasing functions. Now, let’s look at one where the function is constant.

EXAMPLE

A cellular phone plan costs $80 regardless of how much data is used. Let C open parentheses x close parentheses equals the cost of the plan after using x gigabytes of data.

Here is a table of values for various input-output pairs:

bold italic x 0 1 2 3 6 20
bold italic C open parentheses bold x close parentheses 80 80 80 80 80 80

Regardless of how much data is used, the cost remains the same.

Written in equation form, C open parentheses x close parentheses equals 80. Regardless of the input, the output is 80, which represents a plan cost of $80.

The graph of the function is below. Note that the graph is not rising nor falling, indicating that C open parentheses x close parentheses is a constant function.

The equation in the last example was written C open parentheses x close parentheses equals 80. To align with the slope-intercept form, it could also be written C open parentheses x close parentheses equals 0 x plus 80. This means that the slope of the line is 0. Through the last three examples, this leads to an important connection between the slope of the line and whether its corresponding function is increasing, decreasing, or constant.

big idea
Given that a situation is modeled by a linear function f open parentheses x close parentheses equals m x plus b colon
  • A positive slope open parentheses m greater than 0 close parentheses indicates that f open parentheses x close parentheses is increasing.
  • A negative slope open parentheses m less than 0 close parentheses indicates that f open parentheses x close parentheses is decreasing.
  • A zero slope open parentheses m equals 0 close parentheses indicates that f open parentheses x close parentheses is constant.

try it
A boat is 100 miles from the marina and is sailing toward it at a rate of 10 miles per hour.

Here is an example that is very applicable to everyday life: converting between Celsius and Fahrenheit.

try it
Given a temperature measured in degrees Celsius, the temperature in degrees Fahrenheit is given by the function F open parentheses C close parentheses equals 1.8 C plus 32.

term to know
Slope-Intercept Form
A linear equation in the form y equals m x plus b comma where m is the slope (constant rate of change) and open parentheses 0 comma space b close parentheses is the y-intercept.

summary
In this lesson, you began by reviewing how to calculate slope of a line from a graph and by applying the slope formula. You learned that a linear function is defined as a function whose graph is a line, and that given a linear function, you can interpret its slope to determine if the function is increasing (positive slope), decreasing (negative slope), or constant (zero slope). You also learned that the slope of a linear model is the ratio of changes in output values to changes in input values, and that slope represents a constant rate of change. Lastly, you learned that in modeling situations, the slope is the link between the four different ways to represent a linear function—word form, equation (function) form, table form, and graph form—noting that the slope-intercept form of a line is the most convenient to use to model situations.

SOURCE: THIS TUTORIAL HAS BEEN ADAPTED FROM OPENSTAX "PRECALCULUS” BY JAY ABRAMSON. ACCESS FOR FREE AT OPENSTAX.ORG/DETAILS/BOOKS/PRECALCULUS-2E. LICENSE: CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL.

Terms to Know
Linear Function

A function whose graph is a line.

Slope-Intercept Form

A linear equation in the form y equals m x plus b comma where m is the slope (constant rate of change) and open parentheses 0 comma space b close parentheses is the y-intercept.

Formulas to Know
Slope

The slope of a line containing the points open parentheses x subscript 1 comma space y subscript 1 close parentheses and open parentheses x subscript 2 comma space y subscript 2 close parentheses is given by m equals rise over run equals fraction numerator increment y over denominator increment x end fraction equals fraction numerator y subscript 2 minus y subscript 1 over denominator x subscript 2 minus x subscript 1 end fraction.

Using function notation, where y equals f open parentheses x close parentheses comma the slope can also be written m equals fraction numerator f open parentheses x subscript 2 close parentheses minus f open parentheses x subscript 1 close parentheses over denominator x subscript 2 minus x subscript 1 end fraction.