Skip to main content
Mathematics LibreTexts

5.8: Graphing Functions

  • Page ID
    129560
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    People riding on chairlifts over a mountain slope.
    Figure 5.71: The ski lifts and the mountain both have a slope. (credit: modification of work "colorado springs zoo tram" by woodleywonderworks/Flickr, CC BY 2.0)

    Learning Objectives

    After completing this module, you should be able to:

    1. Graph functions using intercepts.
    2. Compute slope.
    3. Graph functions using slope and yy-intercept.
    4. Graph horizontal and vertical lines.
    5. Interpret graphs of functions.
    6. Model applications using slope and yy-intercept.

    In this section, we will expand our knowledge of graphing by graphing linear functions. There are many real-world scenarios that can be represented by graphs of linear functions. Imagine a chairlift going up at a ski resort. The journey a skier takes travelling up the chairlift could be represented as a linear function with a positive slope. The journey a skier takes down the slopes could be represented by a linear function with a negative slope.

    Graphing Functions Using Intercepts

    Every linear equation can be represented by a unique line that shows all the solutions of the equation. We have seen that when graphing a line by plotting points, you can use any three solutions to graph. This means that two people graphing the line might use different sets of three points. At first glance, their two lines might not appear to be the same, since they would have different points labeled. But if all the work was done correctly, the lines should be exactly the same. One way to recognize that they are indeed the same line is to look at where the line crosses the \(\bar{x}\)-axis and the \(y\)-axis. These points are called the intercepts of a line. Let us review the graphs of the lines in Figure 5.65.

    Four coordinate planes. A line is plotted on each coordinate plane. The first coordinate plane is labeled, (a) 2x plus y equals 6. The line passes through the points (0, 6) and (3, 0). The second coordinate plane is labeled, (b) 3x minus 4y equals 12. The line passes through the points (0, negative 3) and (4, 0). The third coordinate plane is labeled, (c) x minus y equals 5. The line passes through the points (0, negative 5) and (5, 0). The fourth coordinate plane is labeled, (d) y equals negative 2x. The line passes through the points (negative 2, 4), (0, 0), and (2, negative 4). Four coordinate planes. A line is plotted on each coordinate plane. The first coordinate plane is labeled, (a) 2x plus y equals 6. The line passes through the points (0, 6) and (3, 0). The second coordinate plane is labeled, (b) 3x minus 4y equals 12. The line passes through the points (0, negative 3) and (4, 0). The third coordinate plane is labeled, (c) x minus y equals 5. The line passes through the points (0, negative 5) and (5, 0). The fourth coordinate plane is labeled, (d) y equals negative 2x. The line passes through the points (negative 2, 4), (0, 0), and (2, negative 4). Four coordinate planes. A line is plotted on each coordinate plane. The first coordinate plane is labeled, (a) 2x plus y equals 6. The line passes through the points (0, 6) and (3, 0). The second coordinate plane is labeled, (b) 3x minus 4y equals 12. The line passes through the points (0, negative 3) and (4, 0). The third coordinate plane is labeled, (c) x minus y equals 5. The line passes through the points (0, negative 5) and (5, 0). The fourth coordinate plane is labeled, (d) y equals negative 2x. The line passes through the points (negative 2, 4), (0, 0), and (2, negative 4). Four coordinate planes. A line is plotted on each coordinate plane. The first coordinate plane is labeled, (a) 2x plus y equals 6. The line passes through the points (0, 6) and (3, 0). The second coordinate plane is labeled, (b) 3x minus 4y equals 12. The line passes through the points (0, negative 3) and (4, 0). The third coordinate plane is labeled, (c) x minus y equals 5. The line passes through the points (0, negative 5) and (5, 0). The fourth coordinate plane is labeled, (d) y equals negative 2x. The line passes through the points (negative 2, 4), (0, 0), and (2, negative 4).
    Figure 5.72
    The table below lists where each of these lines crosses the \(x\)- and yy-axis. Do you see a pattern? For each line, the yy-coordinate of the point where the line crosses the \(x\)-axis is zero. The point where the line crosses the \(x\)-axis has the form (a, 0)(a, 0) and is called the \(x\)-intercept of the line. The \(x\)-intercept occurs when yy is zero. In each line, the \(x\)-coordinate of the point where the line crosses the yy-axis is zero. The point where the line crosses the yy-axis has the form (0,b)(0,b) and is called the yy-intercept of the line. The yy-intercept occurs when \(x\) is zero.
    Figure The line crosses the x-axisx-axis at: Ordered Pair for this Point The line crosses the y-axisy-axis at: Ordered Pair for This Point
    Figure (a) 3 (3,0)(3,0) 6 (0,6)(0,6)
    Figure (b) 4 (4,0)(4,0) 33 (0,3)(0,3)
    Figure (c) 5 (5,0)(5,0) 55 (0,5)(0,5)
    Figure (d) 0 (0,0)(0,0) 0 (0,0)(0,0)
    General Figure aa (a,0)(a,0) bb (0,b)(0,b)
    Example 5.70: Finding \(x\)- and yy-Intercepts

    Find the \(x\)-intercept and yy-intercept on the (a) and (b) graphs in Figure 5.73.

    Two x y coordinate planes labeled (a) and (b). In each coordinate plane, the x and y axes range from negative 8 to 8, in increments of 1. Graph (a) shows a line that passes through the following points, (negative 8, 6), (0, 2), (4, 0), and (8, negative 2). Graph (b) shows a line that passes through the following points, (0, negative 6), (2, 0), and (5, 6). Note: all values are approximate.
    Figure 5.73
    Answer

    In Figure 5.66 , the graph crosses the \(x\)-axis at the point \((4,0)\). The \(x\)-intercept is \((4,0)\). The graph crosses the \(y\)-axis at the point \((0,2)\). The \(y\)-intercept is \((0,2)\). In Figure 5.66 , the graph crosses the \(x\)-axis at the point \((2,0)\). The \(x\)-intercept is \((2,0)\). The graph crosses the \(y\)-axis at the point \((0,-6)\). The \(y\)-intercept is \((0,-6)\).

    xFigure 5.73, the graph crosses the \(x\)-axis at the point (2,0)(2,0). The \(x\)-intercept is (2,0)(2,0). The graph crosses the yy-axis at the point (0,6)(0,6). The yy-intercept is (0,6)(0,6).

    Your Turn 5.70

    Find the \(x\)-intercept and \(y\)-intercept on the given graph.

    A line is plotted on an x y coordinate plane. The x and y axes range from negative 6 to 6, in increments of 1. The line passes through the following points, (negative 3, negative 5), (0, negative 2), (2, 0), and (6, 4).
    Figure 5.74
     
    Example 5.71: Graphing a Function Using Intercepts

    Find the intercepts of 2x+y=82x+y=8. Then graph the function using the intercepts.

    Answer

    Let y=0y=0 to find the \(x\)-intercept, and let x=0x=0 to find the yy-intercept.

      2x+y=82x+y=8   2x+y=82x+y=8
    To find the \(x\)-intercept, let y=0y=0. 2x+0=82x+0=8 To find the yy-intercept, let x=0x=0. 2(0)+y=82(0)+y=8
    Simplify. 2x=8x=42x=8x=4 Simplify. y=8y=8
    The \(x\)-intercept is: (4,0)(4,0) The yy-intercept is: (0,8)(0,8)

    Plot the intercepts to get the graph in Figure 5.75.

    A line is plotted on an x y coordinate plane. The x and y axes range from negative 10 to 10, in increments of 1. The line passes through the following points, (0, 8), (4, 0), and (8, negative 8).
    Figure 5.75
    Your Turn 5.71
    1. Find the intercepts of \(3x + y = 12\) and use them to graph the equation.

    Computing Slope

    When graphing linear equations, you may notice that some lines tilt up as they go from left to right and some lines tilt down. Some lines are very steep and some lines are flatter. In mathematics, the measure of the steepness of a line is called the slope of the line. To find the slope of a line, we locate two points on the line whose coordinates are integers. Then we sketch a right triangle where the two points are vertices of the triangle and one side is horizontal and one side is vertical. Next, we measure or calculate the distance along the vertical and horizontal sides of the triangle. The vertical distance is called the rise and the horizontal distance is called the run.

    We can assign a numerical value to the slope of a line by finding the ratio of the rise and run. The rise is the amount the vertical distance changes while the run measures the horizontal change, as shown in this illustration. Slope (Figure 5.76) is a rate of change.

    An arrow pointing up and labeled Rise is connected at a right angle to an arrow pointing right and labelled Run.
    Figure 5.76:
    FORMULA

    To calculate slope \((m)\), use the formula

    \[m=\frac{r i s e}{r u n}\]

    where the rise measures the vertical change and the run measures the horizontal change.

    The concept of slope has many applications in the real world. In construction, the pitch of a roof, the slant of plumbing pipes, and the steepness of stairs are all applications of slope. As you ski or jog down a hill, you definitely experience slope.

    Example 5.72: Finding the Slope from a Graph

    Find the slope of the line shown in Figure 5.77.

    A line is plotted on an x y coordinate plane. The x-axis ranges from negative 1 to 9, in increments of 1. The y-axis ranges from negative 1 to 7, in increments of 1. The line passes through the following points, (0, 5), (3, 3), (6, 1), and (9, negative 1). Note: all values are approximate.

    Figure 5.77

    Answer

    Step 1: Locate two points on the graph whose coordinates are integers, such as (0,5)Figure 5.78.

    A line is plotted on an x y coordinate plane. The x-axis ranges from negative 2 to 10, in increments of 1. The y-axis ranges from negative 2 to 8, in increments of 1. The line passes through the following points, (0, 5), (3, 3), (6, 1), and (9, negative 1). A slope of the line is drawn connecting the points, (0, 3), (0, 5), and (3, 3). The vertical length between the points, (0, 3) and (0, 5) is labeled rise. The horizontal length between the points, (0, 3) and (3, 3) is labeled run. Note: all values are approximate.

    Figure 5.78

    Step 2: Count the rise; since it goes down, it is negative. The rise is −2.

    Step 3: Count the run. The run is 3.

    Step 4: Use the slope formula m=riserunm=riserun substitute the values of the rise and run. m=23m=23

    The slope of the line is 2323.

    The solution is yy decreases by 2 units as \(x\) increases by 3 units.

    Your Turn 5.72
    Find the slope of the line shown in the graph.
    A line is plotted on an x y coordinate plane. The x-axis ranges from negative 4 to 4, in increments of 1. The y-axis ranges from negative 6 to 1, in increments of 1. The line passes through the following points, (negative 1.5, 0), (0, negative 2), and (3, negative 6). Note: all values are approximate.
    Figure 5.79

    Sometimes we will need to find the slope of a line between two points when we don’t have a graph to measure the rise and the run. We could plot the points on grid paper, then count out the rise and the run, but there is a way to find the slope without graphing. First, we need to introduce some algebraic notation.

    We have seen that an ordered pair \((x, y)\) gives the coordinates of a point. But when we work with slopes, we use two points. How can the same symbol \((x, y)\) be used to represent two different points? Mathematicians use subscripts to distinguish such points. For example, \(\left(x_1, y_1\right)\) would be said aloud as " \(x\) sub \(1, y\) sub 1 " and ( \(\left.x_2, y_2\right)\) read " \(x\) sub 2, \(y\) sub 2." The "sub" is a short way of saying "subscript." We will use \(\left(x_1, y_1\right)\) to identify the first point and \(\left(x_2, y_2\right)\) to identify the second point in our slope equation. If we had more than two points, (if we were finding more than one slope), we could use \(\left(x_3, y_3\right),\left(x_4, y_4\right)\), and so on.

    Let's review how the rise and run relate to the coordinates of the two points by taking another look at the slope of the line between the points \((2,3)\) and \((7,6)\), as shown in Figure 5.71 .

    Figure 5.80.

    A line is plotted on an x y coordinate plane. The x and y axes range from negative 1 to 8, in increments of 1. The line passes through the following points, (2, 3) and (7, 6). A slope of the line is drawn connecting the points, (2, 3), (2, 6), and (7, 6). The vertical length between the points, (2, 3) and (2, 6), is labeled y sub 2 minus y sub 1 equals 6 minus 3 equals 3. The horizontal length between the points, (2, 6) and (7, 6) is labeled x sub 2 minus x sub 1 equals 7 minus 2 equals 5. Note: all values are approximate.

    Figure 5.80

    On the graph, we count the rise of 3 and the run of 5 . Notice on the graph that that \(\left(x_1, y_1\right)\) is the point \((2,3)\) and ( \(\left.x_2, y_2\right)\) is the point \((7,6)\). The rise can be found by subtracting the \(y\)-coordinates, 6 and 3 , and the run can be found by subtracting the \(x\)-coordinates 7 and 2 .

    \[
    m=\frac{r i s e}{r u n}=\frac{6-3}{7-2}=\frac{3}{5}
    \]


    We have shown that \(m=\frac{y_2-y_1}{x_2-x_1}\) is really another version of \(m=\frac{r i s e}{r u n}\). We can use this formula to find the slope of a line.

     

    FORMULA

    To find the slope of the line between two points \(\left(x_1, y_1\right)\) and \(\left(x_2, y_2\right)\), use the formula

    \[
    m=\frac{y_2-y_1}{x_2-x_1}
    \]
     

    Example 5.73: Finding the Slope of the Line Using Points

    Use the slope formula to find the slope of the line through the points (−2, −3) and (−7, 4).

    Answer

    We’ll call (−2, −3) point 1 and (−7, 4) point 2.

    Step 1: Use the slope formula: m=y2y1x2x1m=y2y1x2x1

    Step 2: Substitute the values: m=4(3)7(2)m=4(3)7(2)

    Step 3: Simplify: m=75=75m=75=75

    Step 4: Verify the slope on the graph shown in Figure 5.81.

    A line is plotted on an x y coordinate plane. The x-axis ranges from negative 8 to 2, in increments of 1. The y-axis ranges from negative 6 to 6, in increments of 1. The line passes through the following points, (negative 7, 4), (negative 4.2, 0), and (0, negative 5.8). A slope of the line is drawn connecting the points, (negative 7, 4), (negative 7, negative 3), and (negative 2, negative 3). The vertical length between the points, (negative 7, 4) and (negative 7, negative 3) is labeled rise. The horizontal length between the points, (negative 7, negative 3) and (negative 2, negative 3) is labeled run. Note: all values are approximate.
    Figure 5.81
     
    Your Turn 5.73

    Use the slope formula to find the slope of the line through the pair of points \((-3, 4)\) and \((2, -1)\).

    Graphing Functions Using Slope and yy-Intercept

    We have graphed linear equations by plotting points and using intercepts. Once we see how an equation in slope-intercept form and its graph are related, we will have one more method we can use to graph lines. Review the graph of the equation y=12x+3Figure 5.82 and find its slope and yy-intercept.

    A line is plotted on an x y coordinate plane. The x-axis ranges from negative 8 to 8, in increments of 1. The y-axis ranges from negative 4 to 10, in increments of 1. The line passes through the following points, (0, 3), (2, 4), and (4, 5). A slope of the line is drawn connecting the points, (2, 4), (2, 5), and (4, 5). The vertical length between the points, (2, 4) and (2, 5), is labeled rise equals 1. The horizontal length between the points, (2, 5) and (4, 5) is labeled run equals 2. Note: all values are approximate.
    Figure 5.82: Graph of the equation y=12x+3y=12x+3.

    The vertical and horizontal lines in the graph show us the rise is 1 and the run is 2, respectively.

    Substituting into the slope formula: m=riserun=12m=riserun=12

    The yy-intercept is (0,3)(0,3). Look at the equation of this line.

    y=12x+3y=12x+3

    Look at the slope and yy-intercept.

    slopem=12andy-intercept(0,3)slopem=12andy-intercept(0,3)

    When a linear equation is solved for yy, the coefficient of the \(x\) term is the slope and the constant term is the yy-coordinate of the yy-intercept. We say that the equation y=12x+3y=12x+3 is in slope-intercept form. Sometimes the slope-intercept form is called the yy-form.

    Example 5.74: Finding the Slope and yy-Intercept of a Line

    Identify the slope and yy-intercept of the line from the equation:

    1. y=47x2y=47x2
    2. x+3y=9x+3y=9
    Answer
    1. We compare our equation to the slope-intercept form of the equation.
      Step 1: Write the slope-intercept form of the equation of the line.

      y=mx+by=mx+b


      Step 2: Write the equation of the line.

      y=47x2y=47x2


      Step 3: Identify the slope.

      m=47m=47


      Step 4: Identify the yy-intercept.

      y-intercept is (0,2)y-intercept is (0,2)

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

      x+3y=9x+3y=9


      Step 2: Subtract \(x\) from each side.

      3y=x+93y=x+9


      Step 3: Divide both sides by 3.

      3y3=x+933y3=x+93


      Step 4: Simplify.

      y=13x+3y=13x+3


      Step 5: Write the slope-intercept form of the equation of the line.

      y=mx+by=mx+b


      Step 6: Write the equation of the line.

      y=13x+3y=13x+3


      Step 7: Identify the slope.

      m=13m=13


      Step 8: Identify the yy-intercept.

      y-intercept is(0,3)y-intercept is(0,3).

    Your Turn 5.74

    Identify the slope and \(y\)-intercept from the equation of the line.

    \(y = 2x - 1\)

    \(x + 4y = 16\)

    Example 5.75: Graphing the Slope and yy-Intercept

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

    Answer

    The equation is in slope-intercept form y=mx+by=mx+b.

    y = x + 4 . y = x + 4 .

    Step 1: Identify the slope and yy-intercept.
    m=1m=1, yy-intercept is (0,4)(0,4).

    Step 2: Plot the yFigure 5.83).

    1. Identify the rise over the run.
      m=1=11m=1=11
    2. Count out the rise and run to mark the second point.
      rise 11, run 1
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 10 to 10, in increments of 1. The line passes through the following points, (negative 6, 10), (0, 4), (1, 3), (4, 0), and (9, negative 5). Note: all values are approximate.
    Figure 5.83
     
    Your Turn 5.75

    Graph the line of the equation \(y = - x - 3\) using its slope and \(y\)-intercept.

    Graphing Horizontal and Vertical Lines

    Some linear equations have only one variable. They may have just \(x\) without the yy, or just yy without an \(x\). This changes how we make a table of values to get the points to plot. Let us consider the equation x=3x=3. This equation has only one variable, \(x\). The equation says that \(x\) is always equal to 33, so its value does not depend on yy. No matter what the value of yy is, the value of \(x\) is always 33. To make a table of values, write 33 in for all the \(x\)-values. Then choose any values for yy. Since \(x\) does not depend on yy, you can choose any numbers you like. But to fit the points on our coordinate graph, we will use 1, 2, and 3 for the yy-coordinates in the table below.

    x=3x=3
    \(x\) yy (\(x\), yy)
    −3 1 (3,1)(3,1)
    33 2 (3,2)(3,2)
    33 3 (3,3)(3,3)

    Plot the points from the table and connect them with a straight line (Figure 5.84). Notice that we have graphed a vertical line.

    A line is plotted on an x y coordinate plane. The x and y axes range from negative 7 to 7, in increments of 1. The line representing x equals negative 3 is vertical and it passes through the following points, (negative 3, 3), (negative 3, 2), and (negative 3, 1). Note: all values are approximate.
    Figure 5.84: Graph of x=3x=3

    What is the slope? If we take the two points (3,3)(3,3) and (3,1)(3,1) then the rise is 2 and the run is 0.

    Using the slope formula we get: m=riserun=20m=riserun=20

    The slope is undefined since division by zero is undefined. We say that the slope of the vertical line x=3x=3 is undefined. The slope of any vertical line x=ax=a (where aa is any number) will be undefined.

    What if the equation has yy but no \(x\)? Let’s graph the equation y=4y=4. This time the yy-value is a constant, so in this equation, yy does not depend on \(x\). Fill in 4 for all the yy values in the table below and then choose any values for \(x\). We will use 0, 2, and 4 for the \(x\)-coordinates.

    y=4y=4
    \(x\) yy (\(x\), yy)
    0 4 (0,4)(0,4)
    2 4 (2,4)(2,4)
    4 4 (4,4)(4,4)

    In Figure 5.85, we have graphed a horizontal line passing through the yy-axis at 4.

    A line is plotted on an x y coordinate plane. The x and y axes range from negative 7 to 7, in increments of 1. The line representing y equals 4 is horizontal and it passes through the following points, (0, 4), (2, 4), and (4, 4). Note: all values are approximate.
    Figure 5.85: Graph of y=4y=4

    What is the slope? If we take the two points (2,4)(2,4) and (4,4)(4,4) then the rise is 0 and the run is 2. Using the slope formula, we get m=riserun=02=0m=riserun=02=0. The slope of the horizontal line y=4y=4 is 0. The slope of any horizontal line y=by=b (where bb is any number) will be 0. When the yy-coordinates are the same, the rise is 0.

    Example 5.76: Graphing A Vertical Line

    Graph: x=2x=2.

    Answer

    The equation has only one variable, xFigure 5.86).

    x=2x=2
    \(x\) yy (\(x\), yy)
    2 1 (2,1)(2,1)
    2 2 (2,2)(2,2)
    2 3 (2,3)(2,3)
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 7 to 7, in increments of 1. The line representing x equals 2 is vertical and it passes through the following points, (2, 1), (2, 2), and (2, 3). Note: all values are approximate.
    Figure 5.86
     
    Your Turn 5.76

    Graph \(x = 5\).

    Example 5.77: Graphing A Horizontal Line

    Graph: y=1y=1.

    Answer

    The equation y=1Figure 5.87).

    y=1y=1
    \(x\) yy (\(x\), yy)
    0 11 (0,1)(0,1)
    3 11 (3,1)(3,1)
    33 11 (3,1)(3,1)
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 7 to 7, in increments of 1. The line representing y equals negative 1 is horizontal and it passes through the following points, (negative 3, negative 1), (0, negative 1), and (3, negative 1). Note: all values are approximate.
    Figure 5.87
     
    Your Turn 5.77

    Graph the equation \(y = - 4\).

    The table below summarizes all the methods we have used to graph lines.

    A table titled, Methods to Graph Lines. The table has four columns. The first column is titled, Point Plotting. It shows a blank x y table. Text reads, Find three points. Plot the points. Make sure they line up, then draw the line. The second column is titled, Slope-Intercept. It shows the equation y equals m x plus b. Text reads, Find the slope and y-intercept. Start at the y-intercept, then count the slope to get a second point. The third column is titled, Intercepts. It shows an x y table with 0 in the first row under x and 0 in the second row under y. Text reads, Find the intercepts and a third point. Plot the points, make sure they line up, then draw the line. The fourth column is titled, Recognize Vertical and Horizontal Lines. Text reads, The equation has only one variable. x equals a, vertical. y equals b, horizontal.

    Interpreting Graphs of Functions

    An important yet often overlooked area in algebra involves interpreting graphs. Oftentimes in math classes, students are given mathematical functions and can make graphs to represent them. But the interpretation of graphs is a more applicable skill to the real world. Being able to “read” a graph—understanding its domain and range, what the intercepts mean, and what the slope (or curve) means— that's a real-world skill.

    Example 5.78: Interpreting a Graph

    In Figure 5.88 the \(x\)-axis on the graph represents the 120-minute bike ride Juan went on. The yy-axis represents how far away he was from his home.

    A graph titled, Juan's Bike Ride. The horizontal axis representing time in minutes ranges from 0 to 150, in increments of 15. The vertical axis representing the distance from home in miles ranges from 0 to 15, in increments of 3. The graph shows a line that passes through the points, (0, 0), (30, 6), (60, 6), (90, 12), and (135, 0).
    Figure 5.88
    1. Interpret the \(x\)- and yy-intercept.
    2. For each segment, find the slope.
    3. Create an interpretation of this graph (i.e., make up a story that goes with it).
    Answer
    1. (0,0)(0,0) is the \(x\)- and yy-intercept and represents Juan at home before his bike ride. The distance from home is 0 miles and 0 minutes have passed.
    2. In the first 30 minutes, the slope is 1515 and indicates Juan is traveling 1 mile for every 5 minutes. Between 30 and 60 minutes, the slope is 0 and indicates that he’s not riding the bike (the distance is not increasing). Then between 60 and 90 minutes, the slope is 1515 again. Finally, after 90 minutes the slope is 415,415, meaning Juan is getting 4 miles closer to home every 15 minutes.
    3. Answers will vary. Juan left his house for a bike ride. After 30 minutes, he was 6 miles from home and he stopped for ice cream at his local ice-cream truck. He enjoyed his ice cream for 30 minutes. He then jumped back on his bike and rode to his friend’s house. He arrived there 30 minutes later. His friend’s house was 12 miles from his home. His friend was not home so he immediately turned around and quickly rode home in 45 minutes.
    Your Turn 5.78
    In the given figure the \(x\)-axis on the graph represents the years. The y-axis represents the number of teachers at Jones High School.
    A graph titled, Teachers at Jones High. The horizontal axis representing years ranges from 1990 to 2025, in increments of 5. The vertical axis representing the number of teachers ranges from 0 to 90, in increments of 10. The graph shows a line that passes through the points, (1990, 20), (1995, 30), (2000, 50), (2005, 50), (2010, 40), (2015, 60), and (2020, 80).
    Figure 5.89: Teachers at Jones High

    Interpret the \(x\)- and \(y\)-intercept.

    For each segment, find the slope.

    Create an interpretation of this graph (i.e., make up a story that goes with it).

    Modeling Applications Using Slope and yy-Intercept

    Many real-world applications are modeled by linear equations. We will review a few applications here so you can understand how equations written in slope-intercept form relate to real-world situations. Usually when a linear equation model uses real-world data, different letters are used for the variables instead of using only \(x\) and yy. The variable names often remind us of what quantities are being measured. Also, we often need to extend the axes in our rectangular coordinate system to bigger positive and negative numbers to accommodate the data in the application.

    Example 5.79: Converting Temperature

    The equation F=95C+32F=95C+32 is used to convert temperatures from degrees Celsius (CC) to degrees Fahrenheit (FF).

    1. Find the Fahrenheit temperature for a Celsius temperature of 0°.
    2. Find the Fahrenheit temperature for a Celsius temperature of 20°.
    3. Interpret the slope and FF-intercept of the equation.
    4. Graph the equation.
    Answer
    1. Find the Fahrenheit temperature for a Celsius temperature of 0°.
      Find FF when C=0C=0. F=95(0)+32F=95(0)+32
      Simplify. F=32F=32
    • Find the Fahrenheit temperature for a Celsius temperature of 20°.
      Find FF when C=20C=20. F=95(20)+32F=95(20)+32
      Simplify. F=36+32F=36+32
      Simplify. F=68F=68
    • Interpret the slope and FF-intercept of the equation.

      Even though this equation uses FF and CC, it is still in slope-intercept form.

      y=mx+bF=mC+bF=95C+32y=mx+bF=mC+bF=95C+32

      The slope 9595 means that the temperature Fahrenheit (FF) increases 9 degrees when the temperature Celsius (CC) increases 5 degrees.

      The FF-intercept means that when the temperature is 0° on the Celsius scale, it is 32° on the Fahrenheit scale.

    • Graph the equation.

      We will need to use a larger scale than our usual. Start at the FFigure 5.90.

      A line is plotted on a coordinate plane. The horizontal axis representing C ranges from negative 40 to 40, in increments of 10. The vertical axis representing F ranges from negative 40 to 60, in increments of 10. The line passes through the points, (negative 30, negative 37), (negative 17, 0), (0, 33), (5, 42), and (20, 70). Note: all values are approximate.
      Figure 5.90
       
    Your Turn 5.79

    The equation \(h = 2s + 50\) is used to estimate a person’s height in inches, \(h\), based on women’s shoe size, \(s\).

    Estimate the height of a child who wears women’s shoe size 0.

    Estimate the height of a woman with shoe size 8.

    Interpret the slope and \(h\)-intercept of the equation.

    Graph the equation.

    Example 5.80: Calculating Driving Costs

    Sam drives a delivery van. The equation C=0.5d+60C=0.5d+60 models the relation between his weekly cost, CC, in dollars and the number of miles, dd, that he drives.

    1. Find Sam’s cost for a week when he drives 0 miles.
    2. Find the cost for a week when he drives 250 miles.
    3. Interpret the slope and CC-intercept of the equation.
    4. Graph the equation.
    Answer
    1. Find Sam’s cost for a week when he drives 0 miles.
      Find CC when dd = 0. C=0.5(0)+60C=0.5(0)+60
      Simplify. C=60C=60

      Sam’s costs are $60 when he drives 0 miles.

    • Find the cost for a week when he drives 250 miles.
      Find CC when d=250d=250. C=0.5(250)+60C=0.5(250)+60
      Simplify. C=185C=185

      Sam’s costs are $185 when he drives 250 miles.

    • Interpret the slope and CC-intercept of the equation.

      y=mx+bC=0.5d+60y=mx+bC=0.5d+60

      The slope, 0.5, means that the weekly cost, CC, increases by $0.50 when the number of miles driven, dd, increases by 1. The CC-intercept means that when the number of miles driven is 0, the weekly cost is $60.

    • Graph the equation (Figure 5.91).

      We’ll need to use a larger scale than usual. Start at the CC-intercept (0, 60). To count out the slope m=0.5m=0.5, we rewrite it as an equivalent fraction that will make our graphing easier.

      m=0.5=510=50100m=0.5=510=50100

      So to graph the next point go up 50 from the intercept of 60 and then to the right 100. The second point will be (100, 110).

      A line is plotted on an x y coordinate plane. The x and y axes range from 0 to 350, in increments of 25. The line passes through the points, (0, 60), (100, 110), (225, 175), and (325, 225). Note: all values are approximate.
      Figure 5.91
       
    Your Turn 5.80

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

    Find Stella’s cost for a week when she sells no pizzas.

    Find the cost for a week when she sells 15 pizzas.

    Interpret the slope and \(C\)-intercept of the equation.

    Graph the equation.

    Check Your Understanding

    62.
    True or False. The \(x\)-intercept of \(y = {\text{ }}2x{\text{ }}-8{\text{ is }}\left( {0,-8} \right)\).
    1. True
    2. False
    63.
    True or False. The slope of the line containing the points (1, 2) and (2, 4) is 1.
    1. True
    2. False
    For the following exercises, use the graph shown.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 10 to 10, in increments of 1. The line passes through the points, (negative 3, negative 7), (negative 1, 1), (0, 5), and (1, 9). Note: all values are approximate.
    64.
    True or False. This graph has a slope of 5.
    1. True
    2. False
    65.
    True or False. This is the graph of the equation \(y = {\text{ }}4x + 5\).
    1. True
    2. False
    66.
    True or False. All vertical lines have a slope of zero.
    1. True
    2. False

    Section 5.8 Exercises

    For the following exercises, find the \(x\)- and \(y\)-intercepts on the graph.
    1.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 6 to 6, in increments of 1. The line passes through the points, (negative 2, 5), (0, 3), (3, 0), and (6, negative 3). Note: all values are approximate.
    2.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 6 to 6, in increments of 1. The line passes through the points, (negative 6, 4), (negative 2, 0), (0, negative 2), and (4, negative 6). Note: all values are approximate.
    3.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 6 to 6, in increments of 1. The line passes through the points, (negative 1, negative 6), (0, negative 5), (5, 0), and (6, 1). Note: all values are approximate.
    4.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 6 to 6, in increments of 1. The line passes through the points, (negative 3, negative 6), (0, 0), and (3, 6). Note: all values are approximate.
    For the following exercises, graph using the intercepts.
    5.
    \(- x + 4y = 8\)
    6.
    \(x + y = - 3\)
    7.
    \(4x + y = 4\)
    8.
    \(3x - y = - 6\)
    9.
    \(2x + 4y = 12\)
    10.
    \(2x - 5y = - 20\)
    11.
    \(y = - 2x\)
    12.
    \(y = x\)
    For the following exercises, find the slope of the line.
    13.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 8 to 8, in increments of 1. The line passes through the points, (negative 5, negative 6), (0, negative 4), and (5, negative 2). Note: all values are approximate.
    14.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 8 to 8, in increments of 1. The line passes through the points, (negative 4, negative 6), (0, negative 1), and (7.2, 8). Note: all values are approximate.
    15.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 8 to 8, in increments of 1. The line passes through the points, (negative 2, negative 8), (0, negative 5), (4, 1), and (8, 7). Note: all values are approximate.
    16.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 8 to 8, in increments of 1. The line passes through the points, (negative 5, negative 6), (0, negative 4), and (5, negative 2). Note: all values are approximate.
    17.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 8 to 8, in increments of 1. The line passes through the points, (negative 4, negative 6), (0, negative 1), and (7.2, 8). Note: all values are approximate.
    18.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 8 to 8, in increments of 1. The line passes through the points, (negative 2, negative 8), (0, negative 5), (4, 1), and (8, 7). Note: all values are approximate.
    19.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 8 to 8, in increments of 1. The line passes through the points, (negative 3, negative 7), (0, negative 2), (1, 0), and (6, 8). Note: all values are approximate.
    20.
    A line is plotted on an x y coordinate plane. The x and y axes range from negative 8 to 8, in increments of 1. The line passes through the points, (negative 6, 4), (0, 2), and (6, 0). Note: all values are approximate.
    For the following exercises, use the slope formula to find the slope of the line between each pair of points.
    21.
    (2, 5), (4, 0)
    22.
    (−3, 3), (4, −5)
    23.
    (−1, −2), (2, 5)
    24.
    (4, −5), (1, −2)
    For the following exercises, identify the slope and \(y\)-intercept of each line.
    25.
    \(y = - 7x + 3\)
    26.
    \(y = 4x - 10\)
    27.
    \(3x + y = 5\)
    28.
    \(4x + y = 8\)
    29.
    \(6x + 4y = 12\)
    30.
    \(8x + 3y = 12\)
    31.
    \(5x - 2y = 6\)
    32.
    \(7x - 3y = 9\)
    For the following exercises, graph the line of each equation using its slope and \(y\)-intercept.
    33.
    \(y = 3x - 1\)
    34.
    \(y = 2x - 3\)
    35.
    \(y = - x + 3\)
    36.
    \(y = - x - 4\)
    37.
    \(y = - 2x - 3\)
    38.
    \(y = - 3x + 2\)
    39.
    \(3x - 2y = 4\)
    40.
    \(3x - 4y = 8\)
    For the following exercises, find the slope of each line and graph.
    41.
    \(y = 3\)
    42.
    \(y = - 2\)
    43.
    \(x = - 5\)
    44.
    \(x = 4\)
    For the following exercises, graph and interpret applications of slope-intercept.
    The equation \(P = 31 + 1.75w\) models the relation between the amount of Tuyet’s monthly water bill payment, \(P\), in dollars, and the number of units of water, \(w\), used.
    45.
    Find Tuyet’s payment for a month when 0 units of water are used.
    46.
    Find Tuyet’s payment for a month when 12 units of water are used.
    47.
    Interpret the slope and \(P\)-intercept of the equation.
    48.
    Graph the equation.
    For the following exercises, graph and interpret applications of slope-intercept.
    Bruce drives his car for his job. The equation \(R = 0.575m + 42\) models the relation between the amount in dollars, \(R\), that he is reimbursed and the number of miles, \(m\), he drives in one day.
    49.
    Find the amount Bruce is reimbursed on a day when he drives 0 miles.
    50.
    Find the amount Bruce is reimbursed on a day when he drives 220 miles.
    51.
    Interpret the slope and \(R\)-intercept of the equation.
    52.
    Graph the equation.
    For the following exercises, graph and interpret applications of slope-intercept.
    Cherie works in retail and her weekly salary includes commission for the amount she sells. The equation \(S = 400 + 0.15c\) models the relation between her weekly salary, \(S\), in dollars and the amount of her sales, \(c\), in dollars.
    53.
    Find Cherie’s salary for a week when her sales were $0.
    54.
    Find Cherie’s salary for a week when her sales were $3,600.
    55.
    Interpret the slope and \(S\)-intercept of the equation.
    56.
    Graph the equation.
    For the following exercises, graph and interpret applications of slope-intercept.
    Costa is planning a lunch banquet. The equation \(C = 450 + 28g\) models the relation between the cost in dollars, \(C\), of the banquet and the number of guests, \(g\).
    57.
    Find the cost if the number of guests is 40.
    58.
    Find the cost if the number of guests is 80.
    59.
    Interpret the slope and \(C\)-intercept of the equation.
    60.
    Graph the equation.

    This page titled 5.8: Graphing Functions is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform.

    • Was this article helpful?