Skip to main content
Mathematics LibreTexts

11.4: Graphing Linear Equations (Part 2)

  • Page ID
    7288
  • \( \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}\)

    Graph Vertical and Horizontal Lines

    Can we graph an equation with only one variable? Just x and no y, or just y without an x? How will we make a table of values to get the points to plot?

    Let’s consider the equation x = −3. The equation says that x is always equal to −3, so its value does not depend on y. No matter what y is, the value of x is always −3.

    To make a table of solutions, we write −3 for all the x values. Then choose any values for y. Since x does not depend on y, you can chose any numbers you like. But to fit the size of our coordinate graph, we’ll use 1, 2, and 3 for the y-coordinates as shown in the table.

    x = -3
    x y (x, y)
    -3 1 (-3, 1)
    -3 2 (-3, 2)
    -3 3 (-3, 3)

    Then plot the points and connect them with a straight line. Notice in Figure \(\PageIndex{5}\) that the graph is a vertical line.

    The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A vertical line passes through three labeled points, “ordered pair -3, 3”, “ordered pair -3, 2”, and ordered pair -3, 1”. The line is labeled x = -3.

    Figure \(\PageIndex{5}\)

    Definition: Vertical line

    A vertical line is the graph of an equation that can be written in the form x = a. The line passes through the x -axis at (a, 0).

    Example \(\PageIndex{6}\):

    Graph the equation x = 2. What type of line does it form?

    Solution

    The equation has only variable, x, and x is always equal to 2. We make a table where x is always 2 and we put in any values for y.

    x = -3
    x y (x, y)
    2 1 (2, 1)
    2 2 (2, 2)
    2 3 (2, 3)

    Plot the points and connect them as shown.

    The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A vertical line passes through three labeled points, “ordered pair 2, 3”, “ordered pair 2, 2”, and ordered pair 2, 1”. The line is labeled x = 2.

    The graph is a vertical line passing through the x -axis at 2.

    Exercise \(\PageIndex{10}\):

    Graph the equation: x = 5.

    Answer

    The graph shows the x y-coordinate plane. The x and y-axis each run from -12 to 12. A vertical line passes through the points “ordered pair 5,  0” and “ordered pair 5, 1”.

    Exercise \(\PageIndex{11}\):

    Graph the equation: x = −2.

    Answer

    The graph shows the x y-coordinate plane. The x and y-axis each run from -12 to 12. A vertical line passes through the points “ordered pair -2, 0” and “ordered pair -2, 1”.

    What if the equation has y but no x ? Let’s graph the equation y = 4. This time the y -value is a constant, so in this equation y does not depend on x.

    To make a table of solutions, write 4 for all the y values and then choose any values for x.

    We’ll use 0, 2, and 4 for the x -values.

    x = -3
    x y (x, y)
    0 4 (0, 4)
    2 4 (2, 4)
    4 4 (4, 4)

    Plot the points and connect them, as shown in Figure \(\PageIndex{6}\). This graph is a horizontal line passing through the y-axis at 4.

    The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A horizontal  line passes through three labeled points, “ordered pair 0, 4”, “ordered pair 2, 4”, and ordered pair 4, 4”. The line is labeled y = 4.

    Figure \(\PageIndex{6}\)

    Definition: Horizontal Line

    A horizontal line is the graph of an equation that can be written in the form y = b. The line passes through the y-axis at (0, b).

    Example \(\PageIndex{7}\):

    Graph the equation y = −1.

    Solution

    The equation y = −1 has only variable, y. The value of y is constant. All the ordered pairs in the table have the same y -coordinate, −1 . We choose 0, 3, and −3 as values for x.

    x = -3
    x y (x, y)
    -3 -1 (-3, -1)
    0 -1 (0, -1)
    3 -1 (3, -1)

    The graph is a horizontal line passing through the y -axis at –1 as shown.

    The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A horizontal  line passes through three labeled points, “ordered pair -3, -1”, “ordered pair 0, -1”, and ordered pair 3, -1”. The line is labeled y = -1.

    Exercise \(\PageIndex{12}\):

    Graph the equation: y = −4.

    Answer

    The graph shows the x y-coordinate plane. The x and y-axis each run from -12 to 12. A horizontal  line passes through the points “ordered pair 0,  -4” and “ordered pair 1, -4”.

    Exercise \(\PageIndex{13}\):

    Graph the equation: y = 3.

    Answer

    The graph shows the x y-coordinate plane. The x and y-axis each run from -12 to 12. A horizontal  line passes through the points “ordered pair 0,  3” and “ordered pair 1, 3”.

    The equations for vertical and horizontal lines look very similar to equations like y = 4x. What is the difference between the equations y = 4x and y = 4?

    The equation y = 4x has both x and y. The value of y depends on the value of x. The y-coordinate changes according to the value of x.

    The equation y = 4 has only one variable. The value of y is constant. The y-coordinate is always 4. It does not depend on the value of x.

    y = 4x
    x y (x, y)
    0 0 (0, 0)
    1 4 (1, 4)
    2 8 (2, 8)
    \(\textcolor{red}{y = 4}\)
    x y (x, y)
    0 4 (0, 4)
    1 4 (1, 4)
    2 4 (2, 4)

    The graph shows both equations.

    The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A horizontal line passes through “ordered pair 0, 4” and “ordered pair 1, 4” and is labeled y = 4. A second line passes through “ordered pair 0, 0” and “ordered pair 1, 4” and is labeled y = 4 x. The two lines intersect at “ordered pair 1, 4”.

    Notice that the equation y = 4x gives a slanted line whereas y = 4 gives a horizontal line.

    Example \(\PageIndex{8}\):

    Graph y = −3x and y = −3 in the same rectangular coordinate system.

    Solution

    Find three solutions for each equation. Notice that the first equation has the variable x, while the second does not. Solutions for both equations are listed.

    \(\textcolor{red}{y = -3x}\)
    x y (x, y)
    0 0 (0, 0)
    1 -3 (1, -3)
    2 -6 (2, -6)
    y = -3
    x y (x, y)
    0 -3 (0, -3)
    1 -3 (1, -3)
    2 -3 (2, -3)

    The graph shows both equations.

    The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A horizontal line passes through “ordered pair 0, -3” and “ordered pair 1, -3” and is labeled y = -3. A second line passes through “ordered pair 0, 0” and “ordered pair 1, -3” and is labeled y = -3 x. The two lines intersect at “ordered pair 1, -3”.

    Exercise \(\PageIndex{14}\):

    Graph the equations in the same rectangular coordinate system: y = −4x and y = −4.

    Answer

    The graph shows the x y-coordinate plane. The x and y-axis each run from -12 to 12. A horizontal line passes through “ordered pair 0, -4” and “ordered pair 1, -4” . A second line passes through “ordered pair 0, 0” and “ordered pair 1, -4” . The two lines intersect at “ordered pair 1, -4”.

    Exercise \(\PageIndex{15}\):

    Graph the equations in the same rectangular coordinate system: y = 3 and y = 3x.

    Answer

    The graph shows the x y-coordinate plane. The x and y-axis each run from -12 to 12. A horizontal line passes through “ordered pair 0, 3” and “ordered pair 1, 3” . A second line passes through “ordered pair 0, 0” and “ordered pair 1, 3” . The two lines intersect at “ordered pair 1, 3”.

    ACCESS ADDITIONAL ONLINE RESOURCES

    Use a Table of Values

    Graph a Linear Equation Involving Fractions

    Graph Horizontal and Vertical Lines

    Practice Makes Perfect

    Recognize the Relation Between the Solutions of an Equation and its Graph

    For each ordered pair, decide (a) is the ordered pair a solution to the equation? (b) is the point on the line?

    1. y = x + 2
      1. (0, 2)
      2. (1, 2)
      3. (− 1, 1)
      4. (− 3, 1)
    2. y = x − 4
      1. (0, − 4)
      2. (3, − 1)
      3. (2, 2)
      4. (1, − 5)
    3. y = \(\dfrac{1}{2}\)x − 3
      1. (0, − 3)
      2. (2, − 2)
      3. (− 2, − 4)
      4. (4, 1)
    4. y = \(\dfrac{1}{3}\)x + 2
      1. (0, 2)
      2. (3, 3)
      3. (− 3, 2)
      4. (− 6, 0)

    Graph a Linear Equation by Plotting Points

    In the following exercises, graph by plotting points.

    1. y = 3x − 1
    2. y = 2x + 3
    3. y = −2x + 2
    4. y = −3x + 1
    5. y = x + 2
    6. y = x − 3
    7. y = − x − 3
    8. y = − x − 2
    9. y = 2x
    10. y = 3x
    11. y = −4x
    12. y = −2x
    13. y = \(\dfrac{1}{2}\)x + 2
    14. y = \(\dfrac{1}{3}\)x − 1
    15. y = \(\dfrac{4}{3}\)x − 5
    16. y = \(\dfrac{3}{2}\)x − 3
    17. y = \(− \dfrac{2}{5}\)x + 1
    18. y = \(− \dfrac{4}{5}\)x − 1
    19. y = \(− \dfrac{3}{2}\)x + 2
    20. y = \(− \dfrac{5}{3}\)x + 4
    21. x + y = 6
    22. x + y = 4
    23. x + y = −3
    24. x + y = −2
    25. x − y = 2
    26. x − y = 1
    27. x − y = −1
    28. x − y = −3
    29. −x + y = 4
    30. −x + y = 3
    31. −x − y = 5
    32. −x − y = 1
    33. 3x + y = 7
    34. 5x + y = 6
    35. 2x + y = −3
    36. 4x + y = −5
    37. 2x + 3y = 12
    38. 3x − 4y = 12
    39. \(\dfrac{1}{3}\)x + y = 2
    40. \(\dfrac{1}{2}\)x + y = 3

    Graph Vertical and Horizontal lines

    In the following exercises, graph the vertical and horizontal lines.

    1. x = 4
    2. x = 3
    3. x = −2
    4. x = −5
    5. y = 3
    6. y = 1
    7. y = −5
    8. y = −2
    9. x = \(\dfrac{7}{3}\)
    10. x = \(\dfrac{5}{4}\)

    In the following exercises, graph each pair of equations in the same rectangular coordinate system.

    1. y = \(− \dfrac{1}{2}\)x and y = \(− \dfrac{1}{2}\)
    2. y = \(− \dfrac{1}{3}\)x and y = \(− \dfrac{1}{3}\)
    3. y = 2x and y = 2
    4. y = 5x and y = 5

    Mixed Practice

    In the following exercises, graph each equation.

    1. y = 4x
    2. y = 2x
    3. y = \(− \dfrac{1}{2}\)x + 3
    4. y = \(\dfrac{1}{4}\)x − 2
    5. y = − x
    6. y = x
    7. x − y = 3
    8. x + y = − 5
    9. 4x + y = 2
    10. 2x + y = 6
    11. y = −1
    12. y = 5
    13. 2x + 6y = 12
    14. 5x + 2y = 10
    15. x = 3
    16. x = −4

    Everyday Math

    1. Motor home cost The Robinsons rented a motor home for one week to go on vacation. It cost them $594 plus $0.32 per mile to rent the motor home, so the linear equation y = 594 + 0.32x gives the cost, y, for driving x miles. Calculate the rental cost for driving 400, 800, and 1,200 miles, and then graph the line.
    2. Weekly earning At the art gallery where he works, Salvador gets paid $200 per week plus 15% of the sales he makes, so the equation y = 200 + 0.15x gives the amount y he earns for selling x dollars of artwork. Calculate the amount Salvador earns for selling $900, $1,600, and $2,000, and then graph the line.

    Writing Exercises

    1. Explain how you would choose three x-values to make a table to graph the line y = \(\dfrac{1}{5}\)x − 2.
    2. What is the difference between the equations of a vertical and a horizontal line?

    Self Check

    (a) After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section.

    CNX_BMath_Figure_AppB_067.jpg

    (b) After reviewing this checklist, what will you do to become confident for all objectives?

    Contributors and Attributions


    This page titled 11.4: Graphing Linear Equations (Part 2) is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax.

    • Was this article helpful?