Skip to content
Use the Slope-Intercept Form of an Equation of a Line

Use the Slope-Intercept Form of an Equation of a Line

By the end of this section, you will be able to: recognize the relation between the graph and the slope-intercept form of an equation of a line, identify the slope and yy-intercept from an equation of a line, graph a line using its slope and intercept, choose the most convenient method to graph a line, graph and interpret applications of slope-intercept, use slopes to identify parallel lines, and use slopes to identify perpendicular lines.

Recognize the relation between the graph and the slope-intercept form of an equation of a line

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

Earlier we graphed the line of the equation y=12x+3y = \tfrac{1}{2}x + 3 by plotting points. Let’s find the slope of this line the way we did in the previous section — using two points from the graph.

xy(0, 3)(2, 4)(4, 5)rise = 1run = 2

The rise is 11 and the run is 22. Substituting into the slope formula:

m=riserun=12m = \frac{\text{rise}}{\text{run}} = \frac{1}{2}

What is the yy-intercept of the line? The yy-intercept is where the line crosses the yy-axis, so the yy-intercept is (0,3)(0, 3). The equation of this line is y=12x+3y = \tfrac{1}{2}x + 3. Notice that the line has slope m=12m = \tfrac{1}{2} and yy-intercept (0,3)(0, 3).

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. We say that the equation y=12x+3y = \tfrac{1}{2}x + 3 is in slope-intercept form.

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

y=mx+by = mx + b

Sometimes the slope-intercept form is called the “yy-form.”

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

To find the slope of the line, we choose two points on the line, (0,1)(0, 1) and (1,3)(1, 3). The rise is 22 and the run is 11, so:

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

The yy-intercept is the point (0,1)(0, 1). We found slope m=2m = 2 and yy-intercept (0,1)(0, 1), matching the equation y=2x+1y = 2x + 1: 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.

Use the graph to find the slope and y-intercept of the line y=23x1y = \tfrac{2}{3}x - 1. What is the slope?

Identify the slope and yy-intercept from an equation of a line

When we are given an equation in slope-intercept form, we can use the yy-intercept as a point, and then count out the slope from there. Let’s practice finding the values of the slope and yy-intercept from the equation of a line.

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

We compare the equation to the slope-intercept form y=mx+by = mx + b: the slope is m=3m = -3, and the yy-intercept is (0,5)(0, 5).

Identify the slope of the line y=25x1y = \tfrac{2}{5}x - 1.

When an equation of a line is not given in slope-intercept form, our first step will be to solve the equation for yy.

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

This equation is not in slope-intercept form. To compare it to the slope-intercept form, we first solve the equation for yy:

x+2y=62y=x+62y2=x+62y=12x+3 \begin{align} x + 2y &= 6 \\ 2y &= -x + 6 \\ \frac{2y}{2} &= \frac{-x + 6}{2} \\ y &= -\frac{1}{2}x + 3 \end{align}

Now the equation is in slope-intercept form y=mx+by = mx + b, so we can identify the slope, m=12m = -\tfrac{1}{2}, and the yy-intercept, (0,3)(0, 3).

Identify the slope of the line x+4y=8x + 4y = 8. (Hint: solve for y first.)

Graph a line using its slope and intercept

Now that we know how to find 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 another point.

Graph a line using its slope and yy-intercept.

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

Example. Graph the line of the equation y=4x2y = 4x - 2 using its slope and yy-intercept.

The equation is already in slope-intercept form: y=mx+by = mx + b, so m=4m = 4 and the yy-intercept is (0,2)(0, -2). We plot (0,2)(0, -2). The slope is m=4=41m = 4 = \tfrac{4}{1}, so the rise is 44 and the run is 11. Starting at (0,2)(0, -2), we count up 44 and right 11 to mark the second point, (1,2)(1, 2), then connect the two points with a line.

To check our work, we can find another point on the line and make sure it is a solution of the equation. The graph also passes through (4,0)(4, 0): substituting into y=x+4y = -x + 4 — wait, let’s check (1,2)(1,2) in y=4x2y = 4x - 2 instead: 2=?4(1)22 \stackrel{?}{=} 4(1) - 2, so 2=22 = 2. ✓

