Inactive Tutor answered 09/19/19
Hello Q,
There are several different ways of writing this equation. Remember an equation is something that is equal on both sides and will work for all x and all y. So you can test your equation with any x and any y.
The easiest equation to use is
y = mx + b
y = y
x= x
m = Slope (the rise over run of a line. Or how much does the line go up or down based on how much you move left or right)
b = Y intercept (what is the value of Y, when X = 0)
The equation for slope (m) is m = (y2-y1) / (x2-x1) = (0-4) / (2 - -6) = -4 / 8 = -1/2
Now to find the intercept. So right now our equation looks like:
y = -1/2 x + b
Remember an equation has to work for every point in that line, so we can plug in either point and solve for b. In this case, we will use (2,0)
0 = -1/2 (2) + b
0 = -1 + b
1 = b
So our y intercept is b, plug this back into our slope-intercept question and we get:
y = -1/2 x + 1
Hope this helps, please let me know if anything is unclear.