Carola S. answered 03/21/19
Student at Purdue University
The equation of a line is y = (m•x) + b
y - the y coordinate of a point on the line (usually your output)
m - the slope of the line
x - the x coordinate of a point on the line (usually your input)
b - the y intercept of the line (where the line crosses the y axis, when x = 0)
To calculate the slope, the formula is (y2 - y1) ÷ (x2 - x1). A general rule of thumb is the slope = rise ÷ run, or the change in y divided by the change in x between two points.
Here, we'll made (-6, -5) point 1 and (-4, -4) point 2. So, to solve for your slope, you would do:
(-4 - (-5)) ÷ (-4 - (-6))
This would evaluate to 1 ÷ 2, so your slope is 1/2 or 0.5. Now your equation is y = (1/2 • x) + b. To find b, simply pick one of your points, input the x and y values into their respective places in the equation, and solve for b. Here, let's pick point 2 to solve:
-4 = (1/2 • (-4)) + b
-4 = -2 + b
b = -2
So, your intercept is -2 and your final equation looks like this:
y = (1/2 • x) - 2