Lantern Tutor Sign in

Maths · 4 Coordinate geometry

4.2 Gradient of linear graphs

Before you start

  • Plotting and reading coordinates (x,y), including negative ones (4.1).
  • Reading the scale on a graph axis when one square does not stand for one unit.
  • Subtracting a negative number: 4−(−3)=7.
  • Simplifying a fraction, and the sign rules for dividing: −6−4=32 and −64=−32.
Syllabus objectives covered (2)
  • Find the gradient of a straight line.
  • Calculate the gradient of a straight line from the coordinates of two points on it.

Part 1 of 6

What a gradient measures

  1. The gradient of a straight line is one number that says how steep the line is. It tells you how far the line goes up for every 1 unit it goes across.
  2. To measure it, take any two points on the line. Between them, the line moves across by some amount and up (or down) by some amount. The gradient is the vertical change divided by the horizontal change.
    gradient=change in ychange in x=riserun
  3. Read it as a rate. A gradient of 2 means the line goes up 2 for every 1 across. A gradient of 12 means it goes up 12 for every 1 across, which is the same as up 1 for every 2 across.
  4. The vertical change goes on top. The reason is in the definition: the gradient answers 'how much up per one across', so 'up' is the quantity being shared out and 'across' is what it is shared over.
  5. A straight line is equally steep everywhere along it. So every pair of points on the same line gives the same gradient. That is good news: you are free to choose the two points that are easiest to read.
  6. When the axes measure real quantities, the gradient has units: the y-units per x-unit. If y is in litres and x is in hours, a gradient of 3 means 3 litres per hour.

Part 2 of 6

The sign says which way, the size says how steep

  1. Always read a line from left to right, the way you read text. Every rule about the sign depends on this.
    graph diagram — not drawn yet

    One pair of axes with four straight lines through different points: one rising from left to right labelled 'positive', one falling from left to right labelled 'negative', one horizontal labelled 'zero', and one vertical labelled 'undefined'.

    Read each line left to right. Going up is positive, going down is negative, flat is zero, and a vertical line has no gradient you can calculate.
  2. A line that goes up from left to right has a positive gradient. Its rise is positive and its run is positive.
  3. A line that goes down from left to right has a negative gradient. As you move right, y decreases, so the rise is negative.
  4. A horizontal line has gradient 0. It goes across without going up at all, so the rise is 0, and 0 divided by any run is 0.
  5. A vertical line has no gradient you can calculate. It goes up without going across, so the run is 0, and you cannot divide by 0. Its gradient is said to be undefined.
  6. Steepness comes from the size of the gradient, ignoring the sign. A line with gradient −3 is steeper than a line with gradient 2, because 3 is bigger than 2. The minus sign tells you only that the first line goes down.

Part 3 of 6

Finding the gradient of a line drawn on a grid

  1. Choose two points where the line passes exactly through a grid intersection, where a vertical gridline and a horizontal gridline cross. At these points you read the coordinates exactly instead of estimating them.
  2. Choose them far apart. A small error in reading a point matters less when the rise and run are large.
  3. Draw a right-angled triangle with the line as its sloping side: a horizontal side from the left point, and a vertical side up or down to the right point.
    graph diagram — not drawn yet

    A grid with equal scales on both axes and a straight line rising through the grid points (-2, -1) and (4, 2); a right-angled triangle drawn below the line between these points, with the horizontal side labelled 'run = 6' and the vertical side labelled 'rise = 3'.

    The line is the sloping side. Rise over run is 36=12.
  4. Measure the two sides in axis units, not in squares. The run is the difference of the two x-values; the rise is the difference of the two y-values.
  5. Divide the rise by the run, then give the answer the sign that matches the direction of the line: positive if it goes up from left to right, negative if it goes down.
  6. Check the size. When both axes use the same scale, a line steeper than 45∘ has a gradient bigger than 1 in size, and a gentler line has a gradient between 0 and 1 in size. If your answer disagrees with the picture, look again.

Part 4 of 6

