Coordinate geometry

Gradient of a Line

Turn two points into a slope and see the rise-run triangle that controls the steepness of the line.

Back to topic

Formula

m = (y2 - y1) / (x2 - x1)

Result

Worked substitution


          

Gradient measures how much y changes for each unit change in x.

Read the result

A positive gradient climbs left to right, a negative gradient falls, and a large magnitude means a steep line. A vertical line is not a large slope; it is undefined.

Where it helps

Gradients drive straight-line equations, rates of change, tangent estimates, and quick checks for parallel or perpendicular lines.

Common slip

A zero run gives a vertical line. Do not write 0 as the gradient; the division is not defined.

Try it

Keep A fixed, then move B horizontally. Notice how the run changes the gradient even when the rise stays similar.