To write the equation of a line, find the slope and the y-intercept, and incorporate them into slope-intercept form. If you do not know the slope and the intercept, you can also use point-slope form, as long as you have the slope and coordinates for one point on the line.Continue Reading
Pick any two coordinates on the line, and use them to find the slope (m) of the line. Take the ordered pairs of the coordinates (x1, y1) (x2, y2), and subtract y1 from y2. Subtract x1 from x2, and divide the difference between the y values by the difference between the x values to calculate the slope. Plug the slope into the basic point-slope form y = mx + b. Put one of the two ordered pairs into the equation as well, and solve for b, which is the y-intercept (the point where the line crosses the y-axis. Write the equation as y = mx + b, with your solutions for slope and y-intercept in the place of m and b, respectively.
Begin with the point-slope template y-y1 = m(x-x1), where (x1, y1) is a point on the line. Plug the known value for m in along with the coordinates for the point.
Test the correctness of either form of linear equation by plugging in the value of one of the known points. Redo your work on the slope or intercept if the equation does not work out correctly.