Unit 1, lesson 6

Linear Functions and Constant Rate of Change

What makes a function linear, how its slope measures a constant rate of change with units, how to write a line in slope-intercept and point-slope form, and why a vertical line is not a function.

  • Theory part 11
  • Practice part 12
  • Rates and Graph Behavior

A train running at a steady speed covers the same distance every minute. Plot its position once a minute against time and the points fall on a straight line. Linear functions are the functions that change at one constant rate, so equal input steps always bring equal output changes. Their slope, the change per unit step, is the model for every rate of change in calculus.

Key terms

Linear function

Definition A linear function is a function of the form

f(x)=mx+b,f(x) = mx + b,

where mm and bb are real constants. Its domain is R\mathbb{R} unless a smaller domain is specified. On the domain R\mathbb{R} its graph is a nonvertical straight line, and every nonvertical line is the graph of exactly one such function. When m=0m = 0 the function is constant. Some books call mx+bmx + b an affine function and keep the word linear for the case b=0b = 0, but in precalculus linear means any function of this form.

In plain words A linear function multiplies the input by a fixed number and then adds a fixed number. Its graph is a straight line that is not vertical.

Example The function f(x)=3x−2f(x) = 3x - 2 is linear with m=3m = 3 and b=−2b = -2.

xxf(x)f(x)
−1-1−5-5
00−2-2
1111
2244

Each step of 11 in xx adds 33 to the output. By contrast, x2x^2 takes the values 0,1,40, 1, 4 at x=0,1,2x = 0, 1, 2, with unequal steps, so it is not linear.

Slope

Definition The slope of the linear function f(x)=mx+bf(x) = mx + b is the number mm. For any two inputs x1≠x2x_1 \ne x_2,

f(x2)−f(x1)x2−x1=(mx2+b)−(mx1+b)x2−x1=m,\begin{aligned} &\frac{f(x_2) - f(x_1)}{x_2 - x_1} \\[0.8em] &\quad = \frac{(mx_2 + b) - (mx_1 + b)}{x_2 - x_1} \\[0.8em] &\quad = m, \end{aligned}

so the slope can be computed from any two distinct points of the line. A positive slope means the line rises from left to right, a negative slope means it falls, and slope 00 means it is horizontal.

In plain words Slope is rise over run. It tells you how much the output changes when the input goes up by 11.

Example The line through (−1,5)(-1, 5) and (3,−3)(3, -3) has slope

m=−3−53−(−1)=−84=−2.m = \frac{-3 - 5}{3 - (-1)} = \frac{-8}{4} = -2.

The line falls 2 units for every unit step to the right.

Constant rate of change

Definition A function ff defined on an interval II has constant rate of change mm on II if

f(x2)−f(x1)x2−x1=m\frac{f(x_2) - f(x_1)}{x_2 - x_1} = m

for every pair of distinct inputs x1x_1 and x2x_2 in II. This happens exactly when f(x)=mx+bf(x) = mx + b on II for some constant bb. Indeed, fixing one input x1x_1 and setting b=f(x1)−mx1b = f(x_1) - mx_1, the condition says f(x)−f(x1)=m(x−x1)f(x) - f(x_1) = m(x - x_1), that is f(x)=mx+bf(x) = mx + b, for every xx in II. In particular, equal steps in the input always produce equal steps in the output.

In plain words Linear functions are exactly the functions that change at the same rate everywhere. Nothing speeds up and nothing slows down.

Example A cyclist rides at a steady pace, and the distance past a marker is recorded every 2 seconds.

Time tt in secondsDistance dd in meters
0055
221313
442121
662929

Every step of 2 seconds adds 8 meters, so the rate is 82=4\frac{8}{2} = 4 meters per second and d(t)=4t+5d(t) = 4t + 5.

Slope-intercept form

Definition The slope-intercept form of a nonvertical line is

y=mx+b,y = mx + b,

