2 The gradient of a straight line through two points

A common requirement is to find the gradient of a line when we know the coordinates of two points on it. Suppose the two points are A ( x 1 , y 1 ) , B ( x 2 , y 2 ) as shown in the following figure.

Figure 25

A graph displays a straight line connecting two points, labeled A at (­ x₁, ­ y₁) and B at (­ x₂, ­ y₂), on a two-dimensional coordinate system with labeled x and y axes.

Long description

The gradient of the line joining A and B can be calculated from the following formula.

Key Point 8

Gradient of Line Through Two Points

The gradient of the line joining A ( x 1 , y 1 ) and B ( x 2 , y 2 ) is given by

gradient = y 2 y 1 x 2 x 1
Example 13

Find the gradient of the line joining the points A ( 0 , 3 ) and B ( 4 , 5 ) .

Solution

We calculate the gradient as follows:

A graph showing a straight line with two points marked, used to illustrate the calculation of a gradient.

Long description

Thus the gradient of the line is 1 2 . Graphically, this means that when x increases by 1 , the value of y increases by 1 2 .

Task!

Find the gradient of the line joining the points A ( 1 , 4 ) and B ( 2 , 1 ) .

1 4 2 ( 1 ) = 1

Thus the gradient of the line is 1 . Graphically, this means that when x increases by 1 , the value of y decreases by 1 .

Exercises
  1. Calculate the gradient of the line joining ( 1 , 0 ) and ( 15 , 3 ) .
  2. Calculate the gradient of the line joining ( 10 , 3 ) and ( 15 , 3 ) .
  1. 3 14 .
  2. 0