Graph the line y=x3y = -x - 3 using its slope and y-intercept. What is the y-intercept as an ordered pair (x,y)(x, y)?

Choose the most convenient method to graph a line

Now that we have seen several methods to graph lines, how do we know which method to use for a given equation? While we could plot points, use the slope-intercept form, or find the intercepts for any equation, recognizing the most convenient way to graph a certain type of equation makes our work easier. Generally, plotting points is not the most efficient way to graph a line.

Here are six equations and the method used to graph each of them:

EquationMethod
x=2x = 2Vertical line
y=4y = 4Horizontal line
x+2y=6-x + 2y = 6Intercepts
4x3y=124x - 3y = 12Intercepts
y=4x2y = 4x - 2Slope-intercept
y=x+4y = -x + 4Slope-intercept

Equations with just one variable have graphs that are vertical or horizontal lines. If both xx and yy are on the same side of the equation — of the form Ax+By=CAx + By = C — we substitute y=0y = 0 to find the xx-intercept and x=0x = 0 to find the yy-intercept, and then find a third point. Equations already written in slope-intercept form are graphed fastest by identifying the slope and yy-intercept directly.

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

  • If it only has one variable, it is a vertical or horizontal line.
    • x=ax = a is a vertical line passing through the xx-axis at aa.
    • y=by = b is a horizontal line passing through the yy-axis at bb.
  • If yy is isolated on one side of the equation, in the form y=mx+by = mx + b, graph by using the slope and yy-intercept.
  • If the equation is of the form Ax+By=CAx + By = C, find the intercepts — the xx- and yy-intercepts, and a third point, then graph.

Example. Determine the most convenient method to graph each line: (a) y=6y = -6 (b) 5x3y=155x - 3y = 15 (c) x=7x = 7 (d) y=25x1y = \tfrac{2}{5}x - 1.

(a) This equation has only one variable, yy. Its graph is a horizontal line crossing the yy-axis at 6-6.

(b) This equation is of the form Ax+By=CAx + By = C. The easiest way to graph it will be to find the intercepts and one more point.

(c) There is only one variable, xx. The graph is a vertical line crossing the xx-axis at 77.

(d) Since this equation is in y=mx+by = mx + b form, it will be easiest to graph this line by using the slope and yy-intercept.

Which method is most convenient for graphing the line y=15x4y = \tfrac{1}{5}x - 4?

Which method is most convenient for graphing the line 4x3y=14x - 3y = -1?

Graph and interpret applications of slope-intercept

Many real-world applications are modeled by linear equations. Usually when a linear equation models a real-world situation, different letters are used for the variables instead of xx and yy — the variable names remind us of what quantities are being measured.

Example. The equation F=95C+32F = \tfrac{9}{5}C + 32 is used to convert temperatures, CC, on the Celsius scale to temperatures, FF, on the Fahrenheit scale.

(a) Find the Fahrenheit temperature for a Celsius temperature of 00.

(b) Find the Fahrenheit temperature for a Celsius temperature of 2020.

(c) Interpret the slope and FF-intercept of the equation.

(d) Graph the equation.

(a) Find FF when C=0C = 0: F=95(0)+32=32F = \tfrac{9}{5}(0) + 32 = 32.

(b) Find FF when C=20C = 20: F=95(20)+32=36+32=68F = \tfrac{9}{5}(20) + 32 = 36 + 32 = 68.

(c) Even though this equation uses FF and CC, it is still in slope-intercept form. Comparing F=mC+bF = mC + b to F=95C+32F = \tfrac{9}{5}C + 32: the slope, 95\tfrac{9}{5}, means that the Fahrenheit temperature increases 99 degrees when the Celsius temperature increases 55 degrees. The FF-intercept means that when the temperature is 0° on the Celsius scale, it is 32°32° on the Fahrenheit scale.

(d) To graph the equation we start at the FF-intercept (0,32)(0, 32), then count out the rise of 99 and the run of 55 to get a second point.

Example. Stella has a home business selling gourmet pizzas. The equation C=4p+25C = 4p + 25 models the relation between her weekly cost, CC, in dollars, and the number of pizzas, pp, that she sells.

(a) Find Stella’s cost for a week when she sells no pizzas: C=4(0)+25=25C = 4(0) + 25 = 25. Her fixed cost is $25\text{\textdollar}25 when she sells no pizzas.

