Linear Functions

Learning Outcomes

  • Calculate the slope of a linear function and interpret its meaning

The easiest type of function to consider is a linear function. Linear functions have the form [latex]f(x)=ax+b[/latex], where [latex]a[/latex] and [latex]b[/latex] are constants. In Figure 1, we see examples of linear functions when [latex]a[/latex] is positive, negative, and zero. Note that if [latex]a>0[/latex], the graph of the line rises as [latex]x[/latex] increases. In other words, [latex]f(x)=ax+b[/latex] is increasing on [latex](−\infty, \infty)[/latex]. If [latex]a<0[/latex], the graph of the line falls as [latex]x[/latex] increases. In this case, [latex]f(x)=ax+b[/latex] is decreasing on [latex](−\infty, \infty)[/latex]. If [latex]a=0[/latex], the line is horizontal.

An image of a graph. The y axis runs from -2 to 5 and the x axis runs from -2 to 5. The graph is of the 3 functions. The first function is “f(x) = 3x + 1”, which is an increasing straight line with an x intercept at ((-1/3), 0) and a y intercept at (0, 1). The second function is “g(x) = 2”, which is a horizontal line with a y intercept at (0, 2) and no x intercept. The third function is “h(x) = (-1/2)x”, which is a decreasing straight line with an x intercept and y intercept both at the origin. The function f(x) is increasing at a higher rate than the function h(x) is decreasing.

Figure 1. These linear functions are increasing or decreasing on [latex](-\infty, \infty)[/latex] and one function is a horizontal line.

Slope

As suggested by Figure 1, the graph of any linear function is a line. One of the distinguishing features of a line is its slope. The slope is the change in [latex]y[/latex] for each unit change in [latex]x[/latex]. The slope measures both the steepness and the direction of a line. If the slope is positive, the line points upward when moving from left to right. If the slope is negative, the line points downward when moving from left to right. If the slope is zero, the line is horizontal. To calculate the slope of a line, we need to determine the ratio of the change in [latex]y[/latex] versus the change in [latex]x[/latex]. To do so, we choose any two points [latex](x_1,y_1)[/latex] and [latex](x_2,y_2)[/latex] on the line and calculate [latex]\dfrac{y_2-y_1}{x_2-x_1}[/latex]. In Figure 2, we see this ratio is independent of the points chosen.

An image of a graph. The y axis runs from -1 to 10 and the x axis runs from -1 to 6. The graph is of a function that is an increasing straight line. There are four points labeled on the function at (1, 1), (2, 3), (3, 5), and (5, 9). There is a dotted horizontal line from the labeled function point (1, 1) to the unlabeled point (3, 1) which is not on the function, and then dotted vertical line from the unlabeled point (3, 1), which is not on the function, to the labeled function point (3, 5). These two dotted have the label “(y2 - y1)/(x2 - x1) = (5 -1)/(3 - 1) = 2”. There is a dotted horizontal line from the labeled function point (2, 3) to the unlabeled point (5, 3) which is not on the function, and then dotted vertical line from the unlabeled point (5, 3), which is not on the function, to the labeled function point (5, 9). These two dotted have the label “(y2 - y1)/(x2 - x1) = (9 -3)/(5 - 2) = 2”.

Figure 2. or any linear function, the slope [latex](y_2-y_1)/(x_2-x_1)[/latex] is independent of the choice of points [latex](x_1,y_1)[/latex] and [latex](x_2,y_2)[/latex] on the line.

 

Definition


Consider line [latex]L[/latex] passing through points [latex](x_1,y_1)[/latex] and [latex](x_2,y_2)[/latex]. Let [latex]\Delta y=y_2-y_1[/latex] and [latex]\Delta x=x_2-x_1[/latex] denote the changes in [latex]y[/latex] and [latex]x[/latex], respectively. The slope of the line is

[latex]m=\dfrac{y_2-y_1}{x_2-x_1}=\dfrac{\Delta y}{\Delta x}[/latex]

Linear Function Formulas

We now examine the relationship between slope and the formula for a linear function. Consider the linear function given by the formula [latex]f(x)=ax+b[/latex]. As discussed earlier, we know the graph of a linear function is given by a line. We can use our definition of slope to calculate the slope of this line. As shown, we can determine the slope by calculating [latex](y_2-y_1)/(x_2-x_1)[/latex] for any points [latex](x_1,y_1)[/latex] and [latex](x_2,y_2)[/latex] on the line. Evaluating the function [latex]f[/latex] at [latex]x=0[/latex], we see that [latex](0,b)[/latex] is a point on this line. Evaluating this function at [latex]x=1[/latex], we see that [latex](1,a+b)[/latex] is also a point on this line. Therefore, the slope of this line is

