Learning Objectives

In this section you will:

2.4.1 – Finding a Linear Equation

The Point-Slope Formula

Given the slope and one point on a line, we can find the equation of the line using the point-slope formula.

[latex]$$y-{y}_{1}=m\left(x-{x}_{1}\right)$$[/latex]

This is an important formula, as it will be used in other areas of college algebra and often in calculus to find the equation of a tangent line. We need only one point and the slope of the line to use the formula. After substituting the slope and the coordinates of one point into the formula, we simplify it and write it in slope-intercept form.

The Point-Slope Formula

Given one point and the slope, the point-slope formula will lead to the equation of a line:

[latex]$$y-{y}_{1}=m\left(x-{x}_{1}\right)$$[/latex]

Example 1 – Finding the Equation of a Line Given the Slope and One Point

Write the equation of the line with slope [latex]\,m=-3\,[/latex] and passing through the point [latex]\,\left(4,8\right).\,[/latex] Write the final equation in slope-intercept form.

Using the point-slope formula, substitute [latex]\,-3\,[/latex] for m and the point [latex]\,\left(4,8\right)\,[/latex] for [latex]\,\left({x}_{1},{y}_{1}\right).[/latex]

[latex]$$\begin{array}{ccc}\hfill y-{y}_{1}& =& m\left(x-{x}_{1}\right)\hfill \\ \hfill y-8& =& -3\left(x-4\right)\hfill \\ \hfill y-8& =& -3x+12\hfill \\ \hfill y& =& -3x+20\hfill \end{array}$$[/latex]

Analysis

Note that any point on the line can be used to find the equation. If done correctly, the same final equation will be obtained.

Try It

Given [latex]\,m=4,[/latex] find the equation of the line in slope-intercept form passing through the point [latex]\,\left(2,5\right).[/latex]

Show answer

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

Example 2 – Finding the Equation of a Line Passing Through Two Given Points

Find the equation of the line passing through the points [latex]\,\left(3,4\right)\,[/latex] and [latex]\,\left(0,-3\right).\,[/latex] Write the final equation in slope-intercept form.

First, we calculate the slope using the slope formula and two points.

[latex]$$\begin{array}{ccc}\hfill m& =& \frac{-3-4}{0-3}\hfill \\ & =& \frac{-7}{-3}\hfill \\ & =& \frac{7}{3}\hfill \end{array}$$[/latex]

Next, we use the point-slope formula with the slope of [latex]\,\frac{7}{3},[/latex] and either point. Let’s pick the point [latex]\,\left(3,4\right)\,[/latex] for [latex]\,\left({x}_{1},{y}_{1}\right).[/latex]

[latex]$$\begin{array}{ccc}\hfill y-4& =& \frac{7}{3}\left(x-3\right)\hfill \\ \hfill y-4& =& \frac{7}{3}x-7\phantom{\rule{2em}{0ex}}\text{Distribute the }\frac{7}{3}.\hfill \\ \hfill y& =& \frac{7}{3}x-3\hfill \end{array}$$[/latex]

In slope-intercept form, the equation is written as [latex]\,y=\frac{7}{3}x-3.[/latex]

Analysis

To prove that either point can be used, let us use the second point [latex]\,\left(0,-3\right)\,[/latex] and see if we get the same equation.

[latex]$$\begin{array}{ccc}\hfill y-\left(-3\right)& =& \frac{7}{3}\left(x-0\right)\hfill \\ \hfill y+3& =& \frac{7}{3}x\hfill \\ \hfill y& =& \frac{7}{3}x-3\hfill \end{array}$$[/latex]

We see that the same line will be obtained using either point. This makes sense because we used both points to calculate the slope.

2.4.2 – Writing and Interpreting an Equation for a Linear Function

Now that we know both the slope-intercept form and point-slope form of a line, we can choose which form to use to write equations for linear functions based on the information we are given. That information may be provided in the form of a graph, a point and a slope, two points, and so on. Look at the graph of the function [latex]\,f\,[/latex] in Figure 1.

