Skip to main content
Mathematics LibreTexts

7.4: Equations of Vertical and Horizontal Lines

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

    Definition: Vertical Line

    The equation of a vertical line is of the form \(x = c\), where \(c\) is any real number. The vertical line will always intersect the \(x\)−axis at the point \((c, 0)\). The slope of a vertical line is undefined.

    Example 7.4.1

    Find the slope of the line \(x = 4\) and graph the line.

    Solution

    \(x = 4\) is the graph of a vertical line as shown in the figure below.

    clipboard_e96383c84992a62541d09b7ee1e53697f.png

    To find the slope of line \(x = 4\) choose any two distinct points on the line. Let the points be \((4, −1)\) and \((4, 3)\). Using the slope of a line formula,

    \(\begin{array} &&m = \dfrac{y_2 − y_1}{x_2 − x_1} &\text{The slope of a line formula} \\ &= \dfrac{3 − (−1)}{4 − 4} &\text{Substitute values} \\ &= \dfrac{4}{0} &\text{Simplify} \end{array}\)

    Now, if \(4\) is divided by \(0\), this is equivalent to asking the question, ”what number times zero gives \(4\)?” the answer is, there is no such number. Division by zero is undefined, and the slope of the vertical line \(x = 4\) is undefined.

    Definition: Horizontal Line

    The equation of a horizontal line is of the form \(y = k\), where \(k\) is any real number. The horizontal line will always intersect the \(y\)−axis at the point \((0, k)\). The slope of a horizontal line is Zero.

    Example 7.4.2

    Find the slope of the line that passes through the points \((−3, −2)\) and \((4, −2)\). Plot the points and graph the line that passes through them.

    Solution

    Use the slope of the line formula. Thus,

    \(\begin{array} &&m = \dfrac{y_2 − y_1}{x_2 − x_1} &\text{The slope of a line formula} \\ &= \dfrac{(−2) − (−2)}{4 − (−3)} &\text{Substitute values} \\ &= \dfrac{0}{7} &\text{Simplify} \\ &= 0 &\text{\(0\) divided by any nonzero number is equal to zero} \end{array}\)

    Therefore, the line that passes through the two given points is a horizontal line, with slope equal zero, as shown in the figure below.

    clipboard_e08cf4386944def611c6831ac921a6f6d.png

    Example 7.4.3

    Graph the line \(y − 3 = 0\) and find its slope.

    Solution

    The line \(y − 3 = 0\) can be written as \(y = 3\) (add \(3\) to both sides of the equation). The line \(y = 3\) is a horizontal line, as shown in the figure below.

    clipboard_ef5d1c3aa2712f38f53b81ce34e7a1ee0.png

    Now, to find the slope, choose any two distinct points on the line \(y = 3\). Consider points \((0, 3)\) and \((3, 3)\). Thus,

    \(\begin{array} &&m = \dfrac{y_2 − y_1}{x_2 − x_1} &\text{The slope of a line formula} \\ &= \dfrac{3-3}{3-0} &\text{Substitute values} \\ &= \dfrac{0}{2} &\text{Simplify} \\ &= 0 &\text{\(0\) divided by any nonzero number is equal to zero} \end{array}\)

    Therefore, the slope of the given line is \(m = 0.\)

    Exercise 7.4.1

    Find the slope of each line.

    1. \(x = −\dfrac{1}{2}\)
    2. \(y − 1 = 0\)
    3. \(x + 7 = 10\)
    4. \(y + 2 = −9\)
    5. Find the slope of the line that passes through the points \((−4, 1)\) and \((2, 1)\). Plot the points and graph the line that passes through them.
    6. Find the slope of the line that passes through the points \((−3, 5)\) and \((−3, −7)\). Plot the points and graph the line that passes through them.