Skip to main content

Registration is now open for this year's LibreFest! Join us virtually the week of July 13.

Register here
Mathematics LibreTexts

0.09: Review - Graphs of Linear Equations

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

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

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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{\longvect}{\overrightarrow}\)

    \( \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}\)
    Learning Objectives
    • Find the slope of a line
    • Graph a line given a point and the slope
    • Graph a line using its slope and intercept
    • Use slopes to identify parallel and perpendicular lines

    Find the Slope of a Line

    A. Find the slope of a line given a graph

    When you graph 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. 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 OF A LINE
    This figure has a diagram of two arrows. The first arrow is vertical and pointed up and labeled “rise”. The second arrow starts at the end of the first. The second arrow is horizontal and pointed right and labeled “run”.
    Figure \(1\) Slope

    The slope of a line is         \(m=\dfrac{\text{rise}}{\text{run}}=\dfrac{\text{change in vertical distance}}{\text{change in horizontal distance}} \).

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

    When the vertical change is positive, the direction is up.
    When the vertical change is negative, the direction is down.
    When the horizontal change is positive, the direction is to the right.
    When the horizontal change is negative, the direction is to the left.

    To find the slope of a line, locate two points on the line whose coordinates are integers. Draw a path from one point to the other consisting of a vertical line and a horizontal line. The vertical distance is called the rise and the horizontal distance is called the run.

    how-to.png HOW TO FIND THE SLOPE OF A LINE FROM ITS GRAPH USING \(m=\frac{\text{rise}}{\text{run}}\)
    1. Locate two points on the line whose coordinates are integers
    2. Starting with one point, sketch a vertical line and a horizontal line that goes from the first point to the second point. 
      Count the vertical rise and the horizontal run.
           Rise is positive if you go up to get to the second point;     rise is negative if you go down to get to the second point.
           Run is positive if you go right to get to the second point; run is negative if you go left to get to the second point.
           Remember, \( \dfrac{-a}{b}=\dfrac{a}{-b}=-\dfrac{a}{b} \) and \( a = \dfrac{a}{1} \) and \(\dfrac{a}{b}=\dfrac{-a}{-b} \).
    3. Take the ratio of rise to run to find the slope: \(m=\dfrac{\text{rise}}{\text{run}}\).

    The slope of a horizontal line is zero (because the rise is \(0\) ). The slope of a vertical line is undefined (because the run is \(0\) ).

    Example \(\PageIndex{1}\)
    Find the slope of the lines shown.
    a.This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 1 to 9. The y-axis runs from negative 1 to 7. The line goes through the points (0, 5), (3, 3), and (6, 1). b.070 example 1b.jpg - The figure then shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 1 to 6. The y-axis runs from negative 1 to 8. The line goes through the points (0, 4) and (3, 4). What is the rise? The rise is 0. What is the run? The run is 3. What is the slope? m equals rise divided by run. m equals 0 divided by 3. m equals 0. The slope of the horizontal line y equals 4 is 0. The figure then shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 2 to 6. The y-axis runs from negative 3 to 3. The line goes through the points (3, 0) and (3, 2). What is the rise? The rise is 2. What is the run? The run is 0. What is the slope? m equals rise divided by run. m equals 2 divided by 0.c.
    Solution
    a.
    Step 1. Locate two points on the graph whose coordinates are integers. \( (0,5) \) and \( (3,3) \)
    Step 2. Starting at \((0,5)\), sketch a right triangle to
    \((3,3)\) as shown in this graph.

    Count the rise — since it goes down, the rise is negative.
    Count the run — since it goes up, the run is positive.
    .
    The rise is \(−2\) or down 2 units. The run is 3 or right 3 units.
    Step 3. Use the slope formula. Substitute the values of the rise and run.   Simplify. \(m=\frac{\text{rise}}{\text{run}}\)
    \(m=\frac{-2}{3} =−\frac{2}{3}\)

    The slope of the line is \(−\frac{2}{3}\). So \(y\) decreases by 2 units as \(x\) increases by 3 units.

    b.
         Step 1. Two points on the line are \((0, 4)\) and \((3, 4)\).
         Step 2. The rise is 0; the run is 3.
         Step 3. \(m=\frac{\text{rise}}{\text{run}}=\frac{0}{3} = 0 \)
         All horizontal lines have slope 0. When the \(y\)-coordinates are the same, the rise is 0

    c.
         Step 1. Two points on the line are \((3, 0)\) and \((3, 2)\).
         Step 2. The rise is 2; the run is 0.
         Step 3. \(m=\frac{\text{rise}}{\text{run}}=\frac{2}{0} = \text{undefined.} \)
         The slope is undefined since division by zero is undefined. 
         All vertical lines have an undefined slope. When the \(x\)-coordinates are the same, the run is 0.

    try-it.png Try It \(\PageIndex{2}\)

    Find the slope of the lines shown.

    a.
     This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 1 to 5. The y-axis runs from negative 6 to 1. The line goes through the points (0, negative 2) and (3, negative 6).
    b.
     070 TryIt2b.jpg - This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 6 to 3. The y-axis runs from negative 4 to 3. The line goes through the points (negative 5, negative 2) and (0, 1).
    c.
    070 TryIt2c.jpg - The figure then shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 4 to 4. The y-axis runs from negative 4 to 3. The line goes through the points (0, negative 3) and (3, negative 3). What is the rise? The rise is 0. What is the run? The run is 3. What is the slope? m equals rise divided by run. m equals 0 divided by 3. m equals 0. The slope of the horizontal line  is 0.
    d.
    070 TryIt2d.jpg - The figure then shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 4 to 4. The y-axis runs from negative 4 to 3. The line goes through the points (negative 2, 0) and (negative 2, 3). What is the rise? The rise is 3. What is the run? The run is 0. What is the slope? m equals rise divided by run. m equals 3 divided by 0.
    Answer

    a. \(-\frac{4}{3}\) or down 4 and right 3 because \(-\frac{4}{3}\) = \(\frac{-4}{3}\).  Alternatively, up 4 and left 3 because \(-\frac{4}{3}\) = \(\frac{4}{-3} \).
    b. \(\frac{3}{5}\) or up 3 and right 5.  Alternatively, down 3 and left 5 because \(\frac{3}{5}\) = \(\frac{-3}{-5} \).
    c.  \(\frac{0}{3}\) or zero. All horizontal lines have a slope of zero because the \(y\)-coordinates are the same so the rise is zero.
    d. \(\frac{3}{0} \) or undefined. All vertical lines have an undefined slope because the \(x\)-coordinates are the same so the run is zero.

    QUICK GUIDE TO THE SLOPES OF LINES

    The image shows four arrows. The first arrow is slanted and pointing up and to the right and is labeled “positive”. The second arrow is slanted and pointing down and to the right and labeled “negative”. The third arrow is horizontal and labeled “zero”. The fourth arrow is vertical and labeled “undefined”.

    B. Find the slope given 2 points on a line

    The figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 1 to 7. The y-axis runs from negative 1 to 7. The line goes through the points (2, 3) and (7, 6). A right triangle is drawn by connecting the three points (2, 3), (2, 6), and (7, 6). The point (2, 3) is labeled (x 1, y 1). The point (7, 6) is labeled (x 2, y 2). The vertical side of the triangle has labels y 2 minus y 1, 6 minus 3, and 3. The horizontal side of the triangle has labels x 2 minus x 1, 7 minus 2, and 5.There are occasions when the slope of a line between two points must be found but it isn't practical or possible to start with a graph and count out the rise and the run. Instead, a formula can be used to find the slope.

    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. To represent two points in general and to distinguish between the two points, subscripts are used.

    Consider finding the slope of the line between the points \((2,3)\) and \((7,6)\), as shown in this graph.

    On the graph, we count a rise of 3 (up 3) and a run of 5 (right 5) so \( m=\dfrac{\text{rise}}{\text{run}} = \dfrac{3}{5}\).

    Since we have two points, subscript notation is used to represent the two points so \( (2, 3) = (x_1,  y_1) \) and \( (7, 6) = (x_2,  y_2) \).

    The rise of 3 can be found by subtracting the second \(y\)-coordinate minus first \(y\)-coordinate:    \( \text{rise} = 3 = 6 - 3 = y_2-y_1\).

    The run of 5 can be found by subtracting the second \(x\)-coordinate minus first \(x\)-coordinate:     \( \text{run} =5 = 7 - 2 = x_2-x_1\).

    Thus, the slope \( m=\dfrac{\text{rise}}{\text{run}} = \dfrac{3}{5}\) can more generally be expressed with the formula \( m = \dfrac{y_2−y_1}{x_2−x_1}\).

    SLOPE OF A LINE BETWEEN TWO POINTS

    The slope of the line between two points \((x_1,y_1)\) and \((x_2,y_2)\) is:    

    \(m=\dfrac{\text{rise}}{\text{run}}=\dfrac{y_2−y_1}{x_2−x_1} =\dfrac{\text{change in } y \text{ values}}{\text{change in } x \text{ values}} =\dfrac{{\Delta}y}{{\Delta}x} \).

    Example \(\PageIndex{3}\)

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

    Solution
    Choose (−2,−3) to be point #1 and (−7,4) to be point #2. (The same result is obtained if the designations for point #1 and point #2 are reversed). \( \begin{pmatrix} x_1, & y_1 \\ -2 & -3 \end{pmatrix} \)      \( \begin{pmatrix} x_2, & y_2 \\ -7 & 4 \end{pmatrix} \) The graph verifies the result for the slope
    The figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 8 to 2. The y-axis runs from negative 6 to 6. The line goes through the points (negative 7, 4) and (negative 2, negative 3). A right triangle is drawn by connecting the three points (negative 7, 4), (negative 7, negative 3), and (negative 2, negative 3). The vertical side of the triangle is labeled “rise”. The horizontal side of the triangle is labeled “run”.
    Use the slope formula. \( m=\dfrac{y_2-y_1}{x_2-x_1} =\dfrac{4-(-3)}{-7-(-2)} =\dfrac{7}{-5} =-\dfrac{7}{5} \)
    Simplify \( m=\dfrac{7}{-5} \)      up \(7\), left \(5\)
    \( m=\dfrac{-7}{5} \)      down \(7\), right \(5\)
    try-it.png Try It \(\PageIndex{4}\)

    Use the slope formula to find the slope of the line through the pair of points:
        a.    \((−3,4)\) and \((2,−1)\).        b.    \((−2,6)\) and \((−3,−4)\).        c.    \((−3,4)\) and \((2,4)\).       d.    \((2,6)\) and \((2,−1)\).

    Answer

    a.    \( \frac{-5}{5} = -1\) or down 1 right 1 because the slope is \( -1=\frac{-1}{1}\). Alternatively, up 1 left 1 because \( -1=\frac{1}{-1}\) 
    b.    \( \frac{-10}{-1} = 10 \) or up 10 right 1 because the slope is \( 10=\frac{10}{1}\). Alternatively, down 10 left 1 because \( 10=\frac{-10}{-1}\)
    c.    \( \frac{0}{5} = 0 \) or a horizontal line
    d.    \( \frac{-7}{0} = \text{undefined} \) or a vertical line

    C. IDENTIFY slope and y-intercept from a linear equation  

    GENERAL FORM OF AN EQUATION OF A LINE

    The general form of an equation of a line is         \(\boxed{Ax+By=C}\).

    070 fig2.jpg - The figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 3 to 10. The y-axis runs from negative 1 to 10. The line goes through the points (0, 3), (2, 4), and (4, 5). A right triangle is drawn by connecting the three points (2, 4), (2, 5), and (4, 5). The vertical side of the triangle is labeled “Rise equals 1”. The horizontal side of the triangle is labeled “Run equals 2”. The line is labeled y equals 1 divided by 2 x plus 3.
    Figure \(2\): \(y=\dfrac{1}{2}x+3\)

    The general equation for a line is \( ax + by = c\). This equation can be rewritten in the form, \(y = mx + b \).  Consider the equation \(y=\dfrac{1}{2}x+3\) written in this form and its graph. 

    In this graph, the red lines show us the rise is 1 and the run is 2. Substituting into the slope formula \(m=\dfrac{\text{rise}}{\text{run}} \), the slope is \( m = {\color{red}{\dfrac{1}{2}}}  \).

    In this graph, the \(y\)-intercept is \( (0, {\color{Cerulean}{3}} ) \).

    Comparing these values to the line written in the form, \(y = {\color{red}{m}}x+{\color{Cerulean}{b}} \), we see that the slope is \( m = {\color{red}{\dfrac{1}{2}}}  \) and \(y\)-intercept is \( (0, {\color{Cerulean}{3}} ) \). 

    In conclusion, the equation written in the form \( y = mx + b \) is said to be in slope–intercept form. Written in this form, the coefficient of the x term is the slope and the constant term is the y-coordinate of the y-intercept

    SLOPE INTERCEPT FORM OF AN EQUATION OF A LINE

    The slope–intercept form of an equation of a line with slope \(m\) and \(y\)-intercept, \((0,b)\) is         \(\boxed{y=mx+b}\).

    Two special situations are the following.
         A horizontal line, \(\boxed{y=b}\), has a slope \(m= 0\) and a \(y\)-intercept at \( (0,b) \).
         A vertical line, \(\boxed{x=a}\), has an undefined slope and does not have a \(y\)-intercept.

    Example \(\PageIndex{5}\)

    Identify the slope and \(y\)-intercept of the line from the equation:       
        a.    \(y=−\frac{4}{7}x−2\)         b.    \(x+3y=9\)        c.     \(x=8\)             d.    \(y=−5\).

    Solution

    a. We compare our equation to the slope–intercept form of the equation.

    Compare the slope–intercept form of the equation of the line with \(y=mx+b\) \( y = {\color{red}{-\dfrac{4}{7}}}x  \color{Cerulean}{-2} \)
    \( y = {\color{red}{m}}x + \color{Cerulean}{b} \)
    Identify the slope and the \(y\)-intercept. slope is \( m = {\color{red}{-\dfrac{4}{7}}} \); \(y\)-intercept is \( (0, {\color{Cerulean}{-2}} ) \)

    b. When an equation of a line is not given in slope–intercept form, our first step will be to solve the equation for \(y\).

    Write the equation in slope-intercept form.
         Subtract \(x\) from each side.
         Divide both sides by 3.
         Simplify.
    \(x+3y=9\)
    \( 3y = -x + 9 \)
    \( \dfrac{3y}{3} = \dfrac{-x + 9}{3} \)
    \(y = -\dfrac{1}{3}x+3 \)
    Compare the slope–intercept form of the equation of the line with \(y=mx+b\). \( y = {\color{red}{-\dfrac{1}{3}}}x + \color{Cerulean}{3} \)
    \( y = {\color{red}{m}}x + \color{Cerulean}{b} \)
    Identify the slope and the \(y\)-intercept. slope, \( m = {\color{red}{-\dfrac{1}{3}}} \) or down 1, right 3;\(y\)y-intercept is \( (0, {\color{Cerulean}{3}} ) \)

    c. \(x=8\)    This is a vertical line. Its slope is undefined. It does not have a \(y\)-intercept.

    d. \(y=−5\)    This is a horizontal line which can also be written \(y = 0x - 5 \). It has slope 0. Its \(y\)-intercept is \( (0, -5) \).

    try-it.png Try It \(\PageIndex{6}\)

    Identify the slope and \(y\)-intercept from the equation of the line.
            a.   \(y=\frac{2}{5}x−1\)         b.     \(x+4y=8\)        c.    \(y=−\frac{4}{3} x+1\)         d.    \(3x+2y=12\)        e.    \(x=−4\)            f.    \(y=7\)

    Answer
    a.    \(m=\frac{2}{5}\) or up 2, right 5; \(y\)-intercept \((0,−1)\) b.    \(m=−\frac{1}{4}\) or down 1, right 4; \(y\)-intercept \((0,2)\)
    c.    \(m=−\frac{4}{3}\) or down 4 right 3; \(y\)-intercept \((0,1)\) d.    \(m=−\frac{3}{2}\)  or down 3 right 2; \(y\)-intercept \((0,6)\)
    e.     \(x=−4\) is a vertical line. Slope is undefined. There is no \(y\)-intercept.  f.     \(y=7\) is a horizontal line. Slope is 0. Its \(y\)-intercept is \( (0, 7) \). 

    Graph a line

    D. Graph a Line Given a Point and the Slope

    Up to now we have found the slope and \(y\)-intercept of a line from a graph and from a linear equation. 

    Now we will use these skills to graph a line after determining its slope and \(y\)-intercept. We will start by graphing a line with a stated point on the line and the slope of the line.

    Example \(\PageIndex{7}\): How to graph a Line Given a Point and the Slope

    Graph the line passing through the point \((1,−1)\) whose slope is \(m=\frac{3}{4}\).

    Solution
    Step 1. Plot the given point, \( (1, -1) \).    step 1 ex 10 section 3.4.jpg - Step 1 is to plot the given point. Plot (1, negative 1). The figure then shows the graph of a point on the x y-coordinate plane. The x-axis runs from negative 2 to 6. The y-axis runs from negative 2 to 4. The point (1, negative 1) is plotted and labeled with its coordinates.
    Step 2. Use the slope formula \( m=\dfrac{\text{rise}}{\text{run}} \) to identify the rise and the run. \( m = \dfrac{3}{4} = \dfrac{\text{rise}}{\text{run}} \\ \)
    rise = 3 and run = 4
    Step 3. Starting at the given point \( (1, -1) \), count out the rise (up \(3\)), and run (right \(4\)), to mark the second point. step 3 ex 10 section 3.4.jpg - Step 3 is to start at the given point and count out the rise and run to mark the second point. Start at (1, negative 1) and count the rise and the run. Up 3 units, right 4 units. The figure then shows the graph of three points connected by two straight line segments on the x y-coordinate plane. The x-axis runs from negative 2 to 6. The y-axis runs from negative 2 to 4. The points (1, negative 1), (1, 2), and (5, 2) are plotted. A vertical line segment connects (1, negative 1) to (1, 2) and is labeled 3. A horizontal line segment connects (1, 2) to (5, 2) and is labeled 4.
    Step 4. Connect the points with a line. step 4 ex 10 section 3.4.jpg - Step 4 is to connect the points with a line. Connect the two points with a line. . The figure then shows the graph of a straight line, three points, and two line segments on the x y-coordinate plane. The x-axis runs from negative 2 to 6. The y-axis runs from negative 2 to 4. The points (1, negative 1), (1, 2), and (5, 2) are plotted. A vertical line segment connects (1, negative 1) to (1, 2). A horizontal line segment connects (1, 2) to (5, 2) and is labeled 4. A straight line is drawn through the points (1, negative 1) and (5, 2) with arrows on both ends.

    You can check your work by finding a third point. Since the slope is \(m=\frac{3}{4}\), it can also be written as \(m=\frac{−3}{−4}\) (negative divided by negative is positive!). Go back to \((1,−1)\) and count out the rise, \(−3\) (down 3), and the run, \(−4\) (left 4).

    try-it.pngTry It \(\PageIndex{8}\)

    Graph the line described below.
        a.    passing through the point \((2,−2)\) with the slope \(m=\frac{4}{3}\).    
        b.    passing through the point \((−2,3)\) with the slope \(m=\frac{1}{4}\).

    Answer
    a.   This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 12 to 12. The y-axis runs from negative 12 to 12. The line goes through the points (2, negative 2) and (5, 2).    b.   
           OER 165 0.9.8b.png This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 12 to 12. The y-axis runs from negative 12 to 12. The line goes through the points (negative 2, 3) and (2, 4).
     

    E. Graph a Linear Equation Using its Slope and Intercept

    We have graphed a line when given the slope and a point. We also know how to find the slope and \(y\)-intercept of a line from its equation. Therefore, we can use the \(y\)-intercept as the point, and then count out the slope from there.

    how-to.png HOW TO GRAPH A LINE GIVEN A POINT AND THE SLOPE.

    1. Write the equation in slope-intercept form \( y=mx+b \), and identify the \(y\)-intercept \((0,b)\) and the slope \(m\).  
    • If the equation looks like \(x=a\), the graph is a vertical line with undefined slope that intersects the x-axis at \( ( a, 0) \) and has no \(y\)-intercept.
    1. Plot the \(y\)-intercept (on the \(y\)-axis). 
    2. Use the slope formula \(m=\dfrac{\text{rise}}{\text{run}}\) to identify the rise and the run. Starting at the given point, count out the rise and run to mark the second point. 
           If the rise is positive, go up; if the rise is negative, go down.
           If the run is positive, go right; if the run is negative, go left.
           Remember, \( m = \dfrac{m}{1} \), and also \( -\dfrac{u}{v}=\dfrac{-u}{v}= \dfrac{u}{-v}\), and \( \dfrac{u}{v}=\dfrac{-u}{-v}\) .
    3. Connect the points with a line.
    Example \(\PageIndex{9}\): How to Graph a Line Using its Slope and Intercept

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

    Solution

    Step 1. Find the slope–intercept form of the equation and identify the slope and \(y\)-intercept.  \(y=4x−2\)
    \( y = {\color{red}{m}}x + \color{Cerulean}{b} \)
    \( y = {\color{red}{4}}x  +\color{Cerulean}{(-2)} \)
    slope is  \( m = 4 \)
    \( b = -2 \), so the \(y\)-intercept is \( (0, -2) \)
    Step 2. Plot the \(y\)-intercept \( (0, -2) \). step 3 ex 10 section 0.7.jpg - Step 3 is to plot the y-intercept. An x y-coordinate plane is shown with the x-axis of the plane running from negative 8 to 8. The y-axis of the plane runs from negative 8 to 8. The point (0, negative 2) is plotted.

    Step 3. Use the slope formula \( \dfrac{\text{rise}}{\text{run}} \) to identify the rise over the run. 

    \( m=4= \dfrac{\text{rise}}{\text{run}}  = \dfrac{4}{1} \\ \) so rise = 4 (up 4), run = 1 (right 1)

    Starting from the \(y\)-intercept at \( (0, -2) \), count out the rise (up \(4\)) and run (right \(1\)) to mark the second point.  

    Alternatively, \( m  = \dfrac{-4}{-1} \\ \) so rise = -4 (down 4), run = -1 (left 1)

    rise = 4 (up 4), run = 1 (right 1)
    step 5 ex 10 section 0.7.jpg - Step 5 is to start at they-intercept, count out the rise and run to mark the second point. So start at the point (0, negative 2) and count the rise and the run. The rise is up 4 and the run is right 1. On the x y-coordinate plane is a red vertical line starts at the point (0, negative 2) and rises 4 units at its end a red horizontal line runs 1 unit to end at the point (1, 2). The point (1, 2)  is plotted.
    Step 4. Connect the points with a line. step 6 ex 10 section 0.7.jpg - Step 6 is to connect the points with a line. On the x y-coordinate plane the points (0, negative 2) and (1, 2) are plotted and a line runs through the two points. The line is the graph of y equals 4 x, minus 2.     
    Example \(\PageIndex{10}\)

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

    Solution
    Step 1. Find the slope–intercept form of the equation and identify the slope and \(y\)-intercept. \(y=−x+4\)
    slope is \(m=−1\)
    \(y\)-intercept is \((0,4)\)
    Step 2. Plot the \(y\)-intercept \((0,4)\).
    Step 3. Identify the rise over the run. Starting from the \(y\)-intercept at \((0,4) \), count out the rise (down \(1\)) and run (right \(1\)) to mark the second point.
    \(m=−1=\frac{−1}{1}\)
    rise \(-1\) or down 1, and run \(1\) or right 1
    Alternatively, \(m=−1=\frac{1}{-1}\)
    rise \(1\) or up 1, and run \(-1\) or left 1
    Step 4. Connect the points with a line.  . 
    Example \(\PageIndex{11}\)

    Graph the line of the equation \(y=−\frac{2}{3}x−3\) using its slope and \(y\)-intercept.

    Solution

    Step 1. The equation is in slope–intercept \(y=mx+b\) form. Identify the slope and \(y\)-intercept. \(y=−\frac{2}{3}x−3\)
    slope is \(m = -\frac{2}{3}\); \(y\)-intercept is \((0, −3)\)
    Step 2. Plot the \(y\)-intercept.  
    Step 3. Identify the rise and the run. Count out the rise and run to mark the second point.
    To fill in points to the left of the \(y\)-axis, use the equivalent slope, \( \frac{2}{-3} \) or rise = up 2, run = left 3.
    \(m = \frac{-2}{3}\), so rise = down 2, run = right 3 
    Alternatively, 
    \(m = \frac{2}{-3}\), so rise = up 2, run = left 3  
    Step 4. Connect the points with a line. Draw the line.
     
    .
    Example \(\PageIndex{12}\)

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

    Solution

    Step 1. Write the equation is in slope–intercept \(y=mx+b\) form. Identify the slope and \(y\)-intercept. \(4x−3y=12 \\ \)
    \(−3y=−4x+12 \\ \)
    \(−\frac{3y}{3}=\frac{−4x+12}{−3} \\ \)
    \(y=\frac{4}{3}x−4\)
    slope is \(m=\frac{4}{3}\)
    \(y\)-intercept is \((0, −4)\)
    Step 2. Plot the \(y\)-intercept.  
    Step 3. Identify the rise and the run. Count out the rise and run to mark the second point. rise = up 4, run = right 3 for slope \(m=\frac{4}{3}\).
    Alternatively, rise = down 4, run = left 3 for slope \(m=\frac{-4}{-3}\)
    Step 4. Connect the points with a line. Draw the line.
     
    .
    try-it.png Try It \(\PageIndex{14}\)

    Use slope and \(y\)-intercept to graph the following lines.
        a.    \(y=4x+1\)             b.    \(y=2x−3\)              c.    \(y=−x−3\)            d.    \(y=−x−1\)
        e.    \(y=−\frac{5}{2}x+1\)         f.    \(y=−\frac{3}{4}x−2\)           g.     \(2x−y=6\)            h.    \(3x−2y=8\)

    Answer
    a.
    OER 165 0.9.14a.png The figure shows a line graphed on the x y-coordinate plane. The x-axis of the plane runs from negative 10 to 10. The y-axis of the plane runs from negative 10 to 10. The points (0, 1) and (1, 5) are plotted on the line.
    b.
    OER 165 0.9.14b.png The figure shows a line graphed on the x y-coordinate plane. The x-axis of the plane runs from negative 10 to 10. The y-axis of the plane runs from negative 10 to 10. The points (0, negative 3) and (1, negative 1) are plotted on the line.
    c.
    This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 10 to 10. The y-axis runs from negative 10 to 10. The line goes through the points (0, negative 3) and (1, negative 4).
    d.
    This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 10 to 10. The y-axis runs from negative 10 to 10. The line goes through the points (0, negative 1) and (1, negative 2).
    e.
    OER 165 0.9.14e.png The figure shows a line graphed on the x y-coordinate plane. The x-axis of the plane runs from negative 6 to 6. The y-axis of the plane runs from negative 6 to 6. The points (0,1) and (2, negative 4) are plotted on the line.
    f.
    OER 165 0.9.14f.png The figure shows a line graphed on the x y-coordinate plane. The x-axis of the plane runs from negative 10 to 10. The y-axis of the plane runs from negative 6 to 6. The points (0, negative 2) and (4, negative 5) are plotted on the line.
    g.  \( y = 2x - 6 \)
    OER 165 0.9.14g.png The figure shows a line graphed on the x y-coordinate plane. The x-axis of the plane runs from negative 10 to 10. The y-axis of the plane runs from negative 10 to 10. The points (0, negative 6) and (1, negative 4) are plotted on the line.
    h.  \( y = \dfrac{3}{2}x - 4 \)
    OER 165 0.9.14h.png The figure shows a line graphed on the x y-coordinate plane. The x-axis of the plane runs from negative 10 to 10. The y-axis of the plane runs from negative 6 to 6. The points (0, negative 4) and (2, negative 1) are plotted on the line.
    Example \(\PageIndex{15}\)

    Graph the following lines:         a.    \(y=5\)        b.    \(4x−5y=20\)        c.    \(x=−3\)        d.    \(y=−\frac{5}{9}x+8\)

    Solution

    1. \(y=5\) This equation has only one variable, \(y\). It could be rewritten as \(y=0x+5\) which illustrates it has a slope of zero. Its graph is a horizontal line crossing the \(y\)-axis at \(5\).
    2. \(4x−5y=20\) This equation is of the form \(Ax+By=C\). Solve for \(y\) and write the equation in intercept form: \( -5y = -4x + 20\) so  \(y = \dfrac{4}{5}x - 4\). Slope is \( \dfrac{4}{5} \) and the \(y\)-intercept is \( (0, -4)\), so plot point \( (0, -4)\) and from there go up \(4\) units and right \(5\) units. Then plot another point. Etc. Then reverse direction and plot points to the left of the \(y\)-axis by starting at point \( (0, -4)\) and from there go down \(4\) units and left \(5\) units ( because \( \frac{4}{5} = \frac{-4}{-5}\)).
    3. \(x=−3\) There is only one variable, \(x\). The graph is a vertical line crossing the \(x\)-axis at \(−3\).
    4. \(y=−\frac{5}{9}x+8\) Since this equation is in \(y=mx+b\) form, the slope is \(−\frac{5}{9} \) and the \(y\)-intercept is \( (0,8) \). Plot point \( (0, 8)\) and from there go down \(5\) units and right \(9\) units. Then plot another point. Etc. Then reverse direction and plot points to the left of the \(y\)-axis by starting at point \( (0, 8)\) and from there go up \(5\) units and left \(9\) units ( because \( -\frac{5}{9} = \frac{-5}{9} = \frac{5}{-9}\)).
    19a.jpg 19b.jpg 19c.jpg 19d.jpg
    try-it.png Try It \(\PageIndex{16}\)
    Graph each line: a.    \(3x+2y=12\) b.     \(y=4\) c.     \(y=\frac{1}{5}x−4\) d.     \(x=−7\)
      e.     \(x=6\) f.     \(y=−\frac{3}{4}x+1\) g.     \(y=−8\) h.     \(4x−3y=−1\)
    Answer
    a.
    20a.jpg
    b.
    20b.jpg
    c.
    20c.jpg
    d.
    20d.jpg
    e.
    21a.jpg
    f.
    21b.jpg
    g.
    21c.jpg
    h.
    21d.jpg
    For (h) \( y = \dfrac{4}{3}x + \dfrac{1}{3} \) so the \(y\)-intercept of 1/3 is not a "nice" point to graph. In this case find a value of \(x\) that will make \(y\) be a nice whole number. When \( x=2  \) then \( y = \dfrac{8}{3}+ \dfrac{1}{3} = \dfrac{9}{3} = 3 \), so use the point \( (2, 3) \) to start with.

    Use Slopes to Identify Parallel and Perpendicular Lines

    This figure shows the graph of a two straight lines on the x y-coordinate plane. The x-axis runs from negative 8 to 8. The y-axis runs from negative 8 to 8. The first line goes through the points (0, 3) and (5, 5). The second line goes through the points (0, negative 2) and (5, 0). The lines are parallel meaning they will always be the same distance apart and never intersect. They are slanted by the same angle.
    Figure \(3\) Parallel Lines

    Parallel lines

    Two lines that have the same slope are called parallel lines.

    We say this more formally in terms of the rectangular coordinate system.

    Two lines that have the same slope and have different \(y\)-intercepts (i.e. never intersect) are parallel lines. Verify that both lines in Figure 3 to the right have the same slope, \(m=\frac{2}{5}\), and different y-intercepts.

    Two lines that have the same slope but also have the same \(y\)-intercept also could be said to be parallel since they don't intersect at just one point but rather share the same points everywhere along the line. Consequently, a line is parallel to itself.  

    This figure shows the graph of a two straight vertical line on the x y-coordinate plane. The x-axis runs from negative 8 to 8. The y-axis runs from negative 8 to 8. The first line goes through the points (2, 0) and (2, 1). The second line goes through the points (5, 0) and (5, 1). The lines are parallel meaning they will always be the same distance apart and never intersect.
    Figure \(4\) Vertical Lines

     

    What about vertical lines? The slope of a vertical line is undefined, so vertical lines don’t quite fit in the definition above. We say that vertical lines that have different \(x\)-intercepts are parallel, like the lines shown in Figure 4 on the right.

    Vertical lines that have the same equation (and thus the same x-intercept) are also parallel because it can be said that a line is parallel to itself.

    PARALLEL LINES

    Parallel lines are lines in the same plane that have the same slope. 

    • If \(m_1\) and \(m_2\) are the slopes of two parallel lines then \(m_1=m_2\).

    Parallel lines that have the same slope and different \(y\)-intercepts do not intersect.

    Parallel vertical lines that have different \(x\)-intercepts do not intersect.

    Lines that have the same equation represent the same line and could also be said to be parallel since a line is parallel to itself.

    We can now just look at the slope–intercept form of the equations of lines and decide if the lines are parallel.

    Example \(\PageIndex{17}\)

    Use slopes and \(y\)-intercepts to determine if the lines are parallel:

    a.    \(3x−2y=6\) and \( \qquad y=\frac{3}{2}x+1\) b.     \(y=2x−3\) and \( \qquad −6x+3y=−9\) c.    \(y=−4\) and \(y=3\) d.    \(x=−2\) and \(x=−5\)
    Solution

    a.    

    Solve both equations for \(y\) and write in slope-intercept form \( y=mx+b \). \( 3x−2y=6 \)   
    \( −2y=−3x+6 \)
    \( \frac{-2y}{-2}=\frac{-3x+6}{-2} \)
    \( y=\frac{3}{2}x−3 \)
    \( y=\frac{3}{2}x+1 \)
    Identify the slope ( \(m\) ) and \(y\)-intercept of both lines.  \( m=\frac{3}{2} \)  
    \(y\)-intercept is \( ( 0, −3 ) \) 
    \( m=\frac{3}{2} \)
    \(y\)-intercept is \( ( 0, 1 ) \)

    The lines have the same slope and different \(y\)-intercepts and so they are parallel.

    b.

    Solve both equations for \(y\) and write in slope-intercept form \( y=mx+b \). \( y=2x−3 \)   
      
    \( −6x+3y=−9 \)
    \( 3y=6x−9 \)
    \( \frac{3y}{3}=\frac{6x−9}{3} \)
    \( y=2x−3 \)
    Identify the slope ( \(m\) ) and y\(y\)-intercept of both lines.  \( m=2 \)  
    \(y\)-intercept is \( ( 0, −3 ) \) 
    \( m=2 \)
    \(y\)-intercept is \( ( 0, -3 ) \)

    The lines have the same slope, but they also have the same \(y\)-intercepts. Their equations represent the same line so we say the lines are coincident. Since a line is parallel to itself, coincident lines are parallel lines.

    c.    \(y=−4\) and \(y=3\)

    We recognize right away from the equations that these are horizontal lines, and so we know their slopes are both 0.
    Since the horizontal lines cross the \(y\)-axis at \( y=−4 \) and at \( y=3 \), we know the \(y\)-intercepts are \( (0,−4) \) and \( (0,3) \).
    The lines have the same slope and different \(y\)-intercepts and so they are parallel.

    d.    \(x=−2\) and \(x=−5\)

    We recognize right away from the equations that these are vertical lines, and so we know their slopes are undefined.
    Since the vertical lines cross the \(x\)-axis at \(x=−2\) and \(x=−5\), we know the \(x\)-intercepts are \((−2,0)\) and \((−5,0)\).
    The lines are vertical and have different \(x\)-intercepts and so they are parallel.

    try-it.png Try It \(\PageIndex{18}\)

    Use slopes and \(y\)-intercepts to determine if the lines are parallel:

    a.    \(2x+5y=5\) and \( \qquad y=−\frac{2}{5}x−4\) b.    \(y=−\frac{1}{2}x−1\) and \( \qquad x+2y=−2\) c.     \(4x−3y=6\) and \(\quad \qquad y= \frac{4}{3}x−1\) d.     \(y=\frac{3}{4}x−3\) and \( \qquad 3x−4y=12\)
    e.    \(y=8\) and \(y=−6\) f.     \(x=1\) and \(x=−5\) g.     \(y=1\) and \(y=−5\) h.     \(x=8\) and \(x=−6\)
    Answer

    a.    parallel         b. the same line (parallel)        c.    parallel         d. the same line (parallel)
    e.    parallel horizontal lines        f.     parallel vertical lines         g.    parallel horizontal lines        h.     parallel vertical lines

    This figure shows the graph of a two perpendicular straight lines on the x y-coordinate plane. The x-axis runs from negative 8 to 8. The y-axis runs from negative 8 to 8. The first line goes through the points (0, negative 1) and (4, 0). The first line is labeled y equals 1 divided by 4 x minus 1. The second line goes through the points (0, 2) and (1, negative 2). The second line is labeled y equals negative 4 x plus 2. The lines are perpendicular meaning they form a right angle where they intersect.
    Figure \(5\). Perpendicular Lines

    Perpendicular Lines

    Let’s look at the lines whose equations are \(y=\frac{1}{4}x−1\) and \(y=−4x+2\), shown in Figure 5 on the right.

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

    If we look at the slope of the first line, \(m_1=\frac{1}{4}\), and the slope of the second line, \(m_2=−4\), we can see that they are negative reciprocals of each other. If we multiply these two slopes together, their product is \(−1\) because \( m_1·m_2 = \dfrac{1}{4} \cdot (−4) = −1 \).

    This is always true for perpendicular lines and leads us to this definition.

    PERPENDICULAR LINES
    Perpendicular lines are lines in the same plane that form a right angle.
    • If \(m_1\) and \(m_2\) are the slopes of two perpendicular lines, then:
      • their slopes are negative reciprocals of each other, \(m_1=−\frac{1}{m_2}\).
      • the product of their slopes is \(−1\),        \(m_1·m_2=−1\).
    • A vertical line and a horizontal line are always perpendicular to each other

    We were able to look at the slope–intercept form of linear equations and determine whether or not the lines were parallel. We can do the same thing for perpendicular lines.

    We find the slope–intercept form of the equation, and then see if the slopes are opposite reciprocals. If the product of the slopes is \(−1\), the lines are perpendicular.

    Example \(\PageIndex{19}\)

    Use slopes to determine if the lines are perpendicular:

    a.     \(y=−5x−4\) and \(x−5y=5\)         b.     \(7x+2y=3\) and \(2x+7y=5\)

    Solution
    a. \( y=−5x−4 \) \( x−5y=5 \)
    Solve both equations for \(y\) and write in slope-intercept form \( y=mx+b \).      \( −5y=−x+5 \)
    \( \dfrac{-5y}{-5}=\dfrac{-x+5}{-5} \)
    \( y=\dfrac{1}{5}x−1 \)
    Identify the slope (\(m\)) of both lines.  \( m_1=-5 \)   \(m_2=\dfrac{1}{5} \)

    The slopes are negative reciprocals of each other, so the lines are perpendicular. We check by multiplying the slopes, Since \(−5(\dfrac{1}{5})=−1 \), it checks.

    b. \(7x+2y=3\) \(2x+7y=5\)
    Solve both equations for \(y\) and write in slope-intercept form \( y=mx+b \). \( 2y=−7x+3 \)
    \( \dfrac{2y}{2}=\dfrac{-7x+3}{2} \)
    \( y=-\dfrac{7}{2}x+\dfrac{3}{2} \)
    \( 7y=−2x+5 \)
    \( \dfrac{7y}{7}=\dfrac{-2x+5}{7} \)
    \( y=-\dfrac{2}{7}x+\dfrac{5}{7} \)     
    Identify the slope (\(m\)) of both lines.  \( m_1=-\dfrac{7}{2} \)   \(m_2=-\dfrac{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.

    try-it.pngTry It \(\PageIndex{20}\)

    Use slopes to determine if the lines are perpendicular:

    a.    \(y=−3x+2\) and \( \qquad x−3y=4\) b.    \(5x+4y=1\) and \( \qquad 4x+5y=3\) c.     \(y=2x−5\) and \( \qquad x+2y=−6\) d.     \(2x−9y=3\) and \( \qquad 9x−2y=1\)
    Answer
    a.     perpendicular         b.     not perpendicular        c.     perpendicular         d.     not perpendicular

    0.09: Review - Graphs of Linear Equations is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?