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 line?

What is the gradient of a line?

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

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.

Currency gradient example
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

Gradient formula

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:

This gives us a gradient formula of:

It can be helpful to think about this formula as:
Change in y divided by change in x
Or
Rise over run

Gradient equation

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.

How to find the gradient of a line

To find the gradient of line you divide the change in height ( y − y ) 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

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

Let’s look at the example of m = 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.

Example 1

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 ).

Example 2

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

Explain how to calculate the gradient of a line

Gradient of a line worksheet

Gradient of a line worksheet

Gradient of a line worksheet

Get your free gradient of a line worksheet of 20+ questions and answers. Includes reasoning and applied questions.

Gradient of a line worksheet

Gradient of a line worksheet

Gradient of a line worksheet

Get your free gradient of a line worksheet of 20+ questions and answers. Includes reasoning and applied questions.

Related lessons on straight line graphs

Gradient of a line is part of our series of lessons to support revision on straight line graphs. You may find it helpful to start with the main straight line graphs lesson for a summary of what to expect, or use the step by step guides below for further detail on individual topics. Other lessons in this series include:

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.

In the example above, the red curve is the equation y=x^ 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 y> x>=\frac=4 . Hence the gradient at the point (2, 4) is 4 .