Form 2 · 10
Form 2 Gradient of a Straight Line: Steepness, Direction and Rise over Run
Form 2 Curriculum: KSSMLearning standard: 10.1.1–10.1.5
The gradient of a straight line is a number that tells you how steep the line is and which way it slopes. It is the vertical distance divided by the horizontal distance.
In this chapter you find the gradient from real objects, from two points, from the x- and y-intercepts, and learn what positive, negative, zero and undefined gradients look like.
What does the gradient of a line tell me?
Think of a wheelchair ramp, a staircase or a road up Genting Highlands. Two things matter: how steep it is, and whether it goes up or down as you move forward.
The gradient measures both with one number. Gradient = vertical distance ÷ horizontal distance.
The vertical distance is often called the rise and the horizontal distance the run. A ramp that rises 1 m over a run of 4 m has gradient 1/4.
A ramp that rises 1 m over a run of 2 m has gradient 1/2, and it is steeper. Why vertical over horizontal and not the other way round?
With this order a steeper slope gives a bigger number and a flat path gives 0, which matches what we feel when we walk. Gradient has no unit, as long as both distances use the same unit.
Worked example
Staircase A has steps 15 cm high and 30 cm deep. Staircase B has steps 18 cm high and 24 cm deep. Which staircase is steeper?
- Gradient of A = 15 ÷ 30 = 1/2 = 0.5.
- Gradient of B = 18 ÷ 24 = 3/4 = 0.75.
- 0.75 > 0.5, so B has the bigger gradient.
Answer: Staircase B is steeper (gradient 3/4 compared with 1/2).
How do I find the gradient from two points?
On a Cartesian plane, take any two points on the line, (x1, y1) and (x2, y2). The rise is the change in y and the run is the change in x, so the formula is m = (y2 − y1)/(x2 − x1).
The letter m stands for gradient. The one rule that matters is order: whichever point you subtract on top, you must subtract the same point underneath.
If you start with point B on top, start with point B underneath too. Then the signs look after themselves.
Swapping both orders gives the same answer, because a negative divided by a negative is positive. If the line passes through the origin, (0, 0) is one of your points and the gradient is simply y ÷ x for any other point on it.
- Label the points (x1, y1) and (x2, y2).
- Rise: work out y2 − y1.
- Run: work out x2 − x1, starting with the same point.
- Divide the rise by the run and simplify the fraction.
Worked example
Find the gradient of the line through A(1, 1) and B(5, 4).
- Take A as (x1, y1) and B as (x2, y2).
- Rise = 4 − 1 = 3.
- Run = 5 − 1 = 4.
- m = 3/4.
- Check the other way round: (1 − 4)/(1 − 5) = (−3)/(−4) = 3/4.
Answer: m = 3/4
How do I find the gradient from the intercepts?
The x-intercept is where the line crosses the x-axis, and the y-intercept is where it crosses the y-axis. Suppose a line crosses the x-axis at (a, 0) and the y-axis at (0, b).
Using the two-point formula, m = (b − 0)/(0 − a) = −b/a. So m = −(y-intercept)/(x-intercept).
The minus sign is part of the formula, not a mistake. Look at the graph: a line that crosses both positive axes must slope down, so its gradient must be negative, and the minus sign makes it so.
When one of the intercepts is negative, the two minus signs can cancel and the gradient becomes positive. Write each intercept with its sign before you put it in the formula.
Worked example
A straight line crosses the x-axis at (4, 0) and the y-axis at (0, 6). Find its gradient.
- x-intercept = 4 and y-intercept = 6.
- m = −(y-intercept)/(x-intercept) = −6/4.
- Simplify: m = −3/2.
- Check with two points: (6 − 0)/(0 − 4) = 6/(−4) = −3/2.
Answer: m = −3/2
What do positive, negative, zero and undefined gradients look like?
Read a graph from left to right, like a sentence. If the line goes up, the gradient is positive.
If it goes down, the gradient is negative. A horizontal line has rise 0, so its gradient is 0 ÷ run = 0.
A vertical line has run 0, and you cannot divide by 0, so its gradient is undefined. Two generalisations help you compare lines.
First, the sign tells you the direction of the slope. Second, the bigger the absolute value of the gradient (the size, ignoring the sign), the steeper the line.
So a line with gradient −4 is steeper than a line with gradient 2, even though −4 is the smaller number.
Worked example
Find the gradient of the line through (2, −1) and (2, 4), and of the line through (−3, 5) and (1, 5).
- First line: run = 2 − 2 = 0. Dividing by 0 is not possible, so the gradient is undefined. The line is vertical.
- Second line: rise = 5 − 5 = 0 and run = 1 − (−3) = 4.
- m = 0/4 = 0. The line is horizontal.
Answer: The first gradient is undefined; the second gradient is 0.
How do I work out the signed gradient of a downhill ramp?
Real objects can be drawn on a grid so that you can measure them. A ramp at the school canteen loading bay is drawn below, with its top at P(1, 5) and its bottom at Q(7, 2), in metres.
Going from left to right the ramp goes down, so you expect a negative answer. You do not need to remember to add the minus sign yourself.
If you keep the same subtraction order for the rise and the run, the sign appears on its own. Then use the sign as a check: a downhill line must give a negative gradient.
The size of the answer, 1/2, means the ramp drops 1 m for every 2 m you move across.
Worked example
Find the gradient of the ramp from P(1, 5) to Q(7, 2).
- Take P as (x1, y1) and Q as (x2, y2).
- Rise = 2 − 5 = −3 (the ramp drops 3 m).
- Run = 7 − 1 = 6.
- m = −3/6 = −1/2.
- Check with Q first: (5 − 2)/(1 − 7) = 3/(−6) = −1/2. The ramp goes down, so a negative answer makes sense.
Answer: m = −1/2
How do I solve problems with gradient, and where does it lead?
Some problems give you the gradient and ask for a missing coordinate. Put what you know into the formula, keep the unknown as a letter, and solve the linear equation.
Check by putting your answer back in. Gradient is used a lot later on.
In Form 3 Straight Lines, m is the number in front of x in y = mx + c, and you find it with the same formulas. In Form 4 Graphs of Motion, the gradient of a distance-time graph is the speed, and the gradient of a speed-time graph is the acceleration.
Worked example
A straight line passes through A(2, k) and B(6, 1). Its gradient is −1/2. Find the value of k.
- m = (1 − k)/(6 − 2) = (1 − k)/4.
- Set it equal to the gradient: (1 − k)/4 = −1/2.
- Multiply both sides by 4: 1 − k = −2.
- So k = 3.
- Check: (1 − 3)/(6 − 2) = −2/4 = −1/2.
Answer: k = 3
Common mistakes
What gets written Gradient through (2, 3) and (6, 11) = (6 − 2)/(11 − 3) = 1/2
Why it happens The run was put on top. It is easy to mix up because the points are written with x first.
How to catch it Say "rise over run" and write the y-values on top: (11 − 3)/(6 − 2) = 8/4 = 2.
What gets written Gradient through (1, 7) and (4, 1) = (1 − 7)/(1 − 4) = 2
Why it happens The subtraction order changed halfway: the second point first on top, but the first point first underneath.
How to catch it Start with the same point on top and underneath: (1 − 7)/(4 − 1) = −6/3 = −2. The line falls from left to right, so a negative answer fits.
What gets written x-intercept 3 and y-intercept 6, so m = 6/3 = 2
Why it happens The minus sign in m = −(y-intercept)/(x-intercept) was left out.
How to catch it m = −6/3 = −2. Sketch it: a line crossing both positive axes slopes down, so the gradient must be negative.
What gets written Run from (−2, 5) to (4, −1) = 4 − 2 = 2
Why it happens Subtracting a negative number was treated as subtracting a positive one.
How to catch it Use brackets: 4 − (−2) = 4 + 2 = 6. Count the squares on the grid as a check.
What gets written A vertical line has gradient 0.
Why it happens Horizontal and vertical were mixed up, or 0 ÷ something and something ÷ 0 were treated as the same.
How to catch it A horizontal line has rise 0, so m = 0. A vertical line has run 0, and you cannot divide by 0, so m is undefined.
For parents
You can help without working out any gradients yourself. Ask your child to point at the graph and say whether the line goes up or down from left to right, then whether the answer should be positive or negative.
Next, ask them to show you the rise and the run by counting squares. If they can do both, the idea is secure and any slip is in the subtraction, often with negative numbers.
If they hesitate over which distance goes on top, that is the step to practise. If the same step keeps going wrong even after practice, for example the signs with negative numbers, a one-to-one lesson lets a teacher see exactly where your child's working slips and fix that step together.
Share with a parent or teacher
Source:DSKP KSSM Mathematics Form 2 (English version)· DSKP KSSM Matematik Tingkatan 2 (Bahasa Melayu)
Ask a teacher about this
One pupil, one teacher, online. Lessons in English or Bahasa Melayu.
Book a Trial ClassOne-hour paid trial · Same-day reply · from RM50/hr
Frequently asked questions
Does it matter which point I call (x1, y1)?
No. Either point can come first.
What matters is that you use the same point first on the top and on the bottom of the fraction. Both choices give the same gradient.
Why is the gradient of a vertical line undefined and not 0?
A vertical line has no horizontal distance, so the run is 0. Gradient is rise ÷ run, and dividing by 0 has no answer.
A horizontal line is the one with gradient 0, because its rise is 0.
Is a gradient of −3 steeper than a gradient of 2?
Yes. Steepness depends on the size of the gradient, ignoring the sign.
3 is bigger than 2, so the line with gradient −3 is steeper. The minus sign only tells you it slopes down.
Why is there a minus sign in the intercept formula?
Joining (a, 0) and (0, b) gives m = (b − 0)/(0 − a) = −b/a. The minus comes from 0 − a in the run.
It makes a line that crosses both positive axes slope down, as it should.
Ask a teacher about this
One pupil, one teacher, online. Lessons in English or Bahasa Melayu.
Book a Trial ClassOne-hour paid trial · Same-day reply · from RM50/hr