The Slope of a Linear Function

Learning Outcomes

  • Define slope for a linear function
  • Calculate slope given two points
  • Interpret the slope of a linear function that models a real-world situation

Writing the equation that describes a linear function follows the same procedure for writing the equation of a line. You may be familiar with the slope-intercept form of a linear equation, where [latex]m[/latex] stands for the slope of the line and [latex]b[/latex] represents the y-intercept, the place where the line crosses the y-axis of the graph.

When discussing a linear function, ordered pairs of the form [latex]\left(x, y\right)[/latex] are written using function notation as [latex]\left(x, f(x)\right)[/latex]. The slope can be thought of as a rate of change in function output over a corresponding interval of input.

[latex]\begin{array}{cc}\text{Equation form}\hfill & y=mx+b\hfill \\ \text{Function notation}\hfill & f\left(x\right)=mx+b\hfill \end{array}[/latex]

We can calculate the slope [latex]m[/latex] of a line given two points on the line, [latex]\left(x_1, y_1\right)[/latex] and [latex]\left(x_2, y_2\right)[/latex] by using the formula

[latex]m=\dfrac{\text{change in output (rise)}}{\text{change in input (run)}}=\dfrac{\Delta y}{\Delta x}=\dfrac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}[/latex],

where [latex]\Delta y[/latex] represents the difference between the [latex]y[/latex] coordinates and [latex]\Delta x[/latex] represents the corresponding difference between the [latex]x[/latex] coordinates.

In a linear function, the coordinates of the points on the graph of a function represent input and output values for the function. The ordered pairs are written [latex]\left(x_1, f(x_1)\right)[/latex] and [latex]\left(x_2, f(x_2)\right)[/latex], and the formula for slope may be written equivalently as the formula for average rate of change

[latex]m=\dfrac{f\left({x}_{2}\right)-f\left({x}_{1}\right)}{{x}_{2}-{x}_{1}}[/latex].

The units for slope or for a rate of change are expressed as a ratio of output units over input units in the form

[latex]\dfrac{\text{units for the output}}{\text{units for the input}}[/latex].

Read these units as “change in units of the output value for each unit of change in input value.” For example, a rate may be given in miles per hour or a wage given in dollars per day.

Calculating Slope

The slope, or rate of change, of a function [latex]m[/latex] can be calculated using the following formula:

[latex]m=\dfrac{\text{change in output (rise)}}{\text{change in input (run)}}=\dfrac{\Delta y}{\Delta x}=\dfrac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}[/latex]

where [latex]{x}_{1}[/latex] and [latex]{x}_{2}[/latex] are input values, [latex]{y}_{1}[/latex] and [latex]{y}_{2}[/latex] are output values.

Given the equation of a line or a linear function in slope-intercept form, certain behavior of the graph can be seen by examining the value of [latex]m[/latex] in the equation [latex]y=mx+b[/latex] or the function [latex]f(x)=mx+b[/latex].

  • When the slope of a line or the rate of change of a linear function is positive, [latex]m \gt 0,[/latex] it will describe an “uphill” line in the plane, rising from left to right as the input increases.
  • When the slope of a line or the rate of change of a linear function is negative, [latex]m \lt 0,[/latex] it will describe a “downhill” line in the plan, falling from left to right as the input increases.
  • When the slope of a line or the rate of change of a linear function is 0, [latex]m = 0,[/latex] it will describe a flat, horizontal line in the plane, neither rising nor falling as the input increases.

Watch the video below to see how to find the slope of a line passing through two points and then determine whether the line is increasing, decreasing or neither.

Watch the next video to see an example of an application of slope in determining the increase in cost for producing solar panels given two data points.

The following video provides an example of how to write a function that will give the cost in dollars for a given number of credit hours taken, x.