[latex]\dfrac{(a+b)-b}{1-0}=a[/latex].

 

We have shown that the coefficient [latex]a[/latex] is the slope of the line. We can conclude that the formula [latex]f(x)=ax+b[/latex] describes a line with slope [latex]a[/latex]. Furthermore, because this line intersects the [latex]y[/latex]-axis at the point [latex](0,b)[/latex], we see that the [latex]y[/latex]-intercept for this linear function is [latex](0,b)[/latex]. We conclude that the formula [latex]f(x)=ax+b[/latex] tells us the slope, [latex]a[/latex], and the [latex]y[/latex]-intercept, [latex](0,b)[/latex], for this line. Since we often use the symbol [latex]m[/latex] to denote the slope of a line, we can write

[latex]f(x)=mx+b[/latex]

 

to denote the slope-intercept form of a linear function.

Sometimes it is convenient to express a linear function in different ways. For example, suppose the graph of a linear function passes through the point [latex](x_1,y_1)[/latex] and the slope of the line is [latex]m[/latex]. Since any other point [latex](x,f(x))[/latex] on the graph of [latex]f[/latex] must satisfy the equation

[latex]m=\dfrac{f(x)-y_1}{x-x_1}[/latex],

 

this linear function can be expressed by writing

[latex]f(x)-y_1=m(x-x_1)[/latex].

 

We call this equation the point-slope equation for that linear function.

Since every nonvertical line is the graph of a linear function, the points on a nonvertical line can be described using the slope-intercept or point-slope equations. However, a vertical line does not represent the graph of a function and cannot be expressed in either of these forms. Instead, a vertical line is described by the equation [latex]x=k[/latex] for some constant [latex]k[/latex]. Since neither the slope-intercept form nor the point-slope form allows for vertical lines, we use the notation

[latex]ax+by=c[/latex],

 

where [latex]a,b[/latex] are both not zero, to denote the standard form of a line.

Definition


Consider a line passing through the point [latex](x_1,y_1)[/latex] with slope [latex]m[/latex]. The equation

[latex]y-y_1=m(x-x_1)[/latex]

is the point-slope equation for that line.

 

Consider a line with slope [latex]m[/latex] and [latex]y[/latex]-intercept [latex](0,b)[/latex]. The equation

[latex]y=mx+b[/latex]

is an equation for that line in slope-intercept form.

 

The standard form of a line is given by the equation

[latex]ax+by=c[/latex]

 

where [latex]a[/latex] and [latex]b[/latex] are both not zero. This form is more general because it allows for a vertical line, [latex]x=k[/latex].

Example: Finding the Slope and Equations of Lines

Consider the line passing through the points [latex](11,-4)[/latex] and [latex](-4,5)[/latex], as shown in Figure 3.

An image of a graph. The x axis runs from -5 to 12 and the y axis runs from -5 to 6. The graph is of the function that is a decreasing straight line. The function has two points plotted, at (-4, 5) and (11, 4).

Figure 3. Finding the equation of a linear function with a graph that is a line between two given points.

  1. Find the slope of the line.
  2. Find an equation for this linear function in point-slope form.
  3. Find an equation for this linear function in slope-intercept form.

Watch the following video to see the worked solution to Example: Finding the Slope and Equations of Lines

Try It

Consider the line passing through points [latex](-3,2)[/latex] and [latex](1,4)[/latex]. Find the slope of the line.

Find an equation of that line in point-slope form. Find an equation of that line in slope-intercept form.

 

 

Example: A Linear Distance Function

Jessica leaves her house at 5:50 a.m. and goes for a 9-mile run. She returns to her house at 7:08 a.m. Answer the following questions, assuming Jessica runs at a constant pace.

  1. Describe the distance [latex]D[/latex] (in miles) Jessica runs as a linear function of her run time [latex]t[/latex] (in minutes).
  2. Sketch a graph of [latex]D[/latex].
  3. Interpret the meaning of the slope.

Watch the following video to see the worked solution to Example: A Linear Distance Function

Try It