Back
Graphing a Line Using the Slope and Y-Intercept
> ... Math > Slopes, Intercepts, Equation of a Straight Line > Graphing a Line Using the Slope and Y-Intercept

Introduction

In this lesson, you will learn how to graph a line using the slope and y-intercept.


This video illustrates the lesson material below. Watching the video is optional.


Graphing a Line Using the Slope and Y-Intercept


The slope-intercept form of a line is \(y=mx+b\), where m represents the slope and b is the y-intercept.

Example 1
Graph the following line that is given in y-intercept form: \(y=3x+\frac{1}{2}\).

You could graph this by substituting in values for x and solving for y, but with the slope-intercept form of a line, one of the points is already given (b, or the y-intercept). The y-intercept is at \(y=\frac{1}{2}\). This point is written as \((0,\frac{1}{2})\), where x is 0, and y is \(\frac{1}{2}\).

This figure shows the slop-intercept formula on the top-right corner and the value for y on the top left corner. The graph shows the point (0, 1/2).

Figure 1

You only need two points in order to determine a straight line. Use the slope (m), or \(\frac{rise}{run}\), to find a second point in relation to the y-intercept (b).

\begin{align*} m=\frac{rise}{run} = \frac{3}{1}\end{align*}

In other words, for every three units you go up, you take one step to the right. To plot the second point, follow these steps:

  • Start at the point that you already have, which is known as the y-intercept, \((0,\frac{1}{2})\).
  • Go three units up and one unit to the right.
  • You get to \((1,3\frac{1}{2})\). Plot this point as your second point.

Now that you have two points, you can draw a line between them, and that will be the graph of this line.

The figure shows the points (0, 1/2) and (1, 3 1/2) plotted across the graph, with a line connecting them.

Figure 2

Example 2
Graph the following line that is given in y-intercept form: \(y=-\frac{3}{4}x-2\).

Once again, you know the first point is at \((0, -2)\) because -2 is the y-intercept, so when \(x = 0\), then \(y = -2\) (see to Figure 3).

The point (0, -2) is plotted in this graph.

Figure 3

Now you just need to find another point using the slope (m).

\begin{align*} m = \frac{Rise}{Run} = -\frac{3}{4}\end{align*}

A negative slope goes from the top left down toward the bottom right. You can easily find the second point using this slope. It is really important to remember that the following slopes below are the same.

\begin{align*} \frac{-3}{4} = \frac{3}{-4} \end{align*}

  • You could either go down three and to the right four, which gives this point: \((4,-5)\)
  • Or, you could go up three and then to the left four and this point: \((-4,1)\).

Either way, one of the directions needs to be in the negative direction, and the other needs to be in the positive direction.

This figure shows the points (-4, 1), (0, -2), and (4, -5) plotted across the graph, with a line connecting them.

Figure 4

Figure 4 shows the line of \(y=-\frac{3}{4}x-2\). Any point on this line will make this equation correct.


Things to Remember


  • You need a minimum of two points to find the line of an equation. 
  • Steps for graphing an equation using the slope and y-intercept:
    • Step 1: Plot the y-intercept from the slope-intercept form.
      • The y-intercept = b of the equation \( y = mx + b \)
      • The point will be \((0, b)\).
    • Step 2: Use the slope (m) or \(\frac{rise}{run}\) to find the second point of the line from the y-intercept.
      • Make single steps, using the rise and run from the y-intercept.
      • Plot the second point.
    • Step 3: Connect those two points with your line.