This graph shows a linear function graphed on an x y coordinate plane. The x axis is labeled from negative 2 to 8 and the y axis is labeled from negative 1 to 8. The function f is graph along the points (0, 7) and (4, 4).
Figure 1.

We are not given the slope of the line, but we can choose any two points on the line to find the slope. Let’s choose [latex]\,\left(0,7\right)\,[/latex] and [latex]\,\left(4,4\right).\,[/latex]

[latex]$$\begin{array}{ccc}\hfill m& =& \frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}\hfill \\ & =& \frac{4-7}{4-0}\hfill \\ & =& -\frac{3}{4}\hfill \end{array}$$[/latex]

Now we can substitute the slope and the coordinates of one of the points into the point-slope form.

[latex]$$\begin{array}{ccc}\hfill y-{y}_{1}& =& m\left(x-{x}_{1}\right)\hfill \\ \hfill \text{ }y-4& =& -\frac{3}{4}\left(x-4\right)\hfill \end{array}$$[/latex]

If we want to rewrite the equation in the slope-intercept form, we would find

[latex]$$\begin{array}{ccc}\hfill y-4& =& -\frac{3}{4}\left(x-4\right)\hfill \\ \hfill y-4& =& -\frac{3}{4}x+3\hfill \\ \hfill y& =& -\frac{3}{4}x+7\hfill \end{array}$$[/latex]

If we want to find the slope-intercept form without first writing the point-slope form, we could have recognized that the line crosses the y-axis when the output value is 7. Therefore, [latex]\,b=7.\,[/latex] We now have the initial value [latex]\,b\,[/latex] and the slope [latex]\,m\,[/latex] so we can substitute [latex]\,m\,[/latex] and [latex]\,b\,[/latex] into the slope-intercept form of a line.

This image shows the equation f of x equals m times x plus b. It shows that m is the value negative three fourths and b is 7. It then shows the equation rewritten as f of x equals negative three fourths times x plus 7.

So the function is [latex]f\left(x\right)=-\frac{3}{4}x+7,[/latex] and the linear equation would be [latex]\,y=-\frac{3}{4}x+7.[/latex]

How To

Given the graph of a linear function, write an equation to represent the function.

  1. Identify two points on the line.
  2. Use the two points to calculate the slope.
  3. Determine where the line crosses the y-axis to identify the y-intercept by visual inspection.
  4. Substitute the slope and y-intercept into the slope-intercept form of a line equation.

Example 3 – Writing an Equation for a Linear Function

Write an equation for a linear function given a graph of [latex]\,f\,[/latex] shown in Figure 2.

This figure shows an increasing function graphed on an x y coordinate plane. The x axis is labeled from negative 10 to 10. The y axis is labeled from negative 10 to 10. The function passes through the points (0, 2) and (-2, -4). These points are not labeled on this graph.
Figure 2.

Identify two points on the line, such as [latex]\,\left(0,2\right)\,[/latex] and [latex]\,\left(-2,-4\right).\,[/latex] Use the points to calculate the slope.

[latex]$$\begin{array}{ccc}\hfill m& =& \frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}\hfill \\ & =& \frac{-4-2}{-2-0}\hfill \\ & =& \frac{-6}{-2}\hfill \\ & =& 3\hfill \end{array}$$[/latex]

Substitute the slope and the coordinates of one of the points into the point-slope form.

[latex]$$\begin{array}{ccc}\hfill y-{y}_{1}& =& m\left(x-{x}_{1}\right)\hfill \\ \hfill y-\left(-4\right)& =& 3\left(x-\left(-2\right)\right)\hfill \\ \hfill y+4& =& 3\left(x+2\right)\hfill \end{array}$$[/latex]

We can use algebra to rewrite the equation in the slope-intercept form.

[latex]$$\begin{array}{ccc}\hfill y+4& =& 3\left(x+2\right)\hfill \\ \hfill y+4& =& 3x+6\hfill \\ \hfill y& =& 3x+2\hfill \end{array}$$[/latex]

Analysis