where mm is the slope and (0,b)(0, b) is the point where the line crosses the yy-axis. Every nonvertical line has exactly one equation of this form.

In plain words You can read the slope and the starting height straight off the equation.

Example The line through (2,1)(2, 1) and (6,7)(6, 7) has slope

m=7−16−2=32.m = \frac{7 - 1}{6 - 2} = \frac{3}{2}.

Putting the point (2,1)(2, 1) into y=32x+by = \frac{3}{2}x + b gives 1=3+b1 = 3 + b, so b=−2b = -2 and the line is y=32x−2y = \frac{3}{2}x - 2. As a check, the input 66 gives 9−2=79 - 2 = 7.

Point-slope form

Definition The line with slope mm through the point (x1,y1)(x_1, y_1) has the equation

y−y1=m(x−x1).y - y_1 = m(x - x_1).

A point (x,y)(x, y) with x≠x1x \ne x_1 satisfies this equation exactly when y−y1x−x1=m\frac{y - y_1}{x - x_1} = m, which says that the slope from (x1,y1)(x_1, y_1) to (x,y)(x, y) is mm. The point (x1,y1)(x_1, y_1) itself satisfies it too.

In plain words When you know one point and the slope, you can write the line down at once, with no need to find the intercept first.

Example The line with slope −3-3 through (4,2)(4, 2) is y−2=−3(x−4)y - 2 = -3(x - 4). Expanding gives y=−3x+14y = -3x + 14, and the input 44 indeed gives −12+14=2-12 + 14 = 2.

Intercepts

Definition The yy-intercept of the graph of ff is the point (0,f(0))(0, f(0)), which exists when 00 is in the domain. An xx-intercept is a point (a,0)(a, 0) with f(a)=0f(a) = 0, and the number aa is called a zero of ff. On the domain R\mathbb{R}, a linear function f(x)=mx+bf(x) = mx + b has yy-intercept (0,b)(0, b). If m≠0m \ne 0 it has exactly one xx-intercept,

(−bm,0).\left(-\frac{b}{m}, 0\right).

If m=0m = 0 and b≠0b \ne 0 it has none, and if m=0m = 0 and b=0b = 0 its graph is the whole xx-axis. Many books also call the numbers bb and −bm-\frac{b}{m} themselves the intercepts.

In plain words The intercepts are where the line crosses the axes. Set x=0x = 0 to find the yy-intercept and set y=0y = 0 to find the xx-intercept.

Example For f(x)=−2x+6f(x) = -2x + 6 the yy-intercept is (0,6)(0, 6). Solving −2x+6=0-2x + 6 = 0 gives x=3x = 3, so the xx-intercept is (3,0)(3, 0).

Proportionality

Definition A quantity yy is directly proportional to a quantity xx if there is a constant k≠0k \ne 0 with

y=kxy = kx

for all values considered. The number kk is the constant of proportionality, and for x≠0x \ne 0 it equals the ratio yx\frac{y}{x}. The graph lies on the line through the origin with slope kk. A linear function y=mx+by = mx + b with b≠0b \ne 0 does not make yy proportional to xx. Its line passes through (0,b)(0, b) instead of the origin, and for x≠0x \ne 0 the ratio yx=m+bx\frac{y}{x} = m + \frac{b}{x} changes with xx.

In plain words Proportional means that doubling one quantity doubles the other. Every proportional relation is linear, but a linear function with a starting amount b≠0b \ne 0 is not proportional.

Example Fabric sold at 6 dollars per meter costs C(x)=6xC(x) = 6x dollars for xx meters, so 2 meters cost 12 dollars and 4 meters cost 24. A taxi fare of F(d)=4+2dF(d) = 4 + 2d dollars for dd kilometers is linear but not proportional, since F(5)=14F(5) = 14 while F(10)=24F(10) = 24, not 2828.

Units

