Analytic (Coordinate) Geometry

the equation of a line

A straight line on the plane is an infinite collection of points, but you can capture all of them in a single short equation — a rule that the coordinates (x, y) of a point obey if and only if the point lies on the line. There are several standard ways to write that rule, each convenient for different information you happen to have.

The most-used is slope-intercept form, y = m x + b, where m is the slope and b is the y-intercept (the height at which the line crosses the y-axis, i.e. the value of y when x = 0). If instead you know the slope m and one point (x_1, y_1), use point-slope form: y - y_1 = m (x - x_1) — read it as 'rise equals slope times run, measured from the known point.' If you know two points, first compute the slope from them, then feed it and either point into point-slope form (this is the two-point method). Finally, every line can be written in general form A x + B y + C = 0 with A, B, C constants and A, B not both zero; this is the only form that also covers a vertical line (where B = 0, e.g. x = 3) and a horizontal line (where A = 0, e.g. y = 5), which slope-intercept form cannot express.

These forms are interchangeable — algebra carries you from any one to any other — so pick whichever matches your data and convert as needed. The deep point is that 'first-degree' (linear) equations, those with x and y only to the first power and no products like x y, are exactly the equations whose graphs are straight lines; the moment you square a variable you leave the world of lines and enter curves.

Find the line through (2, 1) and (4, 7). Slope m = (7 - 1)/(4 - 2) = 3. Point-slope from (2, 1): y - 1 = 3(x - 2). Expand to slope-intercept: y = 3x - 5. Rearrange to general form: 3x - y - 5 = 0. All three describe the very same line.

Slope-intercept, point-slope, and general form are three outfits on one line.

Slope-intercept form y = m x + b cannot represent a vertical line, because a vertical line has undefined slope; write it as x = constant (a special case of the general form). Do not force every line into y = m x + b.

Also called
slope-intercept formpoint-slope formgeneral formlinear equation斜截式點斜式一般式