Squares are not units: reading the scales

  1. A graph may need different scales on its two axes, because the two quantities are measured in different units. One square across might be 2 seconds while one square up is 10 metres.
  2. Take a line that rises 3 squares while it goes 3 squares across on that grid. It looks like a 45∘ line, and counting squares would give a gradient of 1. That is wrong.
    graph diagram — not drawn yet

    A grid where the horizontal axis is time in seconds with one square = 2 s and the vertical axis is distance in metres with one square = 10 m; a straight line through (0, 0) and (6, 30), with a right-angled triangle whose sides are labelled '3 squares = 6 s' and '3 squares = 30 m'.

    The triangle looks like a 45∘ triangle, but its sides are 30 m and 6 s, so the gradient is 5, not 1.
  3. Convert each side into the units of its own axis. The rise is 3×10=30 metres. The run is 3×2=6 seconds. The gradient is 306=5, which is 5 metres per second.
  4. The lesson: how steep a line looks depends on the scales someone chose for the axes. The gradient does not. It is always the change in the y-quantity divided by the change in the x-quantity.

Part 5 of 6

The gradient from two coordinates

  1. Without a graph, you can still build the same triangle in your head. Call the two points (x1,y1) and (x2,y2). Between them, the run is x2−x1 and the rise is y2−y1.
  2. Put the rise over the run:
    m=y2−y1x2−x1
  3. The letter m is the usual symbol for a gradient. This formula is not on the List of formulas printed in Papers 2 and 4, so you must know it.
  4. It does not matter which point you call point 1. What matters is that you use the same order on the top and on the bottom: if you start with point 2 on top, start with point 2 on the bottom too.
  5. Here is why. For (1,3) and (4,9): 9−34−1=63=2. The other way round: 3−91−4=−6−3=2. Reversing both subtractions flips both signs, and the two sign changes cancel.
  6. Reversing only one of them flips the sign of the answer, so a line that goes up would come out with a negative gradient. Write the formula down before you substitute, and you will keep the order.
  7. Because a straight line has the same gradient everywhere, gradients can test whether three points P, Q and R lie on one straight line. Work out the gradients of PQ and QR. If they are equal, the three points are on one line, because the two pieces share the point Q and slope the same way. If they are different, the points are not on one line.

Part 6 of 6

Negative coordinates, fractions and the two special lines

  1. The formula itself is short; the work is in the signs. When you substitute a negative coordinate, put it in brackets: 2−(−3), not 2−−3.
  2. Then subtracting a negative is adding: 2−(−3)=2+3=5. A quick check: going from x=−3 to x=2 is a move of 5 units to the right, so the run must be 5.
  3. Simplify the fraction at the end. −64 becomes −32, which you may also write as −1.5. A negative over a positive is negative; a negative over a negative is positive: −6−4=32.
  4. A gradient that is not a whole number may be given as a fraction or as a decimal, but not as a mixture of the two in one answer. 1.52 is not a finished answer; 34 or 0.75 is.
  5. **Same y-values**, as in (−5,2) and (3,2): the top of the fraction is 0, so the gradient is 0. The line is horizontal.
  6. **Same x-values**, as in (4,1) and (4,7): the bottom of the fraction is 0. You cannot divide by 0, so there is no gradient to calculate. The line is vertical.
  7. Before you calculate, picture where the two points are. If the right-hand point is lower than the left-hand point, the line goes down, so your answer must be negative. This two-second check catches a wrong sign before you write it down.
  8. This subtopic is not on the list of calculator-only content, so it can be examined on Paper 2, where no calculator is allowed. Practise doing the subtraction and the simplifying by hand.

Worked examples

Example 1. A straight line is drawn on a grid where one square is 1 unit on both axes. It passes exactly through the grid points (−2,−1) and (4,2). Find the gradient of the line.

Show the working
  1. These two points are on grid intersections and far apart, so they are good points to use. Draw the triangle with the horizontal side from (−2,−1) and the vertical side up to (4,2).
  2. The run is the change in x: from −2 to 4 is 4−(−2)=6 units.
  3. The rise is the change in y: from −1 to 2 is 2−(−1)=3 units. The line goes up from left to right, so the rise is positive.
  4. Divide the rise by the run.
    gradient=36=12
  5. Check the size. The scales are equal and the line is gentler than 45∘ (it goes across 6 but up only 3), so a gradient between 0 and 1 is what you expect.

Answer: The gradient is 12 (or 0.5).

Example 2. A graph shows the volume of fuel, F litres, in a generator's tank t hours after it is switched on. On the horizontal axis, one square is 2 hours. On the vertical axis, one square is 5 litres. The straight line starts at F=30 when t=0 and meets the horizontal axis at t=12. Find the gradient of the line and state what it means.

