topic badge

7.005 The gradient of a line

Lesson

A linear function is any formula or equation whose graph is a straight line.

For example, the equation $y=3x-5$y=3x5 is a linear function and describes the relationship between two variables $x$x and $y$y.

Linear functions are characterised by their gradient and intercepts. We will explore these concepts further in this chapter.

The gradient of a line

A line is said to be increasing if it slopes upwards as we move from left to right. Increasing lines always have a positive gradient.

Increasing line - positive gradient

A decreasing line slopes downwards as we move from left to right. Decreasing lines always have a negative gradient.

Decreasing line - negative gradient

The following applet allows us to see how the value of the gradient changes with the steepness of the line. Confirm that increasing lines have a positive gradient and decreasing lines have a negative gradient.

 

Calculating the gradient of a line

The gradient of a line is defined as the vertical change in the $y$y-coordinates (the 'rise') between two points on the line, divided by the horizontal change in the corresponding $x$x-coordinates (the 'run').
 

Gradient of a line
$\text{Gradient }$Gradient $=$= $\frac{\text{change in }y\text{-coordinates}}{\text{change in }x\text{-coordinates}}$change in y-coordinateschange in x-coordinates
  $=$= $\frac{\text{rise }}{\text{run }}$rise run

 

Worked example

Example 1

Find the gradient of the line below:

Solution

We begin by choosing any two points on the line and use them to create a right-angled triangle, where the line itself forms the hypotenuse of the triangle.

In this case we have chosen the points $\left(-1,0\right)$(1,0) and $\left(0,2\right)$(0,2). The 'run' (highlighted red) and the 'rise' (highlighted blue) form the sides of the right-angled triangle.

If we start at the left most point, we see that the run is $1$1 and the rise is $2$2. Both values are positive because we move first to the right $1$1 unit, then up $2$2 units. We calculate the gradient as follows:

$\text{Gradient }$Gradient $=$= $\frac{\text{rise }}{\text{run }}$rise run
  $=$= $\frac{2}{1}$21
  $=$= $2$2

 

Practical meaning of gradient

Remember: the run is how many units we move across from left to right. The rise is how many units we move up (positive) or down (negative).

A gradient of $\frac{2}{1}$21 means move across $1$1, up $2$2 from a starting point.

A gradient of $-\frac{1}{2}$12 means move across $2$2, down $1$1 from a starting point.

A gradient of $\frac{2}{3}$23 means move across $3$3, up $2$2 from a starting point.

A gradient of $\frac{-3}{5}$35 means move across $5$5, down $3$3 from a starting point.

 

Practice questions

Question 1

Find the gradient of the line that passes through Point A $\left(2,-6\right)$(2,6) and the origin using $m=\frac{\text{rise }}{\text{run }}$m=rise run .

 

Finding the gradient from a table of values

A linear function is a relationship that has a constant rate of change. This means that the $y$y-values change by the same amount for constant changes in $x$x-values. We can calculate the gradient by analysing the change in $y$y-values with respect to the $x$x-values.

 

Worked example

Example 2

Determine the gradient for the linear function represented by the following table of values:

$x$x $2$2 $3$3 $4$4 $5$5
$y$y $9$9 $6$6 $3$3 $0$0

Think: The $x$x-values increase by the same amount. We can determine how the $y$y-values change for a given change in $x$x in order to calculate the gradient.

Do:

We see a constant change in $y$y (the rise) of $-3$3 for an equivalent change in $x$x (the run) of $1$1. Therefore, we can calculate the gradient as follows:

Gradient $=$= $\frac{\text{rise}}{\text{run}}$riserun
Gradient $=$= $\frac{-3}{1}$31
Gradient $=$= $-3$3

 

Finding the gradient between two points

If we are given the coordinates of two points on the coordinate plane, we can find the gradient of the line that would pass through these points.

 

Worked example

Example 3

Find the gradient of the line between the points $\left(3,6\right)$(3,6) and $\left(7,-2\right)$(7,2).

Solution

It is good practice to first draw a sketch of the two points. A sketch means the location of the points doesn't have to be exact. As long as the points are in the correct quadrant and correctly positioned relative to each other.

We can then add a right-angled triangle that shows the 'rise' and 'run'. This allows us to see immediately whether the line is increasing or decreasing, and if it has a positive or negative gradient.

The run is the horizontal distance between the points. We can see that the left-most point has an $x$x-coordinate of $3$3 and the right-most point has an $x$x-coordinate of $7$7, so the horizontal distance between them is $4$4 units.

The rise is the vertical distance between the points. We can see that one point is $6$6 units above the horizontal axis and the other point is $2$2 units below, so the vertical distance between them is $8$8 units.

If we start at the left-most point, we move $4$4 units to the right and then $8$8 units down to reach the right-most point. This gives us a run of $4$4 and a rise of $-8$8.

We can now calculate the gradient:

$\text{Gradient }$Gradient $=$= $\frac{\text{rise }}{\text{run }}$rise run
  $=$= $\frac{-8}{4}$84
  $=$= $-2$2

 

Another way to find the gradient, without drawing a sketch, is to consider the changes in the $y$y-coordinates and $x$x-coordinates of the two points.

$\text{Gradient }$Gradient $=$= $\frac{\text{change in }y\text{-coordinates}}{\text{change in }x\text{-coordinates}}$change in y-coordinateschange in x-coordinates
  $=$= $\frac{-2-6}{7-3}$2673
  $=$= $\frac{-8}{4}$84
  $=$= $-2$2

 

Notice that we always subtract the coordinates of the left-most point from the coordinates of the right-most point (the left-most point will have the lowest value for the $x$x-coordinate).

 

Practice questions

Question 2

What is the gradient of the line shown in the graph, given that Point A $\left(3,3\right)$(3,3) and Point B $\left(6,5\right)$(6,5) both lie on the line?

 

Loading Graph...
A number plane with a line passing through points A$\left(3,3\right)$(3,3) and B$\left(6,5\right)$(6,5)

Question 3

What is the gradient of the line going through A $\left(-1,1\right)$(1,1) and B $\left(5,2\right)$(5,2)?

Loading Graph...
A number plane with the line passing through the points A(-1, 1) and B(5, 2) plotted. The points A(-1, 1) and B(5, 2) are also plotted on the number plane as solid dots.

question 4

Consider the following graph.

Loading Graph...

  1. Find the coordinates of the $y$y-intercept.

  2. Find the gradient of the line.

What is Mathspace

About Mathspace