MAT040 Beginning Algebra All classes

Lines and Graphing · Chapter 11

Slope-Intercept Form

The numbered examples below are interactive: the numbers change every time you load the page. Type your answer, press Enter or Check, and use New numbers to practice again.

We have graphed linear equations by plotting points, using intercepts, and recognizing horizontal and vertical lines. Once we see how an equation in slope-intercept form and its graph are related, we have one more method to graph lines.

Relating the Graph to the Equation

Consider the line y=12x+3y=\frac12x+3, graphed by plotting points. Choose the points (0,3)(0,3) and (2,4)(2,4) on the line. Going from (0,3)(0,3) to (2,4)(2,4) the rise is 11 and the run is 22:

m=riserun=12.m=\frac{\text{rise}}{\text{run}}=\frac12.

The yy-intercept is where the line crosses the yy-axis, the point (0,3)(0,3). So this line has

slope m=12andy-intercept (0,3),y=12x+3.\text{slope }m=\tfrac12\quad\text{and}\quad y\text{-intercept }(0,3),\qquad y=\tfrac12x+3.
Graph of y = (1/2)x + 3 through the plotted points (0, 3), (2, 4) and (4, 5). A red right triangle goes from (0, 3) right to (2, 3), labeled run = 2, then up to (2, 4), labeled rise = 1.

When a linear equation is solved for yy, the coefficient of the xx term is the slope and the constant term is the yy-coordinate of the yy-intercept.

Slope-Intercept Form. The slope-intercept form of an equation of a line with slope mm and yy-intercept (0,b)(0,b) is

y=mx+b.y=mx+b.
Example 1

Use the graph to find the slope and yy-intercept of the line y=2x+1y=2x+1. Compare these values to the equation y=mx+by=mx+b.

Graph of the line y = 2x + 1 on a coordinate grid. The line passes through (0, 1) and (1, 3). A red right triangle joins the two points: a horizontal run from (0, 1) to (1, 1), then a vertical rise up to (1, 3).

Choose two points on the line, (0,1)(0,1) and (1,3)(1,3). The rise is 22 and the run is 11:

m=riserun=21=2.m=\frac{\text{rise}}{\text{run}}=\frac21=2.

The yy-intercept is the point (0,1)(0,1). So m=2m=2 and yy-intercept (0,1)(0,1), and

y=2x+1compared toy=mx+b.y=\mathbf{2}x+\mathbf{1}\qquad\text{compared to}\qquad y=mx+b.

The slope is the same as the coefficient of xx, and the yy-coordinate of the yy-intercept is the same as the constant term.

Example 2

Use the graph to find the slope and yy-intercept of the line y=23x−1y=\frac23x-1. Compare these values to the equation y=mx+by=mx+b.

Graph of the line y = (2/3)x − 1 on a coordinate grid. The line passes through (0, −1) and (3, 1). A red right triangle joins the two points: a horizontal run from (0, −1) to (3, −1), then a vertical rise up to (3, 1).

Use the points (0,−1)(0,-1) and (3,1)(3,1). The rise is 22 and the run is 33, so m=23m=\frac23. The yy-intercept is (0,−1)(0,-1). So

y=23x+(−1)=23x−1.y=\tfrac23x+(-1)=\tfrac23x-1.

Identifying the Slope and yy-Intercept from an Equation

When an equation is in slope-intercept form, the slope is the number multiplying xx and the yy-intercept is (0,b)(0,b).

Example 3

Identify the slope and yy-intercept of the line y=−3x+5y=-3x+5.

Compare y=−3x+5y=-3x+5 to y=mx+by=mx+b: the slope is m=−3m=-3 and the yy-intercept is (0,5)(0,5).

When an equation is not given in slope-intercept form, our first step is to solve for yy.

Example 4

Identify the slope and yy-intercept of the line x+2y=6x+2y=6.

This equation is not in slope-intercept form, so solve for yy.

x+2y=62y=−x+6subtract x from both sides2y2=−x+62divide both sides by 2y=−12x+3since a+bc=ac+bc\begin{align*} x+2y&=6\\ 2y&=-x+6&&\text{subtract $x$ from both sides}\\ \frac{2y}2&=\frac{-x+6}2&&\text{divide both sides by $2$}\\ y&=-\frac12x+3&&\text{since }\tfrac{a+b}c=\tfrac ac+\tfrac bc \end{align*}

The slope is m=−12m=-\frac12 and the yy-intercept is (0,3)(0,3).

Graphing a Line Using its Slope and Intercept

Once we know the slope and yy-intercept of a line from its equation, we can graph the line by plotting the yy-intercept and then using the slope to find a second point.

How to graph a line using its slope and intercept.
Step 1. Find the slope-intercept form of the equation of the line.
Step 2. Identify the slope and yy-intercept.
Step 3. Plot the yy-intercept.
Step 4. Use the slope formula m=riserunm=\dfrac{\text{rise}}{\text{run}} to identify the rise and the run.
Step 5. Starting at the yy-intercept, count out the rise and run to mark the second point.
Step 6. Connect the points with a line.

Example 5

Graph the line y=4x−2y=4x-2 using its slope and yy-intercept.

