<< Chapter < Page Chapter >> Page >

In the figure, it can be seen that the length of the line P R is 3 units and the length of the line Q R is four units. However, the P Q R , has a right angle at R . Therefore, the length of the side P Q can be obtained by using the Theorem of Pythagoras:

P Q 2 = P R 2 + Q R 2 P Q 2 = 3 2 + 4 2 P Q = 3 2 + 4 2 = 5

The length of P Q is the distance between the points P and Q .

In order to generalise the idea, assume A is any point with co-ordinates ( x 1 ; y 1 ) and B is any other point with co-ordinates ( x 2 ; y 2 ) .

The formula for calculating the distance between two points is derived as follows. The distance between the points A and B is the length of the line A B . According to the Theorem of Pythagoras, the length of A B is given by:

A B = A C 2 + B C 2

However,

B C = y 2 - y 1 A C = x 2 - x 1

Therefore,

A B = A C 2 + B C 2 = ( x 1 - x 2 ) 2 + ( y 1 - y 2 ) 2

Therefore, for any two points, ( x 1 ; y 1 ) and ( x 2 ; y 2 ) , the formula is:

Distance= ( x 1 - x 2 ) 2 + ( y 1 - y 2 ) 2

Using the formula, distance between the points P and Q with co-ordinates (2;1) and (-2;-2) is then found as follows. Let the co-ordinates of point P be ( x 1 ; y 1 ) and the co-ordinates of point Q be ( x 2 ; y 2 ) . Then the distance is:

Distance = ( x 1 - x 2 ) 2 + ( y 1 - y 2 ) 2 = ( 2 - ( - 2 ) ) 2 + ( 1 - ( - 2 ) ) 2 = ( 2 + 2 ) 2 + ( 1 + 2 ) 2 = 16 + 9 = 25 = 5

The following video provides a summary of the distance formula.

Khan academy video on distance formula

Calculation of the gradient of a line

The gradient of a line describes how steep the line is. In the figure, line P T is the steepest. Line P S is less steep than P T but is steeper than P R , and line P R is steeper than P Q .

The gradient of a line is defined as the ratio of the vertical distance to the horizontal distance. This can be understood by looking at the line as the hypotenuse of a right-angled triangle. Then the gradient is the ratio of the length of the vertical side of the triangle to the horizontal side of the triangle. Consider a line between a point A with co-ordinates ( x 1 ; y 1 ) and a point B with co-ordinates ( x 2 ; y 2 ) .

Gradient = y 2 - y 1 x 2 - x 1

We can use the gradient of a line to determine if two lines are parallel or perpendicular. If the lines are parallel ( [link] a) then they will have the same gradient, i.e. m AB = m CD . If the lines are perpendicular ( [link] b) than we have: - 1 m AB = m CD

For example the gradient of the line between the points P and Q , with co-ordinates (2;1) and (-2;-2) ( [link] ) is:

Gradient = y 2 - y 1 x 2 - x 1 = - 2 - 1 - 2 - 2 = - 3 - 4 = 3 4

The following video provides a summary of the gradient of a line.

Gradient of a line

Midpoint of a line

Sometimes, knowing the co-ordinates of the middle point or midpoint of a line is useful. For example, what is the midpoint of the line between point P with co-ordinates ( 2 ; 1 ) and point Q with co-ordinates ( - 2 ; - 2 ) .

The co-ordinates of the midpoint of any line between any two points A and B with co-ordinates ( x 1 ; y 1 ) and ( x 2 ; y 2 ) , is generally calculated as follows. Let the midpoint of A B be at point S with co-ordinates ( X ; Y ) . The aim is to calculate X and Y in terms of ( x 1 ; y 1 ) and ( x 2 ; y 2 ) .

X = x 1 + x 2 2 Y = y 1 + y 2 2 S x 1 + x 2 2 ; y 1 + y 2 2

Then the co-ordinates of the midpoint ( S ) of the line between point P with co-ordinates ( 2 ; 1 ) and point Q with co-ordinates ( - 2 ; - 2 ) is:

X = x 1 + x 2 2 = - 2 + 2 2 = 0 Y = y 1 + y 2 2 = - 2 + 1 2 = - 1 2 S is at ( 0 ; - 1 2 )

It can be confirmed that the distance from each end point to the midpoint is equal. The co-ordinate of the midpoint S is ( 0 ; - 0 , 5 ) .

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Contemporary math applications. OpenStax CNX. Dec 15, 2014 Download for free at http://legacy.cnx.org/content/col11559/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Contemporary math applications' conversation and receive update notifications?

Ask