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.10: Review - Find the Equation of a Line

  • Page ID
    158244
  • \( \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

    By the end of this section, you will be able to:

    • Find an equation of the line given the graph of a line
    • Find an equation of the line given the slope and y-intercept
    • Find an equation of the line given the slope and a point
    • Find an equation of the line given two points
    • Find an equation of a line parallel to a given line
    • Find an equation of a line perpendicular to a given line

    Before you get started, take this readiness quiz.

    1. Simplify: \(\frac{2}{5}(x+15)\).
    2. Simplify: \(−3(x−(−2))\).
    3. Solve for \(y\):  \(y−3=−2(x+1)\).
    EQUATIONS OF A LINE

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

    The slope-intercept form of an equation of a line with slope \(m\) and \(y\)-intercept \(b\) is \(\boxed{y=mx+b}\). Any line except a vertical line can be written in slope-intercept form.

    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. It has an \(x\)-intercept at \((a,0)\).

    We can easily determine the slope and intercept of a line if the equation is written in slope-intercept form, \(y=mx+b\). Now we will do the reverse—we will start with the slope and y-intercept and use them to find the equation of the line.

    Find an Equation of a Line Given a Graph

    Sometimes, the slope and intercept need to be determined from the graph.

    Example \(\PageIndex{1}\) Equation of a line given a graph

    Find the equation of the line shown in the graph.

    a.This figure has a graph of a straight line on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (negative 3, negative 6), (0, negative 4), (3, negative 2), and (6, 0). b.071 y=-4.jpg this is a graph of a horizontal line intersecting the y axis at (0,negative 4) c. 071 x=3.jpg this is a gaph of a vertical line intersecting the x-axis at (0,3)
    a. Solution

    We need to find the slope and y-intercept of the line from the graph so we can substitute the needed values into the slope-intercept form, \(y=mx+b\).

    To find the slope, we choose two points on the graph.

    The y-intercept is \((0,−4)\) and the graph passes through \((3,−2)\).

    Step 1. Find the slope, by counting the rise and run. \( m=\dfrac{\text{rise}}{\text{run}}= {\color{red}{\dfrac{2}{3}}} \)
    Step 2. Find the y-intercept. y-intercept is \( (0, {\color{Cerulean}{-4}} ) \)
    Step 3. Substitute the values into \(y=mx+b\). \( y = {\color{red}{m}}x + \color{Cerulean}{b} \)
    \( y = {\color{red}{\dfrac{2}{3}}}x  \color{Cerulean}{-4} \)

    b. Solution

    The graph is a horizontal line, we know the form of the equation for the line is \(y=b\). The \(y\) intercept is \((0,-4)\) so the equation is \(y=-4\).

    The slope of this line is zero because the \(y\) coordinates of all the points on the line are the same value of \(-4\).  Thus the rise, which is the numerator of the slope equation, is zero. The \(y\)-intercept is \((0,-4)\) so substitution in the equation  \(y=mx+b\) produces \(y = 0x+(-4)\) or \(y=-4\). 

    c. Solution

    The graph is a vertical line, so we know the form of the equation for the line is \(x=a\). The \(x\) intercept is \((3,0)\) so the equation is \(x=3\). 

    The slope of this line is undefined because the \(x\) coordinates of all the points on the line are the same value of \(3\). Thus the run, which is the denominator of the slope equation, is zero, and division by zero is undefined, and thus the slope-intercept form of an equation for a line cannot be used.

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

    Find the equation of the following lines. 

    a.
    This figure has a graph of a straight line on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (negative 5, negative 2), (0, 1), and (5, 4).
    b.
    This figure has a graph of a straight line on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (0, negative 5), (3, negative 1), and (6, 3).
    c. 071 x=-1.jpg d.071 y=3.jpg
    Answer

    a.    \(y=\frac{3}{5}x+1\)        b.    \(y=\frac{4}{3}x−5\)        c.    \(x=-1\)        d.    \(y=3\)

    Find an Equation of the Line Given the Slope and y-Intercept

    Sometimes we are told what the slope and y-intercept are.

    Example \(\PageIndex{3}\) Equation of a line given the slope and y-intercept

    Find the equation of a line with slope \(−9\) and y-intercept \((0,−4)\).

    Solution

    Since we are given the slope and y-intercept of the line, we can substitute the needed values into the slope-intercept form, \(y=mx+b\).

    Step 1. State the slope. \( m = {\color{red}{-9}} \)
    Step 2. State the y-intercept. y-intercept is \( (0, {\color{Cerulean}{-4}} ) \) 
    Step 3. Substitute the values into \(y=mx+b\). Simplify. \( y = {\color{red}{m}}x + \color{Cerulean}{b} \) 
    \( y = {\color{red}{-9}}x + \color{Cerulean}{(-4)} \)
    \( y=-9x-4\)
    try-it.pngTry It \(\PageIndex{4}\)

    Find the equation of a line with the following attributes. 
           a.    slope \(\dfrac{2}{5}\), y-intercept \((0,4)\)        b.    slope \(−1\), y-intercept \((0,−3)\)

    Answer

      a.    \(y=\frac{2}{5}x+4\)        b.    \(y=−x−3\)

    Find an Equation of the Line Given the Slope and a Point

    Finding an equation of a line using the slope-intercept form of the equation works well when you are given the slope and y-intercept or when you read them off a graph. When given a point on the line instead of the y-intercept a slightly different approach must be used to obtain the equation of the line.

    One approach directly uses the familiar slope-intercept form of an equation for a line \( y=mx+b \). First substitute the values of the given slope \(m\), and coordinates \(x\) and \(y\) of the given point into the formula \( y = mx + b \). Solve for the value for \(b\). Then rewrite the slope-intercept formula for a line with the now known values for \(m\) and \(b\).

    Alternatively, a different form of an equation for a line, called the point-slope form, can be used. The derivation of this equation begins by supposing we have a line that has slope \(m\) and that contains some specific point \((x_1,y_1)\) and some other point, which we will just call \((x,y)\). The slope of this line is \(m= \dfrac{y-y_1}{x-x_1}\). Multiplying both sides of this equation by \((x−x_1)\) produces \( m(x-x_1)=y-y_1 \), which is the point-slope form of an equation for a line.

    POINT-SLOPE FORM OF AN EQUATION OF A LINE

    The point-slope form of an equation of a line with slope m and containing the point \((x_1,y_1)\) is:    \( \boxed{y−y_1=m(x−x_1) } \)

    how-to.png How to: Find an equation of a line given the slope and a point.

    Point-Slope Method

    1. Identify the slope, \(m\).
    2. Identify the point, \( (x_1, y_1)\).
    3. Substitute values of \(m\), \(x_1\), and \(y_1\) into the point-slope form, \(y−y_1=m(x−x_1)\).
    4. Solve for \(y\). Write in slope-intercept form, \(y=mx+b\). 

    Slope-Intercept Method

    1. Identify the slope, \(m\).
    2. Identify the point, \( (x, y)\).
    3. Substitute values of \(m\), \(x\), and \(y\) into the slope-intercept form \(y=mx+b\).
    4. Solve for \(b\).  Substitute values of \(m\) and \(b\) into the slope-intercept form \(y=mx+b\). 
    Example \(\PageIndex{5}\) Equation of a line given the slope and a point

    Find an equation of a line given the following slope and point on the line.

    a. slope \(m=−\frac{1}{3}\), point \((6,−4)\) b. slope \(m=0\), point \((-2,-6)\) c. Undefined slope, point \((1,5)\)
    a. Solution
      Point-Slope Method Slope-Intercept Method
    Step 1. Identify the slope. \( \color{Cerulean}{m=-\dfrac{1}{3}} \)   \( \color{Cerulean}{m=-\dfrac{1}{3}} \)
    Step 2. Identify the point. \( \begin{pmatrix} \color{red}{x_1}, & \color{red}{y_1} \\ \color{red}{6} & \color{red}{-4} \end{pmatrix} \)    \( \begin{pmatrix} \color{red}{x}, & \color{red}{y} \\ \color{red}{6} & \color{red}{-4} \end{pmatrix} \)
    Step 3. Substitute.    \( y−{\color{red}{y_1}}={\color{Cerulean}{m}}(x−{\color{red}{x_1}}) \)
    \( y−{\color{red}{(-4)}}={\color{Cerulean}{-\dfrac{1}{3}}}(x−{\color{red}{6}}) \)
    \( {\color{red}{y}}={\color{Cerulean}{m}}{\color{red}{x}} + b \) .
    \( {\color{red}{-4}}={\color{Cerulean}{-\dfrac{1}{3}}}({\color{red}{6}}) + b \)
    Step 4. Solve and write the equation in slope-intercept form. \(y + 4 = -\dfrac{1}{3}x+2 \)
    \(y = -\dfrac{1}{3}x-2 \) 
    \( -4=-2 + b \)
    \( b = -2 \)
    \(y = -\dfrac{1}{3}x-2 \)

    b. Solution

    A line with zero slope is a horizontal line, so all the points on the line have the same \(y\) coordinate. Since \((-2,-6)\) is a point on the line, all \(y\)-coordinates are \(-6\), so the equation is \(y=-6\).

    Alternatively, the Point-Slope method could be used to find the equation:

    Step 1. Identify the slope. Every horizontal line has slope 0. \( \color{Cerulean}{m=0} \)
    Step 2. Identify the point. \( \begin{pmatrix} \color{red}{x_1}, & \color{red}{y_1} \\ \color{red}{-2} & \color{red}{-6} \end{pmatrix} \)  
    Step 3. Substitute the values into the point-slope form. \( y−{\color{red}{y_1}}={\color{Cerulean}{m}}(x−{\color{red}{x_1}}) \)  
    \( y−{\color{red}{(-6)}}={\color{Cerulean}{0}}(x−{\color{red}{-2}}) \)  
    Step 4. Simplify. Write in slope-intercept form.
    Notice the result is in the form of a horizontal line, \(y=a\)
    \(y +  6 = 0 \)
    \(y=−6\)

    Finally, if the Slope-Intercept Method were used instead, substitution in Step 3 yields \(-6 = 0(-2) + b\) or \(b=-6\). Putting the values of \(m\) and \(b\) into the equation \(y=mx+b\) produces \( y = 0x+(-6) \) or \(y=-6\).

    c. Solution

    A line with undefined slope is a vertical line, so all the points on the line have the same \(x\) coordinate. Since \((1,5)\) is a point on the line, all \(x\)-coordinates are \(x\), so the equation is \(x=1\).

    Since the slope is undefined, neither the point-slope method nor the slope-intercept method would work.

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

    Find an equation of a line given the following slope and point on the line.

    a.    Slope \(m=−\frac{2}{5}\) and containing the point \((10,−5)\) b.    Slope \(m=−\frac{3}{4}\), and containing the point \((4,−7)\) c. Slope \(m=0\), and containing the point \((-3,8)\) d. Slope \(m=\text{undefined}\),  and containing the point \((-1,4)\)
    Answer

      a.    \(y=−\frac{2}{5}x−1\)            b.    \(y=−\frac{3}{4}x−4\)        c.    \(y=8\)        d.    \(x=-1\)

    Find an Equation of the Line Given Two Points

    When we are not given the slope nor a point but rather just two points on the line, the value of the slope must be calculated.

    how-to.png How to: Find an equation of a line given two points.

    1. Find the slope using the given points. \(m=\dfrac{y_2−y_1}{x_2−x_1}\)
    2. Choose one point.
    3. Substitute the values into the point-slope form: \(y−y_1=m(x−x_1)\) and solve for \(y\).
      (Alternatively, use the the slope-intercept form \(y=mx+b\) and substitute values for \(m\), \(x\), and \(y\) into it).
    4. Solve for \(y\). Write in slope-intercept form, \(y=mx+b\).
      (Alternatively, if the slope-intercept form is used instead, solve for \(b\) and update the slope-intercept equation.)
    Example \(\PageIndex{7}\) Equation of a line given two points

    Find an equation of a line that contains the following points Write the equation in slope-intercept form if possible.
    a.    \((−3,−1)\) and \((2,−2)\)            b.    \((−3,5)\) and \((−3,4)\)            c.    \( (2, 1)\) and \((5, 1)\)

    a. Solution
    Step 1. Find the slope using the given points \( (-3. -1) \) and \( (2, -2) \).  \( m = \dfrac{y_2-y_1}{x_2-x_1} = \dfrac{-2-(-1)}{2-(-3)} = \dfrac{-1}{5} \\ \)
    \(  \color{Cerulean}{m = -\dfrac{1}{5}} \)
    Step 2. Choose one point. (Either point can be chosen). \( \begin{pmatrix} \color{red}{x_1}, & \color{red}{y_1} \\ \color{red}{2} & \color{red}{-2} \end{pmatrix} \)
    Step 3. Substitute the values into the point-slope form. \( y−{\color{red}{y_1}}={\color{Cerulean}{m}}(x−{\color{red}{x_1}})  \)  
    \( y−{\color{red}{(-2)}}={\color{Cerulean}{-\dfrac{1}{5}}}(x−{\color{red}{2}}) \\ \)
    Step 4. Solve for \(y\) and write the equation in slope-intercept form. \(y +2 = -\dfrac{1}{5}x+\dfrac{2}{5} \)
    \(y = -\dfrac{1}{5}x-\dfrac{8}{5} \)

    b.     Solution

    The first step will be to find the slope. \(m=\dfrac{y_2−y_1}{x_2−x_1} =\dfrac{4−5}{−3−(−3)} =\dfrac{−1}{0} \)

    The slope is undefined. This tells us it is a vertical line. Both of our points have an x-coordinate of \(−3\). So our equation of the line is \(x=−3\). Since there is no y, we cannot write it in slope-intercept form.

    c.    Solution

    The first step will be to find the slope. \(m=\dfrac{y_2−y_1}{x_2−x_1} =\dfrac{1−1)}{5−2} =\dfrac{0}{3} \)

    The slope is zero. This tells us it is a horizontal line. Both of our points have an y-coordinate of \(1\). So our equation of the line is \(y=1\). 

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

    Find the equation of a line containing the points
            a.    \((−2,−4)\) and \((1,−3)\).            b.    \((−4,−3)\) and \((1,−5)\).        c.    \((5,1)\) and \((5,−4)\).            d.    \((4,−4)\) and \((3,−4)\).

    Answer

    a.    \(y=\dfrac{1}{3}x−\dfrac{10}{3}\)            b.    \(y=−\dfrac{2}{5}x−\dfrac{23}{5}\)            c.    \(x=5\)            d.    \(y=−4\)

    Find an Equation of a Line Parallel to a Given Line

    This figure has a graph of a two straight lines on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The first line goes through the points (0, negative 3), (1, negative 1), and (2, 1). The points (negative 2, 1) and (negative 1, 3) are plotted. The second line goes through the points (negative 2, 1) and (negative 1, 3).This figure has a graph of a straight line and a point on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (0, negative 3), (1, negative 1), and (2, 1). The point (negative 2, 1) is plotted. The line does not go through the point (negative 2, 1).Suppose we need to find an equation of a line that passes through a specific point and is parallel to a given line. We can use the fact that parallel lines have the same slope. So we will have a point and the slope—just what we need to use the point-slope equation.

    First, let’s look at this graphically.

    Given the graph for \(y=2x−3,\) we want to graph a line parallel to this line and passing through the point \((−2,1)\).

    We know that parallel lines have the same slope. We’ll use the notation \(m_∥\) to represent the slope of a line parallel to a line with slope \(m\). (Notice that the subscript || looks like two parallel lines.)

    So the second line will have the same slope as \(y=2x−3\). That slope is \(m_∥=2\).

    The second (parallel) line will pass through \((−2,1)\) and have slope \(m=2\).

    To graph the line, we start at \((−2,1)\) and count out the rise and run.

    With \(m=2\) (or \(m=\frac{2}{1}\)), we count out the rise 2, the run 1, and draw the line, as shown in the graph.

    Now let’s see how to do this algebraically.

    how-to.png How to: Find an equation of a line parallel to a given line.

    1. Identify the slope of the given line, and find the slope of the parallel line, \(m_∥\). Use \(m_∥\) for \(m\) in the substitution step below (Step 3).
    2. Identify the point.
    3. Substitute the values \(x_1\), \(y_1\), and \(m\) into the point-slope form: \(y−y_1=m(x−x_1)\). 
      (Alternatively, substitute values for \(x\), \(y\), and \(m\) into the slope-intercept form \(y=mx+b\)).
    4. Solve for \(y\) and write the equation in slope-intercept form.
      (Alternatively, if the slope-intercept form was used instead, solve for \(b\) and update the slope-intercept equation.)
    Example \(\PageIndex{9}\) Equation of a line given a point and a parallel line

    Find an equation of a line parallel to \(y=2x−3\) that contains the point \((−2,1)\). Write the equation in slope-intercept form.

    Solution
    Step 1. Identify the slope of the given line, \( y = 2x - 3\).
    Find the slope of the parallel line. Parallel lines have the same slope.
    Slope of the given line is \( m = 2 \)
    Slope of the line wanted is \(m_∥=\color{Cerulean}{2}\)
    Step 2. Identify given point, \( (-2, 1) \). \( \begin{pmatrix} \color{red}{x_1}, & \color{red}{y_1} \\ \color{red}{-2} & \color{red}{1} \end{pmatrix} \)
    Step 3. Substitute the values into the point-slope form. \( y−{\color{red}{y_1}}={\color{Cerulean}{m_∥}}(x−{\color{red}{x_1}})  \)  
    \( y−{\color{red}{(1)}}={\color{Cerulean}{2}}(x−{\color{red}{(-2)}})  \)  
    Step 4. Solve for \(y\) and write the equation in slope-intercept form. \(y - 1 = 2(x + 2)   \)  
    \(y - 1 = 2x + 4  \)
    \(y = 2x + 5 \)
    try-it.pngTry It \(\PageIndex{10}\)

    Find an equation of a line parallel to the following lines. Write the equation in slope-intercept form.
        a.    Parallel to line \(y=3x+1\) that contains the point \((4,2)\).       
        b.    Parallel to the line \(y=\dfrac{1}{2}x−3\) that contains the point \((6,4)\).

    Answer

    a.    \(y=3x−10\)            b.    \(y=\frac{1}{2}x+1\)

    Find an Equation of a Line Perpendicular to a Given Line

    This figure has a graph of two perpendicular straight lines on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The first line goes through the points (0, negative 3), (1, negative 1), and (2, 1). The points (negative 2, 1) and (0, 0) are plotted. A right triangle is drawn connecting the points (negative 2, 1), (negative 2, 0), and (0, 0). The second line goes through the points (negative 2, 1) and (0, 0).This figure has a graph of a straight line and a point on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (0, negative 3), (1, negative 1), and (2, 1). The point (negative 2, 1) is plotted. The line does not go through the point (negative 2, 1).Now, let’s consider perpendicular lines. Suppose we need to find a line passing through a specific point and which is perpendicular to a given line. We can use the fact that perpendicular lines have slopes that are negative reciprocals. We will again use the point-slope equation, like we did with parallel lines.

    First, let’s look at this graphically.

    Given the graph of \(y=2x−3\), we want to graph a line perpendicular to this line and passing through \((−2,1)\).

    We know that perpendicular lines have slopes that are negative reciprocals. We’ll use the notation \(m_⊥\) to represent the slope of a line perpendicular to a line with slope m. (Notice that the subscript \(⊥\) looks like the right angles made by two perpendicular lines.)

    So the second line will have a slope that is the negative reciprocal of the given line \(y=2x−3 \). The slope of the given line is \(m=2\) so the slope of the wanted line will be \(m_⊥=−\dfrac{1}{2} \).

    We now know the second (perpendicular) line will pass through \((−2,1)\) and have slope \(m_⊥=−\dfrac{1}{2}\).

    To graph the line, we start at \((−2,1)\) and count out the rise \(−1\), the run \(2\) and draw the line.

    Now, let’s see how to do this algebraically.

    how-to.png How to: Find an equation of a line perpendicular to a given line.

    1. Identify the slope of the given line and find  the slope of the perpendicular line, \(m_⊥\). Use \(m_⊥\) for \(m\) in the substitution step below (Step 3).
    2. Identify the point.
    3. Substitute the values \(x_1\), \(y_1\), and \(m\)  into the point-slope form: \(y−y_1=m(x−x_1)\). 
      (Alternatively, substitute values for \(x\), \(y\), and \(m\) into the slope-intercept form \(y=mx+b\)).
    4. Solve for \(y\) and write the equation in slope-intercept form.
      (Alternatively, if the slope-intercept form is used instead, solve for \(b\) and update the slope-intercept equation.)
    Example \(\PageIndex{11}\) Equation of a line given a point and a perpendicular line

    Find an equation of a line perpendicular to \(y=2x−3\) that contains the point \((−2,1)\).
    Write the equation in slope-intercept form.

    Solution
    Step 1. Identify the slope of the given line, \( y = 2x - 3\).
                Find the slope of the perpendicular line.
                The slopes of perpendicular lines are negative reciprocals. 
    \( m = 2 \)
    \(m_⊥=\color{Cerulean}{−\dfrac{1}{2}}\)
    Step 2. Identify the given point, \( (-2, 1) \). \( \begin{pmatrix} \color{red}{x_1}, & \color{red}{y_1} \\ \color{red}{-2} & \color{red}{1} \end{pmatrix} \)
    Step 3. Substitute the values into the point-slope form. \( y−{\color{red}{y_1}}={\color{Cerulean}{m_⊥}}(x−{\color{red}{x_1}})  \)  
    \( y−{\color{red}{(1)}}={\color{Cerulean}{−\dfrac{1}{2}}}(x−{\color{red}{(-2)}})  \)
    Step 4. Solve for \(y\) and write the equation in slope-intercept form. \(y - 1 = −\dfrac{1}{2}(x + 2)   \)  
    \(y - 1 = −\dfrac{1}{2}x - 1  \)
    \(y = −\dfrac{1}{2}x  \)
    try-it.png Try It \(\PageIndex{12}\)

    Find an equation of a line with the following attributes. Write the equation in slope-intercept form.
        a.    P​​​erpendicular to the line \(y=3x+1\) that contains the point \((4,2)\).
        b.    Perpendicular to the line \(y=\dfrac{1}{2}x−3\) that contains the point \((6,4)\).

    Answer

    a.    \(y=−\frac{1}{3}x+\frac{10}{3}\)            b.    \(y=−2x+16\)

    Find an Equation of a Line Perpendicular to a Given Horizontal or Vertical Line 

    Example \(\PageIndex{13}\) Equation of a line given a point and a perpendicular vertical line

    Find an equation of a line perpendicular to \(x=5\) that contains the point \((3,−2)\). Write the equation in slope-intercept form.

    Solution Using characteristics of the given line.

    We want to find a line that is perpendicular to \(x=5\) that contains the point \((3,−2)\).
    The graph of the equation  \(x=5\) is a vertical line. 
    This graph shows the line \(x=5\) and the point \((3,−2)\).

    This figure has a graph of a straight vertical line and a point on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (5, 0), (5, 1), and (5, 2). The point (3, negative 2) is plotted. The line does not go through the point (3, negative 2).

    We know every line perpendicular to a vertical line is horizontal, so we will sketch the horizontal line through \((3,−2)\). If we look at a few points on this horizontal line, we notice they all have y-coordinates of \(−2\). So, the equation of the line perpendicular to the vertical line \(x=5\) is \(y=−2\).

    This figure has a graph of a straight vertical line and a straight horizontal line on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The vertical line goes through the points (5, 0), (5, 1), and (5, 2). The horizontal line goes through the points (negative 2, negative 2), (0, negative 2), (3, negative 2), and (6, negative 2).

    Solution Using characteristics of the given line.
    Step 1. Identify the slope of the given line, \( x=5\).
    Find the slope of the perpendicular line.
    The line \(x=5\) is vertical, so its perpendicular will be horizontal. 
    \(m_⊥=\color{Cerulean}{0}\)
    Step 2. Identify the given point, \( (3,−2) \). \( \begin{pmatrix} \color{red}{x_1}, & \color{red}{y_1} \\ \color{red}{3} & \color{red}{−2} \end{pmatrix} \)
    Step 3. Substitute the values into the point-slope form. \( y−{\color{red}{y_1}}={\color{Cerulean}{m}}(x−{\color{red}{x_1}})  \)  
    \( y−{\color{red}{(-2)}}={\color{Cerulean}{0}}(x−{\color{red}{(3)}})  \)     
    Step 4. Simplify. Write in slope-intercept form. \(y + 2 = 0   \)  
    \(y = −2 \)
    Example \(\PageIndex{14}\) Equation of a line given a point and a perpendicular horizontal line

    Find an equation of a line that is perpendicular to \(y=−3\) that contains the point \((−3,5)\).
    Write the equation in slope-intercept form.

    Solution

    The line \(y=−3\) is a horizontal line. Any line perpendicular to it must be vertical, in the form \(x=a\). Since the perpendicular line is vertical and passes through \((−3,5)\), every point on it has an x-coordinate of \(−3\). The equation of the perpendicular line is \(x=−3\).

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

    Find an equation of a line with the following attributes. Write the equation in slope-intercept form when possible.

    1. Perpendicular to the line \(x=4\) that contains the point \((4,−5)\).       
    2. Perpendicular to the line \(x=2\) that contains the point \((2,−1)\).
    3. Perpendicular to the line \(y=1\) that contains the point \((−5,1)\). 
    4. Perpendicular to the line \(y=−5\) that contains the point \((−4,−5)\). 
    Answer

    a.    \(y=−5\)   or \(y=0x-5\)         b.    \(y=−1\)  or  \(y=0x-1 \)          c.    \(x=−5\)            d.    \(x=−4\)

    Key Concepts

    • How to determine the slope of a line if it is not given
    • If given a graph of a line, choose two points on the graph and count the rise (up is positive) and the run (right is positive to get from one point to the other point. The slope is the ratio, \(m = \dfrac{\text{Rise}}{\text{Run}}\).
    • If two points \((x_1,y_1)\) and \((x_2,y_2)\) on the line are given rather than the slope, the slope is \(m=\dfrac{y_2−y_1}{x_2−x_1}\)
    • If given a parallel line, identify the slope of the given line. The slope of the wanted line has the same slope.
    • If given a perpendicular line, identify the slope of the given line. The slope of the wanted line is the negative reciprocal of the given line.
    • If the slope of the given line is \(0\), the given line is horizontal and its equation is \(y=b\).
    • If the slope of the given line is undefined, the given line is vertical and its equation is \(x=c\).
    • Vertical lines (\(x = c)\) and horizontal lines \((y = b)\) are perpendicular to each other.
    • How to find an equation of a line using the point-slope equation.
    1. Identify the slope, \(m\).
    2. Identify a point \((x_1,y_1)\) on the line. If given two points, either point may be chosen. 
    3. Substitute the values of \( y_1\), \( x_1\), and \(m\) into the point-slope equation,\( y−y_1=m(x−x_1)\). 
    4. Solve for \(y\)  and write the equation in slope-intercept form, \(y=mx+b\).
    • How to find an equation of a line using the slope-intercept equation.
    1. Identify the slope, \(m\).
    2. Identify a point \((x,y)\) on the line. If given two points, either point may be chosen.
    3. Substitute the values of \(x\), \(y\), and \(m\) into the slope-intercept equation,\( y=mx+b\).  
    4. Solve for \(b\).  Substitute the values of \(m\) and \(b\) in the slope-intercept form, \(y=mx+b\).

    Glossary

    point-slope form

    The point-slope form of an equation of a line with slope m and containing the point \((x_1,y_1)\) is \(y−y_1=m(x−x_1)\).

    slope-intercept form

    The slope-intercept form of an equation of a line with slope \(m\) and \(y\)-intercept \( (0,b) \)  is \( y=mx+b \). The \(y\)-intercept is a point on the line where it crosses the \(y\)-axis.

     

    0.10: Review - Find the Equation of a Line is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?