Practice Problems

  1. Plot the line \(y=−3x+2\) starting with the y-intercept and then using the slope. (
    Solution
    x
    Solution:
    Note: The graph you create may look slightly different depending on the spacing you choose for your x and y-axis. The correct graph should still have the same direction of slope and the x and y-intercepts should be the same.
    A coordinate plane with a dashed line passing through the points (-1,5), (0,2), (1,-1) and (2,-4).
    Details:
    To graph this line you need to identify the slope and the y-intercept. The equation is written in slope-intercept form, \(y=mx+b\), where m is the slope and b is the y-intercept.

    Step 1: Find the slope and the y-intercept of the line:

    The equation of the line is

    \({\text{y}}={\color{Green}-3}{\text{x}}{\color{Green}+2}\)

    So the slope is \({\color{Green}-3}\), and the y-intercept is \({\color{Green}2}\).

    Step 2: Graph the y-intercept:

    A coordinate plane with the point (0,2) graphed on it.

    This is a picture of a coordinate plane with the point \((0,2)\) graphed on it.

    Step 3: Find another point on the line using the slope:

    The slope is \(−3\), which you can rewrite as \(-\dfrac{3}{1}\). Slope is \(\dfrac{\text{rise}}{\text{run}}\), which means that to find another point on the graph, you start at the y-intercept and then move down three spaces, then one space to the right:

    A coordinate plane. The point (0,2) has been graphed. There is an arrow pointing down three spaces from (0,2) to the point (0, -1). There is a horizontal arrow pointing to the right from (0, -1) to the point (1, -1).

    This is a picture of a coordinate plane. The point \((0,2)\) has been graphed. There is an arrow pointing down three spaces from \((0,2)\) to the point \((0,−1)\). There is another arrow pointing from \((0,−1)\) to the point \((1,−1)\).

    Step 4: Draw a line that passes through the points:

    A coordinate plane with the points (0, 2) and (1, -1) graphed on it. There is a line passing through both points.

    This is a picture of a coordinate plane with the points \((0,2)\) and \((1,−1)\) graphed on it. There is a line passing through both points.
    )
  2. Plot the line \(y=\dfrac{1}{2}x−3\) starting with the y-intercept and then using the slope. (
    Solution
    x
    Solution:
    Note: The graph you create may look slightly different depending on the spacing you choose for your x and y-axis. The correct graph should still have the same direction of slope and the x and y-intercepts should be the same.
    A coordinate plane with a dashed line passing through the points (-4,-5),(-3, -4.5), (-2, -4), (-1,-3.5), (0, -3), (1,-2.5), (2, -2), (3, -1.5), (4, -1), (5, -0.5), (6, 0), (7, 0.5) and (8,1).
    )
  3. Plot the line \(y=−\dfrac{3}{5}x+1\) starting with the y-intercept and then using the slope. (
    Solution
    x
    Solution:
    Note: The graph you create may look slightly different depending on the spacing you choose for your x and y-axis. The correct graph should still have the same direction of slope and the x and y-intercepts should be the same.
    A coordinate plane with a dashed line passing through the points (-6, 4.6),(-5, 4), (-4, 3.4), (-3, 2.8), (-2, 2.2), (-1, 1.6), (0, 1), (1, 0.4), (2, -0.2), (3, -0.8), (4, -1.4), (5, -2), (6, -2.6), (7, -3.2) and (8, -3.8).
    )
  4. Plot the line \(y=2x+3\) starting with the y-intercept and then using the slope. (
    Solution
    x
    Solution:
    Note: Your graph may look a little different depending on the spacing you choose for your x and y-axis. Notice in this graph the hash marks for the x-axis are farther apart than the hash marks for the y-axis. This artificially makes the graph look less steep than it is if the hash marks are the same distance apart. However, sometimes this is helpful in order to better fit the data into the graph.
    A coordinate plane with a line passing through the points (3,9), (2,7), (1,5), (0,3), (-1,1), (-2,-1), (-3,-3), (-4,-5), (-5,-7) and (-6,-9).
    )
  5. Plot the line \(y=−x−4\) starting with the y-intercept and then using the slope. (
    Solution
    x
    Solution:
    Note: In this graph, the spacing of the hash marks on the x and y-axis are spaced almost identically.
    A coordinate plane with a line passing through the points (3,-7), (2,-6), (1,-5), (0,-4), (-1,-3), (-2,-2), (-3,-1), (-4,0), (-5,1), (-6,2), (-7,3), (-8,4) and (-9,5).
    Details:
    To graph this line you need to identify the slope and the y-intercept. The equation is written in slope-intercept form, \(y=mx+b\), where m is the slope and b is the y-intercept.

    Step 1: Find the slope and the y-intercept of the line:

    The equation of the line is:

    \({\text{y}}={{\color{Green} -\text{x}}}{\color{Green}{-}4}\)

    Keep in mind that \({\color{Green}-}{\color{Green}{\text{x}}}\) is equal to \({\color{Green}-1}{\color{Green}{\text{x}}}\), so an equivalent equation is:

    \({\text{y}}={\color{Green}-1}{\text{x}}{\color{Green}{-}4}\)

    So the slope is \({\color{Green}-1}\), and the y-intercept is \({\color{Green}-4}\)

    Step 2: Graph the y-intercept:

    A coordinate plane with the point (0, -4) graphed on it.

    This is a picture of a coordinate plane with the point \((0,−4)\) graphed on it.

    Step 3: Find another point on the line using the slope:

    The slope is \(−1\), which you can rewrite as \(-\dfrac{1}{1}\). Slope is \(\dfrac{\text{rise}}{\text{run}}\), which means that to find another point on the graph, you start at the y-intercept and then move down one space, then one space to the right:

    A coordinate plane with the points (0, -4) and (1, -5) graphed on it. There is a vertical arrow pointing from (-4, 0) down to (-5, 0) and a horizontal arrow pointing right from (-5, 0) to (1, -5).

    This is a picture of a coordinate plane with the points \((0,−4)\) and \((1,−5)\) graphed on it. There is an arrow pointing from \((−4,0)\) to \((−5,0)\) and an arrow pointing from \((−5,0)\) to \((1,-5)\)

    Step 4: Draw a line that passes through the points:

    A coordinate plane with the points (0, -4) and (1, -5) graphed on it. There is a line passing through both points.

    This is a picture of a coordinate plane with the points \((0,−4)\) and \((1,−5)\) graphed on it. There is a line passing through both points.
    )
  6. Plot the line \(y=\dfrac{4}{5}x+4\) starting with the y-intercept and then using the slope. (
    Solution
    x
    Solution:
    A coordinate plane with a line passing through the points (3,6.4), (2,5.6), (1,4.8), (0,4), (-1,3.2), (-2,2.4), (-3,1.6), (-4,0.8), (-5,0), (-6,-0.8), (-7,-1.6), (-8,-2.4) and (-9,-3.2).
    )