(b) Find the cost for a week when she sells 1515 pizzas: C=4(15)+25=85C = 4(15) + 25 = 85. Her costs are $85\text{\textdollar}85 when she sells 1515 pizzas.

(c) Interpret the slope and CC-intercept: comparing C=mp+bC = mp + b to C=4p+25C = 4p + 25, the slope, 44, means that the cost increases by $4\text{\textdollar}4 for each pizza Stella sells. The CC-intercept means that even when Stella sells no pizzas, her costs for the week are $25\text{\textdollar}25.

(d) To graph the equation, start at the CC-intercept (0,25)(0, 25), then count out the rise of 44 and the run of 11 to get a second point.

Sam drives a delivery van. The equation C=0.5m+60C = 0.5m + 60 models the relation between his weekly cost, C, in dollars, and the number of miles, m, that he drives. Find Sam's cost for a week when he drives 250 miles.

Use slopes to identify parallel lines

The slope of a line indicates how steep the line is and whether it rises or falls as we read it from left to right. Two lines that have the same slope are called parallel lines. Parallel lines never intersect.

xy(0, 2)(0, −2)

We say this more formally in terms of the rectangular coordinate system: two lines that have the same slope and different yy-intercepts are called parallel lines.

Parallel lines. Parallel lines are lines in the same plane that do not intersect.

  • Parallel lines have the same slope and different yy-intercepts.
  • If m1m_1 and m2m_2 are the slopes of two parallel lines, then m1=m2m_1 = m_2.
  • Parallel vertical lines have different xx-intercepts.

What about vertical lines? The slope of a vertical line is undefined, so vertical lines don’t fit the definition above. We say that vertical lines with different xx-intercepts are parallel.

Since parallel lines have the same slope and different yy-intercepts, we can look at the slope-intercept form of the equations of two lines and decide whether the lines are parallel — without graphing them.

Example. Use slopes and yy-intercepts to determine if the lines 3x2y=63x - 2y = 6 and y=32x+1y = \tfrac{3}{2}x + 1 are parallel.

We solve the first equation for yy:

3x2y=62y=3x+62y2=3x+62y=32x3 \begin{align} 3x - 2y &= 6 \\ -2y &= -3x + 6 \\ \frac{-2y}{-2} &= \frac{-3x + 6}{-2} \\ y &= \frac{3}{2}x - 3 \end{align}

The second equation, y=32x+1y = \tfrac{3}{2}x + 1, is already in slope-intercept form. Both lines have slope m=32m = \tfrac{3}{2}. The first line has yy-intercept (0,3)(0, -3) and the second has yy-intercept (0,1)(0, 1). The lines have the same slope and different yy-intercepts, so they are parallel.

Example. Use slopes and yy-intercepts to determine if the lines y=4y = -4 and y=3y = 3 are parallel.

Since there is no xx-term, we write each as y=0x4y = 0x - 4 and y=0x+3y = 0x + 3. Both lines have slope m=0m = 0; the yy-intercepts are (0,4)(0, -4) and (0,3)(0, 3). The lines have the same slope and different yy-intercepts, so they are parallel. (You may recognize these right away as horizontal lines, which are always parallel to each other unless they are the same line.)

Example. Use slopes and yy-intercepts to determine if the lines x=2x = -2 and x=5x = -5 are parallel.

Since there is no yy, these equations cannot be put in slope-intercept form. But we recognize them as equations of vertical lines, with xx-intercepts 2-2 and 5-5. Since their xx-intercepts are different, the vertical lines are parallel.

Example. Use slopes and yy-intercepts to determine if the lines y=2x3y = 2x - 3 and 6x+3y=9-6x + 3y = -9 are parallel.

The first equation is already in slope-intercept form: y=2x3y = 2x - 3. We solve the second equation for yy:

6x+3y=93y=6x93y3=6x93y=2x3 \begin{align} -6x + 3y &= -9 \\ 3y &= 6x - 9 \\ \frac{3y}{3} &= \frac{6x - 9}{3} \\ y &= 2x - 3 \end{align}

The lines have the same slope, but they also have the same yy-intercept, (0,3)(0, -3). Their equations represent the same line — they are not parallel; they are the same line.

