Use rise over run to determine the slope of the equation.
Rise over run uses the following formula:
y2 - y1 / x2 - x1
Plug in your points' values into this formula.
[tex] \frac{-8 - 1}{5-2} = \frac{-9}{3} = -3[/tex]
Use the slope to find the y-intercept of the equation. Take a point on the line, and apply the slope to it to find the y-intercept.
Take the point (2,1) and subtract the x-value so that it equals 0.
[tex]2 - 2 = 0[/tex]
Since we moved the point back by 2, we'll multiply our slope by -2, and add the result to the y-value to find our new point.
[tex](-2 * -3) + 1 = 6 + 1 = 7[/tex]
Our new point is now (0,7). Since x = 0, the y-value will be our y-intercept. The y-intercept is 7.
Slope-intercept form uses the following formula:
[tex]y = mx + b[/tex]
m is your slope, and b is your y-intercept. We have already found those values, so plug them into the formula.
The following equation is your answer:
[tex]y = -3x + 1[/tex]