Show the working
  1. Use the two points where the line meets the axes: (0,30) and (12,0). They are easy to read and far apart.
  2. On the grid, the line goes down 6 squares while it goes 6 squares across. Counting squares would give −1. Do not do that: the two axes have different scales.
  3. Convert to axis units. The run is 12−0=12 hours. The rise is 0−30=−30 litres. It is negative because the line goes down from left to right.
  4. Divide the rise by the run.
    gradient=−3012=−2.5
  5. Give the units: litres per hour. A gradient of −2.5 litres per hour means the volume of fuel goes down by 2.5 litres every hour.

Answer: The gradient is −2.5 litres per hour: the generator uses 2.5 litres of fuel each hour.

Example 3. Calculate the gradient of the straight line through P(−3,5) and Q(2,−5).

Show the working
  1. First picture the points. Q is to the right of P and lower down, so the line goes down from left to right. Expect a negative answer.
  2. Write the formula, then substitute with P as point 1 and Q as point 2. Put brackets round the negative x-value.
    m=y2−y1x2−x1=−5−52−(−3)
  3. Top: −5−5=−10. Bottom: 2−(−3)=2+3=5.
  4. Divide.
    m=−105=−2
  5. Check by taking the points the other way round: 5−(−5)−3−2=10−5=−2. The same answer, and negative, as the picture said.

Answer: m=−2

Example 4. The straight line through A(1,k) and B(7,10) has gradient 23. Find the value of k.

Show the working
  1. The formula works in both directions. Here you know the gradient and one coordinate is missing, so write the formula with the letter in it and set it equal to the gradient.
  2. Use A as point 1 and B as point 2.
    10−k7−1=23
  3. The bottom is 7−1=6, so the equation is 10−k6=23.
  4. Multiply both sides by 6 to clear the fraction, because 6 is what 10−k is being divided by.
    10−k=4
  5. So k=10−4=6.
  6. Check: the gradient of the line through (1,6) and (7,10) is 10−67−1=46=23. Correct.

Answer: k=6

Where people go wrong

Mistake: Dividing the change in x by the change in y (run over rise).

Instead: The change in y goes on top: gradient =riserun.

The gradient measures how far the line goes up for each 1 unit across. Run over rise gives the reciprocal: 12 where the answer is 2.

Mistake: Counting squares on a graph whose two axes have different scales.

Instead: Convert each side of the triangle into the units of its own axis, then divide.

One square can mean 2 hours across and 5 litres up. In the fuel example, counting squares gives −1, but the true gradient is −2.5 litres per hour.

Mistake: Subtracting the y-values in one order and the x-values in the other, as in y2−y1x1−x2.

Instead: Whichever point comes first on the top, it comes first on the bottom too.

Reversing only one subtraction flips the sign of the answer, so a line that goes down comes out positive.

Mistake: Writing 2−(−3) as −1.

Instead: Put the negative in brackets, then subtracting a negative is adding: 2−(−3)=2+3=5.

Going from x=−3 to x=2 is a move of 5 units to the right. A run of −1 would put the second point to the left of the first.

Mistake: Giving a positive gradient for a line that goes down from left to right, because the sides of the triangle are lengths and lengths are positive.

Instead: Read the line from left to right. If it goes down, the rise is negative and so is the gradient.

The gradient records direction as well as steepness. The side lengths of the triangle give only the size.

Check yourself

  1. A straight line rises 12 units while it goes 4 units to the right. What is its gradient?
    Answer124=3
  2. A straight line goes down from left to right. Is its gradient positive or negative?
    AnswerNegative. As you move right, y decreases, so the rise is negative.
  3. Line L has gradient −4 and line M has gradient 3. Which line is steeper?
    AnswerLine L. Steepness is the size of the gradient, and 4 is bigger than 3. The minus sign only says that L goes down.
  4. On a graph, one square across is 1 second and one square up is 4 metres. A straight line rises 3 squares while it goes 6 squares across. Find its gradient, with units.
    AnswerRise =3×4=12 metres, run =6×1=6 seconds, so the gradient is 126=2 metres per second.
  5. Calculate the gradient of the line through (2,3) and (6,11).
    Answer11−36−2=84=2
  6. Calculate the gradient of the line through (−1,4) and (3,−2).
    Answer−2−43−(−1)=−64=−32 (or −1.5).
  7. Calculate the gradient of the line through (−5,2) and (3,2). What kind of line is it?
    Answer2−23−(−5)=08=0. The y-values are equal, so the line is horizontal.
  8. What happens when you try to calculate the gradient of the line through (4,1) and (4,7)?
    AnswerThe bottom of the fraction is 4−4=0, and you cannot divide by 0. The line is vertical, so its gradient is undefined.

