Explanation:
We can use the point-slope form of the equation of a line, which is:
y - y1 = m(x - x1)
where m is the gradient of the line and (x1, y1) is a point that the line passes through.
Substituting the given values, we get:
y - (-2) = 1/2(x - 4)
Simplifying this equation, we get:
y + 2 = 1/2x - 2
y = 1/2x - 4
So the equation of the line is y = 1/2x - 4.