Skip to main content
ScotlandMathsSyllabus dot point

How do you calculate the gradient of a straight line from two points, and what does the sign and size of a gradient tell you?

Calculating the gradient of a straight line from two points using the gradient formula, and interpreting positive, negative, zero and undefined gradients.

A focused answer to the SQA National 5 Mathematics gradient content, covering the gradient formula for the slope between two points, interpreting positive, negative, zero and undefined gradients, and the link to steepness and direction.

Generated by Claude Opus 4.88 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The gradient formula
  3. Reading the sign of a gradient
  4. Steepness and size
  5. Working backwards from a gradient
  6. Examples in context
  7. Try this

What this dot point is asking

The SQA wants you to calculate the gradient of a straight line from the coordinates of two points using the gradient formula, and to interpret what the sign and size of a gradient mean: how steep the line is and whether it rises, falls, is level or vertical.

The gradient formula

The gradient between two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is the vertical change divided by the horizontal change between them.

Reading the sign of a gradient

The sign of the gradient tells you the direction of the slope as you read the line from left to right.

For example, the line through (0,4)(0, 4) and (3,1)(3, 1) has gradient 1430=33=1\dfrac{1 - 4}{3 - 0} = \dfrac{-3}{3} = -1, so it falls; the line through (2,5)(2, 5) and (6,5)(6, 5) has gradient 5562=0\dfrac{5 - 5}{6 - 2} = 0, so it is horizontal.

Steepness and size

The further the gradient is from zero, the steeper the line. A gradient of 44 is steeper than a gradient of 22, and a gradient of 3-3 is steeper than a gradient of 1-1. This is why gradient is used for road and ramp design: a road described as "1 in 5" has gradient 15=0.2\dfrac{1}{5} = 0.2.

When comparing a positive gradient with a negative one, compare their sizes ignoring the sign to judge steepness, but use the sign to judge direction. A line of gradient 4-4 is steeper than one of gradient 22, even though 4-4 is the smaller number, because its size 44 is larger.

Working backwards from a gradient

Many questions give you the gradient and one point, then ask for the missing coordinate of a second point. You rearrange the gradient formula to do this. For a line of gradient mm through (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2), the relationship m=y2y1x2x1m = \dfrac{y_2 - y_1}{x_2 - x_1} can be rearranged to y2y1=m(x2x1)y_2 - y_1 = m(x_2 - x_1), which lets you find any missing value.

Examples in context

Gradient describes any rate of steepness or change. A wheelchair ramp must not be too steep, so building regulations limit its gradient, often to about 112\dfrac{1}{12}, meaning a rise of 11 for every 1212 of horizontal run. On a distance-time graph the gradient is the speed, so a steeper line means faster motion; a horizontal section (zero gradient) means the object is stationary. The same formula underpins the equation of a straight line that follows in the Relationships area.

Try this

Q1. Find the gradient of the line through (2,3)(2, 3) and (8,15)(8, 15). [2 marks]

  • Cue. 15382=126=2\dfrac{15 - 3}{8 - 2} = \dfrac{12}{6} = 2.

Q2. Find the gradient of the line through (1,5)(-1, 5) and (3,3)(3, -3). [2 marks]

  • Cue. 353(1)=84=2\dfrac{-3 - 5}{3 - (-1)} = \dfrac{-8}{4} = -2.

Q3. State the gradient of a horizontal line. [1 mark]

  • Cue. 00.

Exam-style practice questions

Practice questions written in the style of SQA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

SQA National 5 20192 marksCalculate the gradient of the line joining A(2,1)A(-2, 1) and B(4,13)B(4, 13).
Show worked answer →

Use the gradient formula m=y2y1x2x1m = \dfrac{y_2 - y_1}{x_2 - x_1} (1 mark). Substitute the coordinates: m=1314(2)=126=2m = \dfrac{13 - 1}{4 - (-2)} = \dfrac{12}{6} = 2 (1 mark). Markers reward correct substitution into the formula and the simplified gradient 22. Taking the points in either order gives the same answer as long as xx and yy are kept consistent.

SQA National 5 20223 marksA road rises 33 m over a horizontal distance of 2020 m. Calculate the gradient of the road, and explain what a gradient of zero would mean.
Show worked answer →

Gradient =vertical changehorizontal change=320=0.15= \dfrac{\text{vertical change}}{\text{horizontal change}} = \dfrac{3}{20} = 0.15 (2 marks for the calculation and the value). A gradient of zero would mean no vertical change over the horizontal distance, so the road would be flat (level) (1 mark). Markers reward the gradient as rise over run and a correct interpretation of zero gradient.

Related dot points

Sources & how we know this