There are three steps for writing the equation of the line that contains two points: first, find the slope using m = (y2 - y1) / (x2 - x1) . Then choose either original point to put into point-slope form: y - y1 = m(x - x1) . Lastly, simplify to get y isolated so your line will be in slope intercept form, which is y = mx+b form.