-- From x=-1 to x=1 (a distance of 2 units), the line rises by 1 unit. So the slope of the line is (change in y)/(change in x) = 1 unit/2 units = 0.5 .
-- The line intercepts the y-axis at the place where y= 0.5 .
-- The "slope/intercept" form of the equation of a line is
Y = (slope) · x + (y-intercept)
So you can take the slope and the intercept of the line, write them straight into this form of the equation, and you'll HAVE the equation of the line:
Y = (0.5) · x + 0.5