To write the equation of a line given two points on the line, start by finding the slope. Remember that slope is the change in the y-values over the change in the x-values, or (y2-y1)/(x2-x1). ... Then use point-slope form y-y1=m(x-x1), and plug in the slope you just calculated and one of the given points.