Gradient of a Line
The gradient of a line measures its steepness: the rise divided by the run, \(m = \frac{\text{rise}}{\text{run}}\). This NSW Year 9 Core maths subtopic is Stage 5 Core content under NESA outcome MA5‑LIN‑C‑01.
You will tell whether a gradient is positive or negative from a graph, find gradients from a rise and run and from two points, such as \((-2,-2)\) and \((1,4)\), and see why a horizontal line has gradient \(0\) and a vertical line's gradient is undefined. You will compare the steepness of two lines, find the gradient of a side of a shape on the plane and of a road, work out how high a ramp with gradient \(\frac{1}{12}\) rises, find a missing coordinate, and show that three points lie on one line. It is part of Year 9 Core Straight Line.
Theory
The gradient of a line measures how steep it is: the rise divided by the run. This Year 9 maths page shows how to find a gradient from a graph or from two points, how to tell positive from negative gradients, why horizontal lines have gradient \(0\) and vertical lines have an undefined gradient, and how gradient is used for ramps and roads.
The gradient of a line, written \(m\), tells you how steep it is. It is the rise (how far up) divided by the run (how far across to the right).
Read a line from left to right. If it goes up, the gradient is positive. If it goes down, the gradient is negative. The bigger the number (ignoring the sign), the steeper the line.
A horizontal line has no rise, so its gradient is \(0\). A vertical line has no run, and dividing by \(0\) is impossible, so its gradient is undefined.
A straight line has the same gradient everywhere, so any two points on it give the same answer.
For the points \((x_1, y_1)\) and \((x_2, y_2)\):
How to find the gradient of a line
- Look at the line from left to right and predict the sign: up is positive, down is negative.
- Choose two points on the line. On a graph, use points on grid corners.
- Find the rise (\(y_2 - y_1\)) and the run (\(x_2 - x_1\)), subtracting in the same order.
- Divide rise by run and simplify the fraction.
- Check the sign against your prediction.
Put the rise on top and the run underneath, then simplify.
| \(m\) | \(=\) | \(\dfrac{\text{rise}}{\text{run}}\) |
| \(\) | \(=\) | \(\dfrac{9}{6}\) |
| \(\) | \(=\) | \(\mathbf{\dfrac{3}{2}}\) |
A gradient of \(\dfrac{3}{2}\) means the line rises \(3\) for every \(2\) across.
Subtract the \(y\)-values for the rise and the \(x\)-values for the run, in the same order.
| \(\text{rise}\) | \(=\) | \(-3 - 5 = -8\) |
| \(\text{run}\) | \(=\) | \(3 - (-1) = 4\) |
| \(m\) | \(=\) | \(\dfrac{-8}{4} = \mathbf{-2}\) |
The gradient is negative, so the line falls from left to right, which matches the sketch.
(i) \(P(1,-2)\) and \(Q(6,-2)\)
(ii) \(R(4,1)\) and \(S(4,9)\).
| \(\text{(i)}\ m\) | \(=\) | \(\dfrac{-2 - (-2)}{6 - 1} = \dfrac{0}{5} = \mathbf{0}\) |
| \(\text{(ii)}\ m\) | \(=\) | \(\dfrac{9 - 1}{4 - 4} = \dfrac{8}{0}\) |
(i) The rise is \(0\), so the line is horizontal and its gradient is \(0\).
(ii) The run is \(0\). Dividing by \(0\) is impossible, so the gradient is undefined. The line is vertical.
Find the gradient of \(AB\) and of \(BC\). If they are equal, the two intervals slope the same way through the shared point \(B\).
| \(m_{AB}\) | \(=\) | \(\dfrac{1 - 7}{1 - (-2)} = \dfrac{-6}{3} = -2\) |
| \(m_{BC}\) | \(=\) | \(\dfrac{-3 - 1}{3 - 1} = \dfrac{-4}{2} = -2\) |
The gradients are equal and \(B\) is on both intervals, so the points are collinear (on one line).
Common pitfalls
Frequently asked questions
How do you find the gradient of a line?
Divide the rise by the run. From two points, \(m = \dfrac{y_2 - y_1}{x_2 - x_1}\).
What does a negative gradient mean?
The line goes down as you move from left to right. A gradient of \(-2\) means the line falls \(2\) units for every \(1\) unit across.
What is the gradient of a horizontal line?
Zero. A horizontal line has no rise, so rise divided by run is \(0\).
Why is the gradient of a vertical line undefined?
A vertical line has a run of \(0\), and you cannot divide by \(0\). So the gradient of a vertical line is undefined.
How do you know which line is steeper?
Compare the gradients, ignoring the sign. A line with gradient \(3\) is steeper than a line with gradient \(\dfrac{1}{2}\), and a line with gradient \(-3\) is just as steep as one with gradient \(3\).