Use slopes and y-intercepts to determine whether the lines y=12x1y = -\tfrac{1}{2}x - 1 and x+2y=2x + 2y = 2 are parallel, perpendicular, or neither.

Use slopes and y-intercepts to determine whether the lines y=8y = 8 and y=6y = -6 are parallel, perpendicular, or neither.

Use slopes to identify perpendicular lines

Let’s look at the lines whose equations are y=14x1y = \tfrac{1}{4}x - 1 and y=4x+2y = -4x + 2.

xyy = ¼x − 1y = −4x + 2

These lines lie in the same plane and intersect in right angles. We call these lines perpendicular.

As we read from left to right, the line y=14x1y = \tfrac{1}{4}x - 1 rises, so its slope is positive. The line y=4x+2y = -4x + 2 drops from left to right, so it has a negative slope. Does it make sense that the slopes of two perpendicular lines have opposite signs?

The slope of the first line, m1=14m_1 = \tfrac{1}{4}, and the slope of the second line, m2=4m_2 = -4, are negative reciprocals of each other. If we multiply them, their product is 1-1:

m1m2=14(4)=1m_1 \cdot m_2 = \frac{1}{4}(-4) = -1

This is always true for perpendicular lines.

Perpendicular lines. Perpendicular lines are lines in the same plane that form a right angle.

If m1m_1 and m2m_2 are the slopes of two perpendicular lines, then

m1m2=1andm1=1m2m_1 \cdot m_2 = -1 \qquad \text{and} \qquad m_1 = \frac{-1}{m_2}

Vertical lines and horizontal lines are always perpendicular to each other.

We find the slope-intercept form of each equation, and then check whether the product of the slopes is 1-1. Perpendicular lines may have the same yy-intercepts.

Example. Use slopes to determine if the lines y=5x4y = -5x - 4 and x5y=5x - 5y = 5 are perpendicular.

The first equation is already in slope-intercept form: m1=5m_1 = -5. We solve the second equation for yy:

x5y=55y=x+55y5=x+55y=15x1 \begin{align} x - 5y &= 5 \\ -5y &= -x + 5 \\ \frac{-5y}{-5} &= \frac{-x + 5}{-5} \\ y &= \frac{1}{5}x - 1 \end{align}

so m2=15m_2 = \tfrac{1}{5}. The slopes are negative reciprocals of each other, so the lines are perpendicular. We check: m1m2=5(15)=1m_1 \cdot m_2 = -5 \left(\tfrac{1}{5}\right) = -1. ✓

Example. Use slopes to determine if the lines 7x+2y=37x + 2y = 3 and 2x+7y=52x + 7y = 5 are perpendicular.

Solving both equations for yy: y=72x+32y = -\tfrac{7}{2}x + \tfrac{3}{2} gives m1=72m_1 = -\tfrac{7}{2}, and y=27x+57y = -\tfrac{2}{7}x + \tfrac{5}{7} gives m2=27m_2 = -\tfrac{2}{7}. The slopes are reciprocals of each other, but they have the same sign. Since they are not negative reciprocals, the lines are not perpendicular.

Use slopes to determine whether the lines y=3x+2y = -3x + 2 and x3y=4x - 3y = 4 are parallel, perpendicular, or neither.

Use slopes to determine whether the lines 5x+4y=15x + 4y = 1 and 4x+5y=34x + 5y = 3 are parallel, perpendicular, or neither.

Key terms

slope-intercept form — the form y=mx+by = mx + b of an equation of a line, where mm is the slope and (0,b)(0, b) is the yy-intercept. parallel lines — lines in the same plane that do not intersect; they have the same slope and different yy-intercepts (or, for vertical lines, different xx-intercepts). perpendicular lines — lines in the same plane that form a right angle; the product of their slopes is 1-1, so their slopes are negative reciprocals of each other.


This section is adapted from Elementary Algebra 2e, Section 4.5: Use the Slope-Intercept Form of an Equation of a Line by Lynn Marecek, MaryAnne Anthony-Smith, and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recreated the slope-intercept, parallel-lines, and perpendicular-lines graphs as accessible inline graphics; condensed the worked examples and tables; omitted the Be Prepared quiz, Media links, Self Check checklist, and end-of-section exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.