topic badge
AustraliaNSW
Stage 5.1-3

3.02 The gradient of an interval

Lesson

Gradient

Some lines have increasing slopes, like these:

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Line with increasing slope
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Line with increasing slope

And some have decreasing slopes, like these:

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Line with decreasing slope
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Line with decreasing slope

Exploration

This applet will let you explore lines with positive and negative gradients:

Move the sliders, then observe the sign of m and the form of the line.

Loading interactive...

If the gradient is positive, then the line is increasing. If the gradient is negative, then the line is decreasing.

The slope of a line is a measure of how steep it is. In mathematics we call this the gradient.

A gradient is a single value that describes:

  • If a line is increasing (has positive gradient)

  • If a line is decreasing (has negative gradient)

  • How far up or down the line moves (how the y-value changes) with every step to the right (for every 1 unit increase in the x-value)

Idea summary

If the gradient is positive, the line is increasing. If the gradient is negative, the line is decreasing.

Gradient from a graph

Sometimes it is difficult to measure how far the line goes up or down (how much the y-value changes) in 1 horizontal unit, especially if the line doesn't line up with the grid points on the xy-plane. In this case we calculate the gradient by using a formula:

\text{Gradient} = \dfrac{\text{Rise}}{\text{Run}}

The rise and run can be calculated from using any two points on the line.

You can find the rise and run of a line by drawing a right triangle created by any two points on the line. The line itself forms the hypotenuse.

-3
-2
-1
1
x
-2
-1
1
2
y

This line has a gradient of \, \dfrac{\text{rise}}{\text{run}}=\dfrac43

In this case, the gradient is positive because, over the 3 unit increase in the x-values, the y-value has increased. If the y-value decreased as the x-value increases, the gradient would be negative.

Exploration

This applet allows you to see the rise and run between two points on a line of your choosing.

Move the sliders and notice how the rise affects the gradient and the form of the line.

Loading interactive...

If the \text{rise} is positive, the line is increasing. If the \text{rise} is negative, the line is decreasing.

Examples

Example 1

What is the gradient of the line shown in the graph given that A(3,3) and B(6,5) both lie on the line.

1
2
3
4
5
6
7
8
9
x
1
2
3
4
5
6
7
8
9
y
Worked Solution
Create a strategy

We can draw a triangle to find the rise and run, and then use the gradient formula.

Apply the idea
1
2
3
4
5
6
7
8
9
x
1
2
3
4
5
6
7
8
9
y

We can now see that this line has a run of 3 and a rise of 2.

\begin{aligned} \text{Gradient} &=\dfrac{\text{rise}}{\text{run}}\\ &= \dfrac{2}{3} \end{aligned}

Idea summary

If the \text{rise} is positive, so the gradient and it makes the line increasing.

If the \text{rise} is negative, so the gradient and it makes the line decreasing.

We calculate the gradient by using a formula:

\displaystyle \text{Gradient} = \dfrac{\text{Rise}}{\text{Run}}
\bm{\text{Rise}}
is the vertical measurement
\bm{\text{Run}}
is the horizontal measurement

Gradient from a pair of coordinates

1
2
3
4
5
6
7
8
9
x
-2
-1
1
2
3
4
5
6
y

If we have a pair of coordinates, such as A(3,6) and B(7,-2), we can find the gradient of the line between these points using the same formula.

It is a good idea to draw a quick sketch of the points, which helps us quickly identify what the line will look like this.

Already we can tell that the gradient will be negative, since the line moves downward as we go from left to right.

The rise is the difference in the y-values of the points. We take the y-value of the rightmost point and subtract the y-value of the leftmost point to describe the change in vertical distance from A to B:

\text{Rise}=-2-6=-8

The run is the difference in the x-values of the points. We take the x-value of the rightmost point and subtract the x-value of the leftmost point to describe the change in horizontal distance from A to B:

\text{Rise}=7-3=4

Notice that we subtracted the x-values and the y-values in the same order - we check our sketch, and it does seem sensible that between A and B there is a rise of -8 and a run of 4. We can now put these values into our formula to find the gradient:

\displaystyle \text{Gradient}\displaystyle =\displaystyle \dfrac{\text{Rise}} {\text{Run}}
\displaystyle =\displaystyle \dfrac{-8}{4}
\displaystyle =\displaystyle -2

We have a negative gradient, as we suspected. Now we know that when we travel along this line a step of 1 in the x-direction means a step of 2 down in the y-direction.

Let's just remind ourselves how we calculated the rise and run again.

\displaystyle \text{Rise}\displaystyle =\displaystyle y_2-y_1
\displaystyle \text{Run}\displaystyle =\displaystyle x_2-x_1

This means we can generate a new rule for finding the gradient if we are given two points.

-1
1
2
3
4
5
6
7
x
-1
1
2
3
4
5
6
7
y

For any two points (x_1,y_1) and (x_2,y_2), we can find the gradient using the formula:

\text{Gradient}=\dfrac{y_2-y_1} {x_2-x_1}

Examples

Example 2

What is the gradient of the line going through A and B?

-6
-5
-4
-3
-2
-1
1
2
3
4
5
6
x
-5
-4
-3
-2
-1
1
2
3
4
5
6
7
y
Worked Solution
Create a strategy

Determine the coordinates, then use the gradient formula.

Apply the idea

The line is going through A(5,3) and B(-5,2).

\displaystyle \text{Gradient}\displaystyle =\displaystyle \dfrac{y_2-y_1}{x_2-x_1}Use the gradient formula
\displaystyle =\displaystyle \dfrac{2-3}{-5-5}Substitute the coordinates
\displaystyle =\displaystyle \dfrac{1}{10}Evaluate
Idea summary

For any two points (x_1,y_1) and (x_2,y_2), we can find the gradient using the formula:

\displaystyle \text{Gradient}=\dfrac{y_2-y_1} {x_2-x_1}
\bm{(x_1,y_1)}
are the coordinates of the first point
\bm{(x_2,y_2)}
are the coordinates of the second point

Gradient of horizontal and vertical lines

On horizontal lines, the y-value is always the same for every point on the line. In other words, there is no rise- it's completely flat.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

Let's look at the coordinates for A, B, and C on this line.

All the y-coordinates are the same. Every point on the line has a y-value equal to 4, regardless of the x-value.

The equation of this line is y=4.

Since gradient is calculated by \dfrac{\text{rise}}{\text{run}} and there is no rise (i.e. 0), the gradient of a horizontal line is always 0.

On vertical lines, the x-value is always the same for every point on the line.

-4
-3
-2
-1
1
2
3
4
x
-3
-2
-1
1
2
3
4
5
6
7
8
y

Let's look at the coordinates for A, B, and C on this line.

All the x-coordinates are the same, x=3, regardless of the y-value.

The equation of this line is x=-3.

Vertical lines have no "run" (i.e. 0).

If we substituted this into the \dfrac{\text{rise}}{\text{run}} equation, we'd have a 0 as the denominator of the fraction.

However, fractions with a denominator of 0 are undefined.

So, the gradient of vertical lines is always undefined.

Examples

Example 3

What is the gradient of any line parallel to the x-axis?

Worked Solution
Create a strategy

Any line parallel to the x-axis has the same gradient as the x-axis.

Apply the idea

Since x-axis is horizontal, which has a gradient of 0, then any line that is parallel to it is horizontal and has a gradient of 0.

Idea summary

The gradient of a horizontal line is 0, while the gradient of a vertical line is undefined.

Outcomes

MA5.3-8NA

uses formulas to find midpoint, gradient and distance on the Cartesian plane, and applies standard forms of the equation of a straight line

What is Mathspace

About Mathspace