Answer: y = -x + 2
The slope - intercept form of equation is given as
y = mx + b
Where m = slope and b = intercept
Step 1: we need to find the slope of the two lines
slope = rise/run
rise = y2 - y1
Run = x2 - x1
Slope = y2 - y1 / x2 - x1
From the given points, let x1 = 0, y1 = 2, x2 = -2 and y2 = 4
Slope = 4 - 2 / -2 - 0)
Slope = 2 / -2
Slope = -1
For a given point
(y - y1) = m(x - x1)
Let x1 = 0 and y2 = 2
(y - 2) = -1(x - 0)
y - 2 = -x + 0
y = -x + 2
Therefore, the equation of the lines (0, 2) and (-2, 4) is y = -x + 2