Unit 1, lesson 5

Drawing Lines from Slope and Intercepts

Why a constant ratio of rise to run makes a straight line, how to compute slope from two points, and how to draw a line from its rule or from two of its points.

  • Theory part 9
  • Practice part 10
  • Lines, Rates, and Distance

A ramp that climbs 1 meter for every 12 meters of floor climbs at the same steepness everywhere along it. Measure a short stretch or a long one and the ratio of climb to distance is the same. That fixed ratio is the slope, and it is the reason the ramp is straight. Calculus is built on lines like this one, because when you zoom in near a single point, a smooth curve looks almost exactly like a line.

Key terms

Straight line

Definition A straight line in the coordinate plane is the set of all points (x,y)(x, y) that satisfy an equation

Ax+By=C,Ax + By = C,

where AA, BB and CC are real numbers and AA and BB are not both zero. When B≠0B \ne 0 the line is nonvertical, and the ratio of the change in yy to the change in xx between any two distinct points of it is the same number. When B=0B = 0 the number AA is not zero, and the equation becomes the vertical line x=CAx = \frac{C}{A}, where every point has the same xx value.

In plain words A line is a graph that never bends. Unless it is vertical, it goes up or down by the same amount for each step to the right, wherever you measure.

Example The points (0,1)(0, 1), (1,3)(1, 3), (2,5)(2, 5) and (4,9)(4, 9) all satisfy y=2x+1y = 2x + 1. From (0,1)(0, 1) to (1,3)(1, 3) the graph climbs 22 while moving 11 to the right. From (1,3)(1, 3) to (4,9)(4, 9) it climbs 66 while moving 33 to the right. Both ratios equal 22, so the small triangle and the large triangle drawn under the line have the same shape.

Rise and run

Definition Moving from a point P1=(x1,y1)P_1 = (x_1, y_1) to a point P2=(x2,y2)P_2 = (x_2, y_2), the run is x2−x1x_2 - x_1 and the rise is y2−y1y_2 - y_1. Both are signed numbers. A negative run means a move to the left, and a negative rise means a move down.

In plain words The run is how far you go sideways and the rise is how far you go up. Going left or going down gives a negative number.

Example From (3,7)(3, 7) to (−1,−1)(-1, -1) the run is −1−3=−4-1 - 3 = -4 and the rise is −1−7=−8-1 - 7 = -8. You move 44 units left and 88 units down.

Slope

Definition The slope of the line through two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) with x1≠x2x_1 \ne x_2 is

m=y2−y1x2−x1.m = \frac{y_2 - y_1}{x_2 - x_1}.

The numerator and the denominator must use the same order of the points. Reversing both gives the same number, but reversing only one changes the sign. For a nonvertical line the slope does not depend on which two distinct points you choose. If x1=x2x_1 = x_2 the formula would divide by zero and is not defined.

In plain words Slope is rise divided by run. It tells you how much yy changes for each step of 11 in xx. A positive slope means the line goes up to the right, and a negative slope means it goes down to the right.

Example Take the points (−2,5)(-2, 5) and (4,−1)(4, -1). Subtracting in the same order gives

m=−1−54−(−2)=−66=−1.m = \frac{-1 - 5}{4 - (-2)} = \frac{-6}{6} = -1.

A common slip subtracts the yy values in one order and the xx values in the other, which gives −6−6=1\frac{-6}{-6} = 1 and the wrong sign.

Slope-intercept form

Definition Every nonvertical line can be written in exactly one way as

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

where mm is its slope and bb is the yy value at x=0x = 0. Conversely, for any real numbers mm and bb the graph of y=mx+by = mx + b is a nonvertical line with slope mm that passes through (0,b)(0, b). A vertical line has no equation of this form.

In plain words Start at height bb on the yy axis. Then every step of 11 to the right raises the line by mm.

