Leave lesson

Pure · Coordinate geometry

1 / 9

Straight lines

The gradient of a line as a constant rate of change, the three forms of a line's equation — y = mx + c, y − y₁ = m(x − x₁), and ax + by + c = 0 — and how to move between them.

Pure · Coordinate geometry

Straight lines

The gradient of a line as a constant rate of change, the three forms of a line's equation — y = mx + c, y − y₁ = m(x − x₁), and ax + by + c = 0 — and how to move between them.

Why it works

A line is straight precisely because its steepness never changes. Pick any two points on it, (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2), and the gradient m=y2y1x2x1=riserunm = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\text{rise}}{\text{run}} comes out the same every time. That single number — change in yy per unit change in xxis the line. Get the order consistent: whichever point's yy you put first on top, its xx must go first on the bottom.

Once you have a gradient and one point, the line is pinned down. The cleanest way to write it is point–gradient form: yy1=m(xx1).y - y_1 = m(x - x_1). This is just the gradient definition rearranged: any other point (x,y)(x, y) on the line satisfies yy1xx1=m\frac{y - y_1}{x - x_1} = m, and multiplying up gives the form above. It works from any point on the line — you don't need the yy-intercept.

Tidy it and you get y=mx+cy = mx + c, where cc is the yy-intercept (the value at x=0x = 0). Multiply out and collect everything on one side and you get the general form ax+by+c=0ax + by + c = 0 with integer coefficients — the form exam mark schemes usually want, and the only one that can describe a vertical line (x=kx = k), which has no gradient and so no "y=mx+cy = mx + c".

To read the gradient straight off ax+by+c=0ax + by + c = 0, rearrange to y=abxcby = -\frac{a}{b}x - \frac{c}{b}: the gradient is ab-\frac{a}{b}, not aa. A horizontal line y=ky = k has gradient 00; a vertical line x=kx = k has an undefined gradient (the run is zero, so you'd divide by 00).-3-2-11234-4-22468(0, 1)(-0.5, 0)xy