This makes sense because we can see from Figure 3 that the line crosses the y-axis at the point [latex]\,\left(0,\text{ }2\right),\,[/latex] which is the y-intercept, so [latex]\,b=2.[/latex]

This figure shows an increasing function graphed on an x y coordinate plane. The x axis is labeled from negative 10 to 10. The y axis is labeled from negative 10 to 10. The function passes through the points (0, 2) and (-2, -4). These points are labeled on this graph.
Figure 3.

Example 4 – Writing an Equation for a Linear Cost Function

Suppose Ben starts a company in which he incurs a fixed cost of $1,250 per month for the overhead, which includes his office rent. His production costs are $37.50 per item. Write a linear function [latex]\,C\,[/latex] where [latex]\,C\left(x\right)\,[/latex] is the cost for [latex]\,x\,[/latex] items produced in a given month.

The fixed cost is present every month, $1,250. The costs that can vary include the cost to produce each item, which is $37.50. The variable cost, called the marginal cost, is represented by [latex]\,37.5.\,[/latex] The cost Ben incurs is the sum of these two costs, represented by [latex]\,C\left(x\right)=1250+37.5x.[/latex]

Analysis

If Ben produces 100 items in a month, his monthly cost is found by substituting 100 for [latex]\,x.[/latex]

[latex]$$\begin{array}{ccc}\hfill C\left(100\right)& =& 1250+37.5\left(100\right)\hfill \\ & =& 5000\hfill \end{array}$$[/latex]

So his monthly cost would be $5,000.

Example 5 – Writing an Equation for a Linear Function Given Two Points

If [latex]\,f\,[/latex] is a linear function, with [latex]\,f\left(3\right)=-2,[/latex] and [latex]\,f\left(8\right)=1,[/latex] find an equation for the function in slope-intercept form.

We can write the given points using coordinates.

[latex]$$\begin{array}{ccc}\hfill f\left(3\right)& =& -2\to \left(3,-2\right)\hfill \\ \hfill f\left(8\right)& =& 1\to \left(8,1\right)\hfill \end{array}$$[/latex]

We can then use the points to calculate the slope.

[latex]$$\begin{array}{ccc}\hfill m& =& \frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}\hfill \\ & =& \frac{1-\left(-2\right)}{8-3}\hfill \\ & =& \frac{3}{5}\hfill \end{array}$$[/latex]

Substitute the slope and the coordinates of one of the points into the point-slope form.

[latex]$$\begin{array}{ccc}\hfill y-{y}_{1}& =& m\left(x-{x}_{1}\right)\hfill \\ \hfill y-\left(-2\right)& =& \frac{3}{5}\left(x-3\right)\hfill \end{array}$$[/latex]

We can use algebra to rewrite the equation in the slope-intercept form.

[latex]$$\begin{array}{ccc}\hfill y+2& =& \frac{3}{5}\left(x-3\right)\hfill \\ \hfill y+2& =& \frac{3}{5}x-\frac{9}{5}\hfill \\ \hfill y& =& \frac{3}{5}x-\frac{19}{5}\hfill \end{array}$$[/latex]

Try It

If [latex]\,f\left(x\right)\,[/latex] is a linear function, with [latex]\,f\left(2\right)=–11,[/latex] and [latex]\,f\left(4\right)=-25,[/latex] write an equation for the function in slope-intercept form.

Show answer

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

Access this online resource for additional instruction and practice with point-slope form.

Key Concepts

  • We can find the equation of a line given the slope and a point. See Example 1.
  • We can also find the equation of a line given two points. Find the slope and use the point-slope formula. See Example 2.
  • An equation for a linear function can be written from a graph. See Example 3.
  • The equation for a linear function can be written if the slope [latex]\,m\,[/latex] and initial value [latex]\,b\,[/latex] are known. See Example 4 and Example 5.

Glossary

point-slope form
the equation for a line that represents a linear function of the form [latex]\,y-{y}_{1}=m\left(x-{x}_{1}\right)[/latex]

License

Icon for the Creative Commons Attribution 4.0 International License

Algebra and Trigonometry Copyright © 2015 by OpenStax is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book