Gradient of a Line
Gradient measures steepness: \(m = \dfrac{\text{rise}}{\text{run}} = \dfrac{y_2 - y_1}{x_2 - x_1}\). Lines that rise to the right have a positive gradient, horizontal lines have gradient \(0\) and vertical lines have no defined gradient. This NSW Year 9 Advanced maths subtopic calculates gradients (NESA outcome MA5‑LIN‑C‑01).
You will find gradients from points and graphs, compare the steepness of two lines, and find the gradient of a road and the rise of a ramp. You will show that three points are collinear, find an unknown coordinate from a gradient, use gradients to show a quadrilateral is a parallelogram, explain the gradient of a draining tank's graph, and test a driveway against a council rule. It is part of Year 9 Advanced Coordinate Geometry and Graphs.
Theory
The gradient of a line measures its steepness: rise over run. A line going uphill from left to right has a positive gradient and a line going downhill has a negative gradient. This Year 9 Advanced maths page covers the gradient formula, zero and undefined gradients, gradients as rates with units, parallel lines and finding an unknown coordinate.
The gradient \(m\) of a line is how far it goes up for each unit it goes across: \(m = \dfrac{\text{rise}}{\text{run}}\).
The run is the change in \(x\) and the rise is the change in \(y\), going from one point to another. A rise downwards is negative.
Read a line from left to right. Going uphill gives a positive gradient and going downhill a negative one. A bigger number, ignoring the sign, means a steeper line.
A horizontal line has a rise of \(0\), so its gradient is \(0\). A vertical line has a run of \(0\); dividing by \(0\) is impossible, so its gradient is undefined.
A straight line has the same gradient everywhere. So parallel lines have equal gradients, and three points lie on one line (they are collinear) when the gradients between them are equal.
In a real context the gradient is a rate, with units: litres per hour, dollars per kilogram, metres per metre.
For the points \((x_1,y_1)\) and \((x_2,y_2)\):
| Line | Gradient |
|---|---|
| rises to the right | positive |
| falls to the right | negative |
| horizontal (\(y = c\)) | \(0\) |
| vertical (\(x = k\)) | undefined |
How to find a gradient
- Choose two points on the line, reading them carefully from a graph if needed.
- Subtract in the same order: rise \(= y_2 - y_1\) and run \(= x_2 - x_1\).
- Divide rise by run and simplify the fraction.
- Check the sign against the picture: uphill positive, downhill negative.
Problems built on gradients
- Steeper line: compare the sizes of the gradients, ignoring signs.
- Unknown coordinate: write rise over run with the unknown in it, set it equal to the given gradient and solve (Example 3). If the unknown is in both coordinates, multiply both sides by the bracket first.
- Parallel sides: show a quadrilateral is a parallelogram by showing both pairs of opposite sides have equal gradients.
- Collinear points: find \(m_{AB}\) and \(m_{BC}\). Equal gradients and a shared point \(B\) mean one straight line.
- Rates: label the units of the rise and the run; the gradient is rise units per run unit (Example 2).
- Ramps, roads and driveways: put the rise and run in the same unit. Use rise \(= m \times\) run or run \(= \dfrac{\text{rise}}{m}\), and compare fractions to decide whether a limit is met (Example 4).
- Pronumerals: the rule is the same. Cancel a common factor only when it cannot be zero.
Go from \(A\) to \(B\). The rise is the change in \(y\) and the run is the change in \(x\).
| \(\text{rise}\) | \(=\) | \(-2-4 = -6\) |
| \(\text{run}\) | \(=\) | \(5-(-3) = 8\) |
| \(m\) | \(=\) | \(\dfrac{-6}{8} = \mathbf{-\dfrac{3}{4}}\) |
The line goes downhill from left to right, so a negative gradient makes sense. Going from \(B\) to \(A\) instead gives \(\dfrac{6}{-8}\), the same value.
| \(m\) | \(=\) | \(\dfrac{34-82}{5-1}\) |
| \(\) | \(=\) | \(\dfrac{-48}{4} = \mathbf{-12}\) |
The rise is in per cent and the run is in hours, so the gradient is in per cent per hour. The battery loses \(12\%\) of its charge every hour. The negative sign means it is going down.
Parallel lines have equal gradients. Find the gradient of \(RS\) first.
| \(m_{RS}\) | \(=\) | \(\dfrac{7-1}{1-(-3)} = \dfrac{6}{4} = \dfrac{3}{2}\) |
Now write the gradient of \(PQ\) with \(k\) in it and set it equal.
| \(\dfrac{7-(-2)}{4-k}\) | \(=\) | \(\dfrac{3}{2}\) |
| \(\dfrac{9}{4-k}\) | \(=\) | \(\dfrac{3}{2}\) |
| \(3(4-k)\) | \(=\) | \(18\) |
| \(4-k\) | \(=\) | \(6\) |
| \(k\) | \(=\) | \(\mathbf{-2}\) |
Check: \(P(-2,-2)\) to \(Q(4,7)\) is rise \(9\), run \(6\), so \(m = \dfrac{9}{6} = \dfrac{3}{2}\).
(i) Find its gradient as a fraction in simplest form.
(ii) Does it meet the code?
(iii) What horizontal distance would a \(45\) cm rise need?
Put both lengths in the same unit first: \(5.4\text{ m} = 540\text{ cm}\).
(i)
| \(m\) | \(=\) | \(\dfrac{45}{540} = \mathbf{\dfrac{1}{12}}\) |
(ii) Compare with the code. \(\dfrac{1}{12} > \dfrac{1}{14}\), because a smaller run for the same rise is steeper. The ramp is too steep.
(iii) The steepest allowed ramp has \(\dfrac{\text{rise}}{\text{run}} = \dfrac{1}{14}\).
| \(\dfrac{45}{\text{run}}\) | \(=\) | \(\dfrac{1}{14}\) |
| \(\text{run}\) | \(=\) | \(45\times 14 = 630\text{ cm}\) |
| \(\) | \(=\) | \(\mathbf{6.3}\text{ m}\) |
Common pitfalls
Frequently asked questions
How do you find the gradient of a line?
Pick two points on the line. Subtract the \(y\)-values to get the rise and the \(x\)-values, in the same order, to get the run. The gradient is \(\dfrac{\text{rise}}{\text{run}}\).
What is the gradient formula?
For the points \((x_1,y_1)\) and \((x_2,y_2)\), \(m = \dfrac{y_2-y_1}{x_2-x_1}\).
What does a negative gradient mean?
The line goes downhill as you read from left to right. In a real situation, the quantity on the vertical axis is decreasing.
Why is the gradient of a vertical line undefined?
On a vertical line the run between any two points is \(0\), and you cannot divide by \(0\). So a vertical line has no gradient.
How do you know if two lines are parallel?
Work out the gradient of each line. Parallel lines have equal gradients.
What are the units of a gradient?
The units of the vertical axis per unit of the horizontal axis. For litres against hours, the gradient is in litres per hour.