The Gradient of a Line

The gradient (or slope) of a straight line measures how steep it is: how far the line climbs for every step you take across it. Take any two points on the line, (x_1, y_1) and (x_2, y_2). The gradient m is the change in height (the rise) divided by the change across (the run):

m = \frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1}

A positive gradient means the line climbs as you read it from left to right; a negative gradient means it falls; and a gradient of zero means the line is perfectly flat.

The gradient in a nutshell

Reading the rise and the run

Here is the line through (1, 1) and (5, 4). Step the figure to see the run (how far you move across) and the rise (how far you climb). Going from the first point to the second, you move 4 across and 3 up, so

m = \frac{\text{rise}}{\text{run}} = \frac{3}{4}.