7.6.2: Constructing an Equation Given Points on a Line

Learning Outcomes

  • Write the equation of a line using slope and a point on the line
  • Write the equation of a line using two points on the line

Finding the Equation of a Line

Given the Slope and a Point on the Line

Using the slope-intercept equation of a line is straight forward when we know both the slope, [latex]m[/latex], and the [latex]y[/latex]-intercept, [latex](0, b)[/latex], but what if we know the slope and a point on the line that is not the [latex]y[/latex]-intercept?

For example, suppose we know that a line has a slope of [latex]5[/latex] and that the point [latex](2, 1)[/latex] lies on the line. To lie on the line [latex](2, 1)[/latex] must satisfy the linear equation [latex]y=5x+b[/latex]. Remember we know that [latex]m=5[/latex]. In other words, the point [latex](2, 1)[/latex] must be a solution of the equation [latex]y=5x+b[/latex], since it lies on the line. If we replace [latex]x[/latex] and [latex]y[/latex] with [latex]2[/latex] and [latex]1[/latex], respectively, we can solve the resulting equation for [latex]b[/latex].

[latex]\begin{equation}\begin{aligned}y& = mx+b\;\;\;\;\;\;m=5 \text{ and } (2,1)\text{ is an }(x, y)\text{ solution} \\ 1& = 5(2)+b \\1 & = 10 + b \\ -9 & = b\end{aligned}\end{equation}[/latex]

So, since [latex]m=5[/latex] and [latex]b=-9[/latex], the equation of the line is [latex]y=5x-9[/latex].

Example

Determine the equation of the line that has a slope of [latex]3[/latex] and contains the point [latex](1,4)[/latex].

Solution

Substitute the slope (m) into [latex]y=mx+b[/latex]:

[latex]y=3x+b[/latex]

Substitute the point [latex](1,4)[/latex] for [latex]x[/latex] and [latex]y[/latex]:

[latex]4=3\left(1\right)+b[/latex]

Solve for b:

[latex]\begin{array}{l}4=3+b\\1=b\end{array}[/latex]

Write the equation of the line [latex]y=mx+b[/latex] with [latex]m=3[/latex] and [latex]b=1[/latex].

Answer

[latex]y=3x+1[/latex]

To confirm our algebra, we can check by graphing the equation [latex]y=3x+1[/latex]. The equation checks because when graphed it passes through the point [latex](1,4)[/latex].

An uphill line passes through the y-intercept of (0,1) and the point (1,4). The rise is 3 and the run is 1.

 

Example

Determine the equation of the line that has a slope of [latex]\frac{7}{8}[/latex] and contains the point [latex]\left(4,\frac{5}{4}\right)[/latex].

Solution

Substitute the slope (m) into [latex]y=mx+b[/latex]:

[latex]\begin{array}{l}y=mx+b\\\\y=\frac{7}{8}x+b\end{array}[/latex]

Substitute the point [latex]\left(4,\frac{5}{4}\right)[/latex] for x and y:

[latex]\frac{5}{4}=\frac{7}{8}\left(4\right)+b[/latex]

Solve for b:

[latex]\begin{array}{l}\,\,\,\,\,\,\,\,\,\,\,\,\frac{5}{4}=\frac{28}{8}+b\\\\\,\,\,\,\,\,\,\,\,\,\,\,\frac{5}{4}=\frac{14}{4}+b\\\\\frac{5}{4}-\frac{14}{4}=\frac{14}{4}-\frac{14}{4}+b\\\\\,\,\,\,\,\,\,\,\,\,-\frac{9}{4}=b\end{array}[/latex]

Write the equation of the line [latex]y=mx+b[/latex] with [latex]\displaystyle m=\frac{7}{8}[/latex] and [latex]\displaystyle b=-\frac{9}{4}[/latex].

Answer

[latex]y=\frac{7}{8}x-\frac{9}{4}[/latex]

Try It

Write the equation of the line that has a slope of [latex]\frac{3}{2}[/latex] and contains the point [latex]\left(2,5\right)[/latex].

 

Watch the video below for another example of how to find the equation given the slope and a point on the line.

Try It

Given Two Points on the Line

Let’s suppose now that we don’t know either the slope nor the [latex]y[/latex]-intercept, but we do know the location of two points on the line. In this case, we first need to find the slope of the line by using the two points, then we will know the slope and a point (actually 2 points).

Example

Determine the equation of the line that passes through the points [latex](2,1)[/latex] and [latex](−1,−5)[/latex].

