The equation of a straight line can be represented in the slope-intercept form, y = mx + c
Where c = y intercept
m represents the slope of the line.
m = (y2 - y1)/(x2 - x1)
y2 = final value of y
y 1 = initial value of y
x2 = final value of x
x1 = initial value of x
The line passes through (- 2, - 8) and (0, 2),
y2 = 2
y1 = - 8
x2 = 0
x1 = - 2
Slope,m = ( 2 - - 8)/(0 - - 2) = 10/2 = 5
To determine the y intercept, we would substitute x = 0, y = 2 and m = 5 into y = mx + c. It becomes
2 = 5 × 0 + c
2 = 0 + c
c = 2
c = - 8
The equation becomes
y = 5x + 2