Point-slope form of an equation is also useful if we know any two points through which a line passes. Suppose, for example, we know that a line passes through the points [latex]\left(0,\text{ }1\right)[/latex] and [latex]\left(3,\text{ }2\right)[/latex]. We can use the coordinates of the two points to find the slope.
Now we can use the slope we found and the coordinates of one of the points to find the equation for the line. Let’s use [latex](0, 1)[/latex] for our point.
[latex]\begin{array}{l}y-{y}_{1}=m\left(x-{x}_{1}\right)\\ y - 1=\frac{1}{3}\left(x - 0\right)\end{array}[/latex]
As before, we can use algebra to rewrite the equation in slope-intercept form.
[latex]\begin{array}{lll}y - 1=\frac{1}{3}\left(x - 0\right)\hfill & \hfill \\ y - 1=\frac{1}{3}x\hfill & \text{Distribute the }\frac{1}{3}.\hfill \\ \text{}y=\frac{1}{3}x+1\hfill & \text{Add 1 to each side}.\hfill \end{array}[/latex]
Both equations describe the line graphed below.
Write the point-slope form of an equation of a line that passes through the points [latex]\left(5,\text{ }1\right)[/latex] and [latex]\left(8,\text{ }7\right)[/latex]. Then rewrite the equation in slope-intercept form.
So [latex]m=2[/latex]. Next, we substitute the slope and the coordinates for one of the points into point-slope form. We can choose either point, but we will use [latex]\left(5,\text{ }1\right)[/latex].
[latex]\begin{array}{l}y-{y}_{1}=m\left(x-{x}_{1}\right)\\ y - 1=2\left(x - 5\right)\end{array}[/latex]
To rewrite the equation in slope-intercept form, we use algebra.
The slope-intercept form of the equation of the line is [latex]y=2x - 9[/latex].
Writing the Equation of a Line Using a Graph
So far we have written point-slope form and slope-intercept form of a line when given a point and the slope as well as when given two points. Sometimes the only information we are provided is the graph of the line. Let’s look into how we can write the point-slope form and slope-intercept form of a line when only given a graph.
Look at the graph of the function [latex]f[/latex] given below.
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](0,7)[/latex] and [latex](4,4)[/latex].
If we want to rewrite the equation in the slope-intercept form, we would find
[latex]\begin{array}{ccl} y - 4 & = & -\frac{3}{4}(x - 4) \\ y - 4 & = & -\frac{3}{4}x + 3 \\ y & = & -\frac{3}{4}x + 7 \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 [latex]7[/latex]. 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.
So the function is [latex]f(x)=-\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.
Identify two points on the line.
Use the two points to calculate the slope.
Determine where the line crosses the [latex]y[/latex]-axis to identify the [latex]y[/latex]-intercept by visual inspection.
Substitute the slope and [latex]y[/latex]-intercept into the slope-intercept form of a line equation.
Write an equation for a linear function given a graph of [latex]f[/latex] shown below.
Identify two points on the line, such as [latex](0, 2)[/latex] and [latex](-2, -4)[/latex]. Use the points to calculate the slope.
We can use algebra to rewrite the equation in the slope-intercept form.
[latex]\begin{array}{ccl} y + 4 & = & 3(x + 2) \\ y + 4 & = & 3x + 6 \\ y & = & 3x + 2 \end{array}[/latex]
Writing and Interpreting an Equation for a Linear Function
Now we can choose which method 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. Let’s try a few more examples when we are given the details of a linear function in different ways.
Suppose Ben starts a company in which he incurs a fixed cost of [latex]$1,250[/latex] per month for the overhead, which includes his office rent. His production costs are [latex]$37.50[/latex] per item. Write a linear function [latex]C[/latex] where [latex]C(x)[/latex] is the cost for [latex]x[/latex] items produced in a given month.
The fixed cost is present every month, [latex]$1,250[/latex]. The costs that can vary include the cost to produce each item, which is [latex]$37.50[/latex]. 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(x)=1250+37.5x[/latex]. Analysis If Ben produces [latex]100[/latex] items in a month, his monthly cost is found by substituting [latex]100[/latex] for [latex]x[/latex].
So his monthly cost would be [latex]$5,000[/latex].
If [latex]f[/latex] is a linear function, with [latex]f(3)=−2[/latex], and [latex]f(8)=1[/latex], find an equation for the function in slope-intercept form.
We can write the given points using coordinates.
[latex]f(3) = -2 \rightarrow (3, -2)[/latex]
[latex]f(8) = 1 \rightarrow (8, 1)[/latex]
We can then use the points to calculate the slope.