Suppose that we have the graph of a straight line and that we wish to find its equation. (We will assume that the graph has x and y axes and a linear scale.) The equation can be expressed in several possible forms. To find the equation of the straight line in any form we must be given either: two points, (x1, y1) and (x2, y2), on the line; or one point, (x1, y1), on the line and the slope, m; or the y intercept, b, and the slope, m. In the first case where we are given two points, we can find m by using the formula:
Once we have one form we can easily get any of the other forms from it using simple algebraic manipulations. Here are the forms:
1. The slope-intercept form: y = m x + b. The constant b is simply the y intercept of the line, found by inspection. The constant m is the slope, found by picking any two points (x1, y1) and (x2, y2) on the line and using the formula:
2. The point-slope form: y − y1 = m (x − x1). (x1, y1) is a point on the line. The slope m can be found from a second point, (x2, y2), and using the formula:
3. The general form: a x + b y + c = 0. a, b and c are constants. This form is usually gotten by manipulating one of the previous two forms. Note that any one of the constants can be made equal to 1 by dividing the equation through by that constant.