# Gradient Of A Line

Here we will learn about the gradient of a line, including how to find the gradient of a line from a graph, and from two coordinates, and state the equations of horizontal and vertical lines.

There are also worksheets based on Edexcel, AQA and OCR exam questions, along with further guidance on where to go next if you’re still stuck.

## What is the gradient of a line?

The gradient of a line is the measure of the steepness of a straight line.

The gradient of a line can be either positive or negative and does not need to be a whole number.

The gradient of a line can either be in an uphill (positive value) or downhill direction (negative value)

## What is the gradient of a straight line?

The gradient formula of a straight line shows us how steep the line is. In the general equation of a straight line, y = mx + c, the gradient is denoted by the letter m.

To calculate the gradient of a straight line through two coordinates (x, y) and (x, y ) use this gradient formula

$\\m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}\\$

## How to understand the gradient of a line

Imagine walking up a set of stairs. Each step has the same height and you can only take one step forward each time you move. If the steps are taller, you will reach the top of the stairs quicker, if each step is shorter, you will reach the top of the stairs more slowly.

Let’s look at sets of stairs,

The blue steps are taller than the red steps and so the gradient is steeper (notice the blue arrow is steeper than the red arrow).

The green steps are not as tall as the red steps so the gradient is shallower (the green arrow is shallower than the red arrow).

Gradients can be positive or negative but are always observed from left to right.  The linear relationship between two variables can be drawn as a straight line graph and the gradient of the line calculates the rate of change between the two variables.

When calculating the exchange rate of two currencies, we can calculate the gradient of the line to find the rate of change between them.

Here, the exchange rate between pounds ( £ ) and dollars (\$) is equal to \frac{3}{5}

The gradient formula is a way of expressing the change in height using the y coordinates divided by the change in width using the x coordinates.

So using the gradient formula to find the gradient of a straight line given the two coordinates (x, y) and (x, y), we need to work out:

• The change in x is the difference between the x coordinates: x − x
• The change in y is the difference between the y coordinates: y − y

This gives us a gradient formula of:

$\\m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}\\$

Change in y divided by change in x
Or
Rise over run

The gradient equation is another way we refer to the gradient of a straight line using x and y coordinates. So again the gradient equation is seen as m = rise / run where m is the gradient or slope.

$\\m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}\\$

## How to find the gradient of a line

To find the gradient of line you divide the change in height (yy) by the change in horizontal distance (x − x)

For example on a straight line with points (4, 2) and (6, 8) we take the difference between the y coordinates (8 – 2 = 6) and the difference between the x coordinates (6 – 4 = 2), divide 6 by 2 and we have found a gradient of 3.

## Gradient of diagonal lines

Let’s have a closer look at the gradient of 4 lines

• When m = 1, for each unit square we move to the right, we move 1 unit square upwards.
• When m = 2, for each unit square we move to the right, we move 2 unit squares upwards.
• When m = −3, for each unit square we move to the right, we move 3 unit squares downwards.
• When m = ½, for each unit square we move to the right, we move ½ a unit square upwards.

How far apart do the coordinates we choose need to be?

Let’s look at the example of m = 2.

• The first blue line has a gradient of
$\\m=\frac{2}{1}=2\\$
• The second blue line has a gradient of
$\\m=\frac{6}{3}=2\\$
• The third blue line has a gradient of
$\\m=\frac{10}{5}=2\\$

No matter how far apart the coordinates are on the line, the resultant value will always simplify to the same number, here m = 2.

Top tip: Use two coordinates that cross the corner of two grid squares so that you can accurately measure the horizontal and vertical distance between them. Use integers as much as possible!

Remember: the change in x is horizontal, the change in y is vertical.

### Gradient of horizontal and vertical lines

There is no relationship between x and y on horizontal or vertical lines and so they cannot be written in the form y = mx + c as the gradient cannot be measured.

Let us look at a couple of examples to further understand the equations of horizontal and vertical lines.

In the diagram above, all the coordinates share an x value of 4, regardless of the y value, so if we join the coordinates together to make a straight line, we get the vertical line with the equation x = 4.

Notice the line crosses the x axis at (4,0) (the x-intercept is 4).

In the diagram above, all the coordinates share a y value of 2, regardless of the x value, so if we join the coordinates together to make a straight line, we get the horizontal line with the equation y = 2.
Notice the line crosses the y axis at (0,2) (the y-intercept is 2).

## How to calculate the gradient of a line

In order to calculate the gradient of a line:

