topic badge
AustraliaNSW
Stage 5.1-2

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
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

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
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

Exploration

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

Loading interactive...

A positive slope will result on an increasing line while a negative slope will result on a decreasing line.

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

An increasing line has a positive gradient.

An decreasing line has a negative gradient.

Gradient from a graph

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.

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

Take a look at this line, where the horizontal and vertical steps are highlighted.

We call the horizontal measurement the run and the vertical measurement the rise. For this line, a run of 1 means a rise of 2, so the line has gradient 2.

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.

In this case, the gradient is positive because, over the 1 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:

Loading interactive...

Changing the gradient changes the rise and run.

Examples

Example 1

Consider the interval between A (4, 4) and B (7, 7).

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

Find the rise (change in the y-value) between point A and B.

Worked Solution
Create a strategy

We can draw a right-angled triangle where AB is the hypotenuse.

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

By drawing a triangle we can see that the rise is 3.

b

Find the run (change in the x-value) between point A and B.

Worked Solution
Create a strategy

Use the triangle from part (a).

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

By drawing a triangle we can see that the run is 3.

c

Find the gradient of the interval AB.

Worked Solution
Create a strategy

Use the formula: \text{gradient}=\dfrac{\text{rise}}{\text{run}}

Apply the idea
\displaystyle \text{gradient}\displaystyle =\displaystyle \dfrac{3}{3}Substitute the rise and run
\displaystyle =\displaystyle 1Evaluate
Idea summary
1
2
3
4
5
6
x
1
2
3
4
5
6
y

We can calculate the gradient by using the formula: \text{gradient}= \dfrac{\text{rise}}{\text{run}}

The rise and run can be found by drawing a right-angled triangle where the line is the hypotenuse.

Gradient from coordinates

If you 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:

x
y

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 thex-value of the leftmost point to describe the change in horizontal distance from A to B: \text{run} = 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: \begin{aligned} \text{gradient} &= \dfrac{\text{rise}}{\text{run}} \\ &= \dfrac{-8}{4} \\ &= -2 \end{aligned}

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.

Examples

Example 2

Consider the line shown with y-intercept at Y(0,1) and x-intercept at X(5,0).

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

Find the rise (change in the y-value) using the intercepts.

Worked Solution
Create a strategy

To find the rise from two points, take the difference of the y-values.

Apply the idea
\displaystyle \text{rise}\displaystyle =\displaystyle 0-1Subtract the y-values
\displaystyle =\displaystyle -1Evaluate
b

Find the run (change in the x-value) using the intercepts.

Worked Solution
Create a strategy

To find the run from two points, take the difference of the x-values.

Apply the idea
\displaystyle \text{run}\displaystyle =\displaystyle 5-0Subtract the x-values
\displaystyle =\displaystyle 5Evaluate
c

Find the gradient of the line XY.

Worked Solution
Create a strategy

Use the formula: \text{gradient}=\dfrac{\text{rise}}{\text{run}}

Apply the idea
\displaystyle \text{gradient}\displaystyle =\displaystyle \dfrac{-1}{5}Substitute the rise and run
\displaystyle =\displaystyle -\dfrac{1}{5}Evaluate
Idea summary

For any line:\, \text{gradient}=\dfrac{\text{rise}}{\text{run}}

  • To calculate the rise from two points, take the difference of the y-values (subtract left from right).

  • To calculate the run from two points, take the difference of the x-values (subtract left from right).

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.

-8
-6
-4
-2
2
4
6
8
x
-8
-6
-4
-2
2
4
6
8
y

The points on this line are A (-8, 4), \, B (-2, 4), and C (7, 4).

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. \text{rise} = 0), the gradient of a horizontal 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

The points on this line are A (-3, 8), \, B (-3, 3), and C (-3, -3).

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

The equation of this line is x=-3.

Vertical lines have no "run" (i.e. \text{run} = 0 ). If we substituted this into the \dfrac{\text{rise}}{\text{run}} equation, we'd have a 0 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

Consider the intervals AB and BC.

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

What is the gradient of AB?

A
undefined
B
4
C
0
D
2
Worked Solution
Create a strategy

The points A and B share a common y-value.

Apply the idea

If the points share a common y-value, then they lie on a horizontal line. The gradient of a horizontal is always 0, option C.

b

What is the gradient of BC?

A
6
B
undefined
C
0
D
5
Worked Solution
Create a strategy

The points A and B share a common x-value.

Apply the idea

If the points share a common x-value, then they lie on a vertical line. The gradient of vertical lines is always undefined, option B.

Idea summary

The gradient of a horizontal is always 0.

The gradient of a vertical is always undefined.

Outcomes

MA5.1-6NA

determines the midpoint, gradient and length of an interval, and graphs linear relationships

What is Mathspace

About Mathspace