Example To draw y=23x−1y = \frac{2}{3}x - 1, start at (0,−1)(0, -1). The slope 23\frac{2}{3} says run 33 and rise 22, which lands on (3,1)(3, 1). Check it in the rule, since 23⋅3−1=1\frac{2}{3} \cdot 3 - 1 = 1. Draw the line through these two points.

To build a line from two points instead, find the slope and then bb. For (−2,5)(-2, 5) and (4,−1)(4, -1) the slope is −1-1, so y=−x+by = -x + b. Putting in (−2,5)(-2, 5) gives 5=2+b5 = 2 + b, so b=3b = 3 and the line is y=−x+3y = -x + 3. The other point checks, since −4+3=−1-4 + 3 = -1.

Intercepts

Definition An intercept is a point where a graph meets a coordinate axis. A yy-intercept is a point of the graph of the form (0,y)(0, y), and an xx-intercept is a point of the form (x,0)(x, 0). For the line y=mx+by = mx + b the yy-intercept is (0,b)(0, b). If m≠0m \ne 0 its only xx-intercept is

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

The coordinates of an intercept can be negative or zero. People often call the number bb itself the intercept.

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

Example For y=−3x−6y = -3x - 6 the yy-intercept is (0,−6)(0, -6). Setting y=0y = 0 gives 0=−3x−60 = -3x - 6, so x=−2x = -2 and the xx-intercept is (−2,0)(-2, 0). Both intercepts lie on the negative parts of the axes, which is perfectly fine.

Horizontal line

Definition A horizontal line is the graph of an equation y=cy = c for a real constant cc. Its slope is 00, because any two of its points have the same yy value. If c≠0c \ne 0 it has no xx-intercept, and the line y=0y = 0 is the xx axis itself.

In plain words The height never changes. Every point on the line has the same yy coordinate.

Example The points (−3,4)(-3, 4) and (5,4)(5, 4) give

m=4−45−(−3)=08=0,m = \frac{4 - 4}{5 - (-3)} = \frac{0}{8} = 0,

so the line through them is y=4y = 4. Its yy-intercept is (0,4)(0, 4) and it never meets the xx axis.

Vertical line

Definition A vertical line is the graph of an equation x=cx = c for a real constant cc. Any two of its distinct points have the same xx value, so the run is 00 and the slope is undefined. A vertical line is not the graph of a function of xx, since the single input cc is paired with every yy.

In plain words The line goes straight up and down. Rise over run would mean dividing by zero, so it has no slope at all. That is different from slope zero, which belongs to a horizontal line.

Example The points (2,−1)(2, -1) and (2,6)(2, 6) have run 2−2=02 - 2 = 0, so the slope formula does not apply. The line through them is x=2x = 2. Its xx-intercept is (2,0)(2, 0) and it has no yy-intercept.

Check yourself

  1. Find the line through (1,−4)(1, -4) and (−3,4)(-3, 4) in slope-intercept form, and give both intercepts.
Show the answer

The slope is

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

So y=−2x+by = -2x + b, and the point (1,−4)(1, -4) gives −4=−2+b-4 = -2 + b, so b=−2b = -2. The line is y=−2x−2y = -2x - 2. The yy-intercept is (0,−2)(0, -2), and setting y=0y = 0 gives the xx-intercept (−1,0)(-1, 0).

  1. Starting at the yy-intercept of y=34x+2y = \frac{3}{4}x + 2, use the slope to find a second point, then find the xx-intercept.
Show the answer

Start at (0,2)(0, 2). Run 44 and rise 33 to reach (4,5)(4, 5), and indeed 34⋅4+2=5\frac{3}{4} \cdot 4 + 2 = 5. Setting y=0y = 0 gives 34x=−2\frac{3}{4}x = -2, so the xx-intercept is (−83,0)\left(-\frac{8}{3}, 0\right).

  1. Find an equation of the line through (5,1)(5, 1) and (5,−3)(5, -3). What is its slope?
Show the answer

Both points have x=5x = 5, so the line is the vertical line x=5x = 5. The run is 00, so its slope is undefined, and it cannot be written as y=mx+by = mx + b.

How this lesson connects