Steps 1–2. y=4x−2y=4x-2 is already in slope-intercept form. m=4m=4 and b=−2b=-2, so the yy-intercept is (0,−2)(0,-2).
Steps 3–5. Plot (0,−2)(0,-2). Since m=4=41m=4=\frac41, the rise is 44 and the run is 11. Up 44, right 11 gives (1,2)(1,2).
Step 6. Connect the points.

Graph of the line y = 4x − 2 on a coordinate grid. The line passes through (0, −2) and (1, 2). A red right triangle joins the two points: a horizontal run from (0, −2) to (1, −2), then a vertical rise up to (1, 2).

Example 6

Graph the line y=−x+4y=-x+4 using its slope and yy-intercept.

y=−x+4y=-x+4: m=−1m=-1 and the yy-intercept is (0,4)(0,4). Plot (0,4)(0,4). Since m=−11m=\frac{-1}1, the rise is −1-1 and the run is 11: down 11, right 11 gives (1,3)(1,3). Connect the points.

Graph of the line y = −x + 4 on a coordinate grid. The line passes through (0, 4) and (1, 3). A red right triangle joins the two points: a horizontal run from (0, 4) to (1, 4), then a vertical rise going down to (1, 3).

Check: the line passes through (4,0)(4,0). 0=?−4+40\stackrel?=-4+4, and 0=0✓0=0\checkmark.

Example 7

Graph the line y=−23x−3y=-\dfrac23x-3 using its slope and yy-intercept.

y=−23x−3y=-\frac23x-3: m=−23m=-\frac23 and the yy-intercept is (0,−3)(0,-3). Plot (0,−3)(0,-3). The rise is −2-2 and the run is 33: down 22, right 33 gives (3,−5)(3,-5). Connect the points.

Graph of the line y = −(2/3)x − 3 on a coordinate grid. The line passes through (0, −3) and (3, −5). A red right triangle joins the two points: a horizontal run from (0, −3) to (3, −3), then a vertical rise going down to (3, −5).

Example 8

Graph the line 4x−3y=124x-3y=12 using its slope and yy-intercept.

First find the slope-intercept form.

4x−3y=12−3y=−4x+12subtract 4x−3y−3=−4x+12−3divide by −3y=43x−4\begin{align*} 4x-3y&=12\\ -3y&=-4x+12&&\text{subtract $4x$}\\ \frac{-3y}{-3}&=\frac{-4x+12}{-3}&&\text{divide by $-3$}\\ y&=\frac43x-4 \end{align*}

m=43m=\frac43 and the yy-intercept is (0,−4)(0,-4). Plot (0,−4)(0,-4). The rise is 44 and the run is 33: up 44, right 33 gives (3,0)(3,0). Connect the points.

Graph of the line 4x − 3y = 12 on a coordinate grid. The line passes through (0, −4) and (3, 0). A red right triangle joins the two points: a horizontal run from (0, −4) to (3, −4), then a vertical rise up to (3, 0).

Choosing the Most Convenient Method to Graph a Line

We now have several methods to graph a line.

Point plottingSlope-interceptInterceptsVertical / horizontal
Find three points. Plot the points, make sure they line up, then draw the line.y=mx+by=mx+b. Find the slope and yy-intercept. Start at the yy-intercept, then count the slope to get a second point.Find the intercepts (set y=0y=0, then x=0x=0) and plot the points. Draw the line.The equation has only one variable. x=ax=a is a vertical line, y=by=b is a horizontal line.

Generally, plotting points is not the most efficient way to graph a line. Here are six equations and the method we used for each:

#EquationMethod
1x=3x=3vertical line
2y=−2y=-2horizontal line
33x−2y=63x-2y=6intercepts
4−x+2y=4-x+2y=4intercepts
5y=4x−2y=4x-2slope-intercept
6y=−x+4y=-x+4slope-intercept

Strategy for choosing the most convenient method to graph a line. Consider the form of the equation.

  • If it has only one variable, it is a vertical or horizontal line. x=ax=a is a vertical line through the xx-axis at aa, and y=by=b is a horizontal line through the yy-axis at bb.

  • If yy is isolated on one side, in the form y=mx+by=mx+b, graph using the slope and yy-intercept.

  • If the equation is of the form Ax+By=CAx+By=C, find the intercepts and graph.

Example 9

Determine the most convenient method to graph each line.

a. y=−6b. 5x−3y=15c. x=7d. y=25x−1a.\ y=-6\qquad b.\ 5x-3y=15\qquad c.\ x=7\qquad d.\ y=\dfrac25x-1

a.a. y=−6y=-6 has only one variable. Its graph is a horizontal line crossing the yy-axis at −6-6.
b.b. 5x−3y=155x-3y=15 is of the form Ax+By=CAx+By=C. The easiest way to graph it is to find the intercepts.
c.c. x=7x=7 has only one variable. The graph is a vertical line crossing the xx-axis at 77.
d.d. y=25x−1y=\frac25x-1 is in y=mx+by=mx+b form, so it is easiest to graph using the slope and yy-intercept.

Worked-example videos

Adapted from OpenStax Elementary Algebra 2e, licensed under CC BY 4.0.