Noescio
Home › Sessions › Distance between two points

Distance between two points

Class 9Maths The distance formulaSession 4 Free

Two points in the plane are the ends of the hypotenuse of a right triangle whose legs are the differences in their coordinates. The Baudhayana-Pythagoras theorem then gives the distance.

Horizontal and vertical segments

If two points have the same y-coordinate, the segment joining them is horizontal. The distance between them is the difference of their x-coordinates. For (2, 3) and (9, 3), the distance is 9 − 2 = 7.

Subtracting the other way gives 2 − 9 = −7. A distance cannot be negative, so the distance is the absolute value, |x₂ − x₁|. The absolute value of a number is its size without its sign: |−7| = 7.

If two points have the same x-coordinate, the segment is vertical, and the distance is |y₂ − y₁|.

Neither coordinate is shared, so the segment is slanted. How can you find its length using only horizontal and vertical distances?

Make a right triangle. From the first point, move horizontally until you are directly above or below the second point. Then move vertically to reach it.

The horizontal and vertical moves are the two legs. Each is a horizontal or vertical distance, which you can already find. The slanted segment is the hypotenuse, and the Baudhāyana–Pythagoras theorem connects it to the legs.

Deriving the formula

Take A (3, 4) and D (7, 1). Draw a horizontal line through A and a vertical line through D. They meet at C (7, 4). The angle at C is 90°.

x y A (3, 4) D (7, 1) C (7, 4) 7 − 3 = 4 4 − 1 = 3 AD = 5 4² + 3² = 16 + 9 = 25, and √25 = 5

The right triangle between two points. Each leg is a difference of coordinates. The Baudhāyana–Pythagoras theorem gives the slanted side from the two legs.

The horizontal leg AC is 7 − 3 = 4. The vertical leg CD is 4 − 1 = 3. The theorem states that, in a right triangle, the square of the hypotenuse equals the sum of the squares of the legs:

AD = √(4² + 3²) = √25 = 5 units

No step used the particular numbers 3, 4, 7 and 1. For any two points (x₁, y₁) and (x₂, y₂), the legs are x₂ − x₁ and y₂ − y₁, so:

distance = √( (x₂ − x₁)² + (y₂ − y₁)² )

📏 Build the triangle › Drag either point. The legs, their squares and the three steps of working update with your numbers. Show the squares on the sides to see the two smaller areas add up to the larger one.

The order of subtraction does not matter

Subtract the other way for A and D: the horizontal leg becomes 3 − 7 = −4. Its square is (−4)² = 16, the same as 4². A number and its negative have the same square.

So the formula gives the same distance whichever point is taken first. It also works for points in any quadrant, without special cases.

This explains the result from session 3. Reflecting a triangle in an axis changes the sign of some coordinate differences. Squaring removes that sign change, so every side keeps its length.

Calculate DM for D (7, 1) and M (9, 6).

Horizontal leg: 9 − 7 = 2. Vertical leg: 6 − 1 = 5.

DM = √(2² + 5²) = √(4 + 25) = √29, which is about 5.39.

No whole number squares to 29, so √29 is the exact answer. 5.39 is a rounded approximation. Most distances between points with whole-number coordinates are not whole numbers.

Distance from the origin

For the origin, x₁ = 0 and y₁ = 0. The formula becomes:

distance from O = √(x² + y²)

A circle centred at the origin with radius 5 is the set of points at distance 5 from O. So a point (x, y) lies on that circle exactly when √(x² + y²) = 5. This test is used in the last session of the unit.

Check what you have understood

1The distance between (2, 3) and (9, 3) is…

Both points have y = 3, so the segment is horizontal. The distance is |9 − 2| = 7.

2The distance between (0, 0) and (6, 8) is ____ units.

√(6² + 8²) = √(36 + 64) = √100 = 10.

3Why does it not matter which point you subtract from which?

(−4)² = 4² = 16. The squaring step removes the sign, so the order of subtraction cannot change the result.

4Two points have the same x-coordinate. The distance between them is…

The segment is vertical, so the distance is |y₂ − y₁|. The general formula gives the same result, because the x-difference is 0.

5The distance between (1, 2) and (4, 6) is…

The legs are 3 and 4, so the distance is √(9 + 16) = √25 = 5.

6A distance is calculated as √29. Which is the exact answer?

√29 is exact. 5.39 is rounded to two decimal places; using it in later steps adds rounding error.

7A triangle is reflected in the y-axis. Using the distance formula, why are its side lengths unchanged?

Each x-difference becomes its negative. Its square is unchanged, the y-differences are untouched, so every length is the same.

8Which of these points are exactly 5 units from the origin?

More than one answer is correct.

√(3² + 4²) = 5, √(5² + 0²) = 5, and √(0² + (−5)²) = 5. But √(2² + 3²) = √13, about 3.6.

Next: finding the point halfway between two others.

‹ Previous: Quadrants and signs Next: Midpoints and dividing a segment ›