1. Select two points on the line that occur on the corners of two grid squares.
2. Sketch a right angle triangle and label the change in y and the change in x.
3. Divide the change in y by the change in x to find m.

### Explain how to calculate the gradient of a line ## Gradient of a curve

We can estimate the gradient of a curve at a given point by drawing a tangent line at that point and calculating its gradient.

A tangent line touches the curve at one point only. For the purposes of GCSE Maths, the tangent line is an estimate drawn by eye, but you should try to be as accurate as possible.

Once the tangent line has been drawn in, use the method described above to calculate the gradient of the tangent line. This gives an approximation or estimate for the gradient of the curve at that point.

For example,

In the example above, the red curve is the equation y=x^{2} and the blue tangent line has been drawn to estimate the tangent at the point (2, 4)

Using the points (3, 8) and (2, 4) which both lie on the tangent line, we calculate \frac{\text { change in } y}{\text { change in } x}=\frac{4}{1}=4. Hence the gradient at the point (2, 4) is 4.

This lesson is part of the bigger topic, straight line graphs. It may be helpful to take a look at the topic page, straight line graphs before moving on to the more detailed individual related lessons below:

## Gradient of a line examples

### Example 1: using a straight line graph (positive gradient)

Calculate the gradient of the line:

1. Select two points on the line that occur on the corners of two grid squares.

2Sketch a right angle triangle and calculate the change in y and the change in x.

3Divide the change in y by the change in x to find m.

Here,

$\frac{4}{2}=2$

so m = 2.

### Example 2: using a straight line graph (negative gradient)

Calculate the gradient of the line:

Remember the height of the triangle represents the change in y, and the width of the triangle represents the change in x.
Looking at the coordinate (1, 2), to get to the coordinate (5, −4) we have to add 4 to the x coordinate, and subtract 6 from the y coordinate.

Although the height of a triangle is always positive, we are calculating the change in y, so we must write the change in y as −6.

Here,

$\\\frac{-6}{4}=-\frac{3}{2}\\$

so

$\\m=-\frac{3}{2}\\$

### Example 3: Using a straight line graph with two coordinates (positive gradient)

Calculate the gradient of the line:

Here we already have this information, so we can continue on with step 2.

Here,

$\\\frac{5}{5}=1\\$

so

$\\m=1\\$

### Example 4: using a straight line graph with two coordinates (negative gradient)

Calculate the gradient of the line:

Here we already have this information, so we can continue on with step 2.

Here we have to be careful because each grid square has a width of 1 unit but a height of 2 units. This means that the distance between the y coordinates (the change in y) is equal to −8 − 8 = −16.

Here,

$\\\frac{-16}{1}=-16\\$

so

$\\m=-16\\$

### Example 5: given two coordinates (positive gradient)

Calculate the gradient of the line with coordinates A(4, 3) and B(7, 12).

Here we have the two coordinates A(4, 3) and B(7, 12) without a graph to visualise the line. We therefore need to determine whether the line has a positive or negative gradient as well as the value for m.

As there is no right angle to sketch, we will solve algebraically by calculating the change in y and the change in x.

$\\y_{2}-y_{1}=12-3=9\\$

$\\x_{2}-x_{1}=7-4=3\\$

Top tip: make sure you always subtract one coordinate from the other. Here we subtracted the values from coordinate A from coordinate B. Do not mix up the order.

$\\m=\frac{9}{3}\\$

$\\m=3\\$

### Example 6: given two coordinates (negative gradient)

Calculate the gradient of the line with coordinates P(−10, −3) and Q(2, −7).

Here we have the two coordinates P(−10, −3) and Q(2, −7) without a graph to visualise the line. We therefore need to determine whether the line has a positive or negative gradient as well as the value for m .

As there is no right angle to sketch, we will solve algebraically by calculating the change in y and the change in x.

$\\y_{2}-y_{1}=-7- -3=-7+3=-4\\$

$\\x_{2}-x_{1}=2- -10=2+10=12\\$
$\\m=\frac{-4}{12}\\$

$\\m=-\frac{1}{3}\\$

### Common misconceptions

• Mixing up the coordinates

A common error is to mix up the coordinates when calculating the change in y and the change in x.
It is helpful to label each coordinate (x₁, y₁) and (x₂, y₂) so that when we take the values from the first coordinate away from the second coordinate we end up with:

The change in x is x₂ − x₁

The change in y is y₂ − y₁

• Incorrect simplifying of m (negative number division)

When you subtract one coordinate from another, one or both of the numerator and the denominator can be negative. If one is negative, the gradient is negative.

