Explanation of how to do it: (To know: m = slope and b = y-intercept) To write and equation of a line, you first need to have the slope and the y-intercept. From the graph, find the slope, then find the y-intercept, then bring them together to write your equation. The equation must include both of them and have the answer as well.