- Find the equation of the line.
The Equation of a Line
When data is collected, a linear model can be created from two data points. Let’s see how to find an equation of a line when two points are given by following the steps below.
- Find the slope using the given points.
- Choose one point and label its coordinates [latex](x_1, y_1)[/latex].
- Plug [latex]m[/latex], [latex]x_1[/latex], and [latex]y_1[/latex] into the point-slope form, [latex]y - y_1 = m(x - x_1)[/latex].
- Rewrite the equation in slope-intercept form, [latex]y = mx+b[/latex].
- Calculate the slope.
[latex]\begin{align*} m &= \frac{y_2 - y_1}{x_2 - x_1} \\ &= \frac{-5 - (-3)}{1 - (-4)} \\ &= \frac{-5 + 3}{1 + 4} \\ &= \frac{-2}{5} \end{align*}[/latex]
- Let’s use [latex](-4, -3)[/latex] as [latex](x_1, y_1)[/latex].
- Plug the values above into the point-slope form of the equation [latex]y - y_1 = m(x - x_1)[/latex].
[latex]\begin{align*} y - (-3) &= -\frac{2}{5}(x - (-4)) \\ y + 3 &= -\frac{2}{5}(x + 4) \end{align*}[/latex]
- Simplify to the slope-intercept form, [latex]y = mx+b[/latex].
[latex]\begin{align*} y + 3 &= -\frac{2}{5}x - \frac{2}{5} \cdot 4 \\ y + 3 &= -\frac{2}{5}x - \frac{8}{5} \\ y &= -\frac{2}{5}x - \frac{8}{5} - 3 \\ y &= -\frac{2}{5}x - \frac{8}{5} - \frac{15}{5} \\ y &= -\frac{2}{5}x - \frac{23}{5} \end{align*}[/latex]
So, the equation of the line is:
[latex]y = -\dfrac{2}{5}x - \dfrac{23}{5}[/latex]