Definition If the input of a linear function is measured in units UU and the output in units VV, its slope is measured in VV per UU, because the slope is a change in output divided by a change in input. The constant bb has the units of the output, and so does each term of mx+bmx + b.

In plain words Read a slope together with its units, such as dollars per hour or meters per second. The units tell you what the number means.

Example A tank holding 500 liters drains so that after tt minutes it holds V(t)=500−20tV(t) = 500 - 20t liters. The slope −20-20 is in liters per minute, so the tank loses 20 liters each minute. The constant 500500 is in liters and is the starting volume. Solving 500−20t=0500 - 20t = 0 gives t=25t = 25 minutes, the moment the tank is empty, so the model makes sense for 0≤t≤250 \le t \le 25.

Horizontal and vertical lines

Definition The horizontal line through (a,c)(a, c) has the equation y=cy = c. It is the graph of the constant function f(x)=cf(x) = c and has slope 00. The vertical line through (a,c)(a, c) has the equation x=ax = a and consists of all points (a,y)(a, y) with yy real. It is not the graph of any function y=f(x)y = f(x), because it pairs the single input aa with infinitely many outputs, while a function gives each input exactly one output. In other words, it fails the vertical line test. Its slope is undefined, since any two of its points have x2−x1=0x_2 - x_1 = 0.

In plain words A horizontal line is a function that never changes. A vertical line is not a function of xx at all, because it pairs one input with every output.

Example The points (2,5)(2, 5) and (7,5)(7, 5) give slope 5−57−2=0\frac{5 - 5}{7 - 2} = 0 and the line y=5y = 5, which is the graph of f(x)=5f(x) = 5. The points (3,1)(3, 1) and (3,4)(3, 4) lie on the vertical line x=3x = 3. The slope formula would divide by 3−3=03 - 3 = 0, and the input 33 is paired with both 11 and 44, so no function has this line as its graph.

Check yourself

  1. Find the line through (−2,7)(-2, 7) and (4,−2)(4, -2) in slope-intercept form, and find its xx-intercept.
Show the answer

The slope is

m=−2−74−(−2)=−96=−32.m = \frac{-2 - 7}{4 - (-2)} = \frac{-9}{6} = -\frac{3}{2}.

From 7=−32⋅(−2)+b=3+b7 = -\frac{3}{2} \cdot (-2) + b = 3 + b we get b=4b = 4, so the line is y=−32x+4y = -\frac{3}{2}x + 4. Setting y=0y = 0 gives x=83x = \frac{8}{3}, so the xx-intercept is (83,0)\left(\frac{8}{3}, 0\right).

  1. A candle 30 centimeters tall burns down 2.5 centimeters per hour. Write its height as a function of time, give the units of the slope, and find when it burns out. Is the height proportional to the time?
Show the answer

The height after tt hours is h(t)=30−2.5th(t) = 30 - 2.5t centimeters. The slope −2.5-2.5 is in centimeters per hour. Solving 30−2.5t=030 - 2.5t = 0 gives t=12t = 12, so the candle burns out after 12 hours. The height is not proportional to the time, because the constant term 3030 is not zero.

  1. Do the points (−1,7)(-1, 7), (1,3)(1, 3), (2,1)(2, 1) and (5,−5)(5, -5) lie on one line? If so, find the linear function.
Show the answer

Yes. The slopes between consecutive points are

3−71−(−1)=−2,1−32−1=−2,−5−15−2=−2,\begin{aligned} \frac{3 - 7}{1 - (-1)} &= -2, \\[0.8em] \frac{1 - 3}{2 - 1} &= -2, \\[0.8em] \frac{-5 - 1}{5 - 2} &= -2, \end{aligned}

all equal, so the points lie on one line. Point-slope form with (1,3)(1, 3) gives y−3=−2(x−1)y - 3 = -2(x - 1), so the function is f(x)=−2x+5f(x) = -2x + 5.

How this lesson connects