If both are negative, remember a negative number divided by another negative number is a positive number, so the gradient is positive.

E.g.

$\frac{6}{-2}=\frac{-6}{2}=-3\quad \text{ or } \quad \frac{-8}{-4}=\frac{8}{4}=2$

• Change in x divided by the change in y

It is easy to mistake the calculation of m to be the change in x divided by the change in y. This would result in the reciprocal of the gradient which, most of the time (although not always) is incorrect.

• Reading scales incorrectly

Sometimes the scale of the axis can change, e.g. 1 square can be a half unit, or 2 units etc. For this reason it is important to use the coordinates and the axes to make sure these values are correct. Example 4 highlights this fact as each square on the y-axis is 2 units.

### Practice gradient of a line questions

1. Calculate the gradient of the line: \\m = \frac{2}{5}\\ \\m = \frac{5}{2}\\ \\m = \frac{4}{10}\\ m=\frac{10}{4}  \\m=\frac{2}{5}\\

2. Calculate the gradient of the line: \\m=\frac{9}{14}\\ \\m=\frac{14}{9}\\ \\m=-\frac{9}{14}\\ m=-\frac{14}{9}  \\m=\frac{-9}{14}\\

3. Calculate the gradient of the line given the coordinates: \\m=\frac{4}{3}\\ \\m=\frac{14}{4}\\ \\m=\frac{3}{4}\\ \\m=\frac{8}{3}\\  \\m=\frac{8}{6}=\frac{4}{3}\\

(each square on the x-axis is 2 units)

4. Calculate the gradient of the line given the coordinates: m=-2 \\m=\frac{1}{2}\\ m=-4 \\m=-\frac{1}{4}\\  \\m=\frac{-3}{6}\\

(each square on the x-axis is \frac{1}{2} unit)

5. Calculate the gradient of the line given the coordinates A(2,6) and B(8,24)

m=3 m=4 m=\frac{1}{3} m=-3 \\m=\frac{24-6}{8-2}=\frac{18}{6}=3\\

6. Calculate the gradient of the line given the coordinates A(-3,-8)) and B(-5,10)

m=9 \\m=\frac{-1}{4}\\ \\m= -1\\ m=-9 \\m=\frac{10–8}{-5–3}=\frac{10+8}{-5+3}=\frac{18}{-2}=-9\\

### Gradient of a line GCSE questions

1. Two straight line graphs A and B are shown on a set of axes. The equation of line A is y=2(x+1).

Use this information to calculate the gradient of the line B. (4 marks)

The y -intercept of line A = 2 or (0,2) labelled

(1)

Each square on the x-axis is 1 unit, on the y -axis is 2 units: (1)

Two coordinates selected on line B with correct change in y and change in x , e.g: The change in y is -8 , and the change in x is 4

(1)

\\m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}=\frac{-8}{4}=-2\\

(1)

2.  (a)  Write an equation in the form y=mx+c that has the same gradient as the line  3y+9=12x.

(b)  Tick the statements that are true for the equation 3y+9=12x and your solution for part a).

They are parallel

They intersect at the coordinate (0,-3)

They are perpendicular to one another

(4 marks)

(a) (1)

m=4

(1)

Any equation of the form y=4x+c

E.g.
y=4x, y=4x+7, y=4x-8.

(1)

(b)

They are parallel                                             ✔

They intersect at the coordinate (0,-3)

They are perpendicular to one another

(1)

3.  Craig is calculating the gradient of the straight line shown below. Here is Craig’s working: (3 marks)

No (with reasoning)

(1)

The change in x is equal to:

-6–2=-6+2=-4

whereas Craig has stated the height of the triangle as 4

(1)

\\m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}=\frac{-4}{8}=-\frac{1}{2}\\

whereas Craig has incorrectly calculated

\\m=\frac{x_{2}-x_{1}}{y_{2}-y_{1}}\\

(1)

## Learning checklist

You have now learned how to:

• Calculate and interpret gradients of graphs of such linear equations numerically, graphically and algebraically
• Interpret the gradient of a straight line graph as a rate of change

## Still stuck?

Prepare your KS4 students for maths GCSEs success with Third Space Learning. Weekly online one to one GCSE maths revision lessons delivered by expert maths tutors.

Find out more about our GCSE maths revision programme.

x

#### GCSE Maths Papers - November 2022 Topics

Practice paper packs based on the November advanced information for Edexcel 2022 Foundation and Higher exams.

Designed to help your GCSE students revise some of the topics that are likely to come up in November exams.