Exam questions

Try each part first. Open the mark scheme after you have written your answer.

Question 1. A printing shop shows its prices on a straight-line graph of the cost, C dollars, against the number of posters printed, n. On the horizontal axis, one square represents 10 posters. On the vertical axis, one square represents 5 dollars. The line passes through the point (0,15) and, from there, rises 4 squares for every 4 squares across.

(a) Find the gradient of the line. 2 marks No calculator

Mark scheme
  • M1 rise =4×5=20 and run =4×10=40 seen, or 2040 oe
  • A1 12 oe

(b) Explain what the gradient represents in this context. 1 mark No calculator

Mark scheme
  • B1 each extra poster adds 0.5 dollars (50 cents) to the cost oe; FT their (a)

(c) A second shop charges 0.8 dollars for each poster. Its line is drawn on the same axes. State which shop's line is steeper, giving a reason. 1 mark No calculator

Mark scheme
  • B1 the second shop's line, because 0.8>0.5 oe; FT their (a)

Question 2. The points A(−2,7), B(4,−2) and D(−6,1) are given.

(a) Calculate the gradient of the line AB. 2 marks No calculator

Mark scheme
  • M1 −2−74−(−2) oe
  • A1 −32 oe

(b) Show that the gradient of the line AD is 32. 2 marks No calculator

Mark scheme
  • M1 1−7−6−(−2) oe
  • A1 −6−4 or 64 seen (points taken in either order), leading to 32 with no errors in the working

(c) The point C(6,k) lies on the line AB. Find the value of k. 3 marks No calculator

Mark scheme
  • M1 k−76−(−2)=−32, or k−(−2)6−4=−32 using B, oe, FT their (a)
  • M1 k−7=−12, or k+2=−3, oe, the fraction cleared correctly
  • A1 k=−5 cao

Question 3. The points P(1,2), Q(4,8) and R(7,15) are given.

(a) Determine whether P, Q and R lie on the same straight line. Show your working. 3 marks

Mark scheme
  • M1 gradient of PQ=8−24−1 (=2) oe
  • M1 gradient of QR=15−87−4 (=73), or of PR=136, oe
  • A1 not on the same straight line, because the gradients are different, with both gradients correct. Any other correct method scores in full, e.g. the line through P and Q is y=2x, which gives y=14≠15 at x=7

(b) Explain why the gradient of the line through (3,−1) and (3,5) cannot be calculated. 1 mark

Mark scheme
  • B1 the change in x is 0 and division by 0 is impossible, or the line is vertical, oe

How this is examined

  • Working out a gradient from two coordinates, when one or more of them is negative: a Calculate or Find with two points given as coordinates and no graph to read from M1 for the change in y over the change in x written out with both subtractions in the same order and brackets round negatives, e.g. −5−52−(−3); A1 for the simplified value, e.g. −2. With the substitution written down, an arithmetic slip after it can still leave you the M1.
  • Reading a gradient off a drawn line in the units of each axis, not in squares: a Find on a straight line already drawn on a grid, where the two axes may have different scales M1 for a rise and a run read in axis units from two clearly chosen points (a triangle drawn on the line with each side labelled in axis units shows this); A1 for rise ÷ run with the sign that matches the direction of the line.
  • Showing that two points give a gradient that the question has already printed: a Show (that) in which the gradient is given and only the working is being marked Every step in sight: the formula with the coordinates substituted, the unsimplified fraction such as −6−4, then the given value. The answer is printed in the question, so the marks are for the working that leads to it, and a bare final value shows nothing.
  • What the sign and the size of a gradient tell you: a one-mark State, Write down or Explain: which of two lines is steeper, whether a gradient is positive or negative, or what a gradient means in a context A direct answer with its reason: 'line L, because 4 is bigger than 3', or 'the cost goes up by 0.5 dollars for each extra poster'. In a context, state the rate with its units: the y-units per x-unit.

Words to know

Gradient
A number that measures the steepness of a straight line: the change in y divided by the change in x between any two points on it. Written m in formulas.
Rise
The change in y between two points on a line. It is negative when the line goes down from left to right.
Run
The change in x between two points on a line.
Scale
What one square stands for on an axis. The two axes of a graph can have different scales.
Undefined gradient
The gradient of a vertical line. The change in x is 0, and you cannot divide by 0.