Solution

Find the slope using the given points:

[latex]\displaystyle \frac{1-(-5)}{2-(-1)}=\frac{6}{3}=2[/latex]

Substitute the slope (m) into [latex]y=mx+b[/latex]:

[latex]y=2x+b[/latex]

Substitute the coordinates of either point for [latex]x[/latex] and [latex]y[/latex]– this example uses [latex](2, 1)[/latex].

[latex]1=2(2)+b[/latex]

Solve for b.

[latex]\begin{array}{l}\,\,\,\,1=4+b\\−3=b\end{array}[/latex]

Write the equation of the line [latex]y=mx+b[/latex] with [latex]m=2[/latex] and [latex]b=-3[/latex].

Answer

[latex]y=2x-3[/latex]

Notice that is doesn’t matter which point we use when we substitute and solve for b—we get the same result for b either way. If we think about it, we have to because both points lie on the line and are therefore solutions of the equation. In the example above, we substituted the coordinates of the point [latex](2, 1)[/latex] in the equation [latex]y=2x+b[/latex]. Let’s start with the same equation, [latex]y=2x+b[/latex], but substitute in [latex](−1,−5)[/latex]:

[latex]\begin{array}{l}\,\,\,\,\,y=2x+b\\-5=2\left(-1\right)+b\\-5=-2+b\\-3=b\end{array}[/latex]

The final equation is the same: [latex]y=2x–3[/latex].

Example

Determine the equation of the line that passes through the points [latex](-4.6,6.45)[/latex] and [latex](1.15,7.6)[/latex].

Solution

Find the slope using the given points:

[latex]\displaystyle \frac{7.6-6.45}{1.15-(-4.6)}=\frac{1.15}{5.75}=0.2[/latex]

Substitute the slope (m) into [latex]\displaystyle y=mx+b[/latex]:

[latex]\displaystyle y=0.2x+b[/latex]

Substitute either point for [latex]x[/latex] and [latex]y[/latex]—this example uses [latex](1.15,7.6)[/latex]. Then solve for b:

[latex]\displaystyle \begin{array}{l}\,\,\,\,\,\,7.6\,\,=\,\,0.2(1.15)+b\\\,\,\,\,\,\,7.6\,\,=\,\,0.23+b\\\,\,\,\,\,\,7.6\,\,=\,\,0.23+b\\\underline{-0.23\,\,\,\,-0.23}\\\,\,\,\,\,7.37\,=\,\,b\end{array}[/latex]

Write the equation of the line [latex]\displaystyle y=mx+b[/latex] with [latex]m=0.2[/latex] and [latex]b=7.37[/latex].

[latex]\displaystyle y=0.2x+7.37[/latex]

Answer

The equation of the line that passes through the points [latex](-4.6,6.45)[/latex] and [latex](1.15,7.6)[/latex] is [latex]y=0.2x+7.37[/latex].

 

Watch the video to see another example.

Try It

 

Given the Graph

If we are given the graph of a line, we can find its equation by determining the slope and a point on the line.

Example

Determine the equation of the graphed line:

Solution

The points (0, 5) and (2, 1) lie o the graph.

Find the slope between (0 5) and (2, 1): run = 2, rise = -4, so [latex]m=\frac{-4}{2}=-2[/latex].

Write the equation with [latex]m=-2[/latex]:    [latex]y = -2x+b[/latex]

The point (0 3) is the y-intercept so [latex]b=3[/latex]:     [latex]y = -2x+3[/latex]

Answer

[latex]y = -2x+3[/latex]

Example

Determine the equation of the graphed line:

3x-2y=3 graph

Solution

The points (-1, 3) and (3, 3) lie on the graph.

Find the slope between the points: rise = 6, run = 4, so [latex]m=\frac{6}{4}=\frac{2}{3}[/latex]

Write the equation with [latex]m=\frac{2}{3}[/latex]:     [latex]y=\frac{2}{3}x+b[/latex]

Substitute [latex](x, y)=(3, 3)[/latex]:     [latex]3=\frac{2}{3}·3+b[/latex]

Solve for [latex]b[/latex]:      [latex]3=2+b\\1=b[/latex]

Write the equation with [latex]m=\frac{2}{3}[/latex] and [latex]b=1[/latex]:[latex]y=\frac{2}{3}x+1[/latex]

Answer

[latex]b=1[/latex]:[latex]y=\frac{2}{3}x+1[/latex]

Try It

Determine the equation of the graphed line:

4x+3y=2 graph