Skip to lesson content

Lesson 2 of 4

Coordinate Geometry · Lesson 2 of 4

Distance Formula

The Distance Formula is just the Pythagorean Theorem wearing a fake mustache to look like algebra.

Learning Objectives

• Understand how the distance formula is built from the Pythagoras theorem. • Use the distance formula between any two points. • Find the distance of a point from the origin. • Apply distance ideas to collinearity, triangle type and equal distance problems.

Introduction

Once two points are plotted on a coordinate plane, we may want to know the exact distance between them. For example, we might need to find the length of a line segment joining the points or compare which of two points is closer to a given location. Measuring the distance directly from a diagram may not give an accurate answer, especially when the points do not lie on the same horizontal or vertical line.

This is where the distance formula becomes useful. It allows us to calculate the straight-line distance between any two points using their coordinates.

Distance Along the Axes

If two points lie on the same axis, the distance is easy to find. On the x-axis, subtract the x-coordinates. On the y-axis, subtract the y-coordinates.

Cg L2 Distance On Axes
Distance on the AxesShow one example on x-axis and one example on y-axis with distances marked.

Deriving the Distance Formula

Take two points P(x₁, y₁) and Q(x₂, y₂). Draw horizontal and vertical lines to form a right triangle. The horizontal change is x₂ − x₁ and the vertical change is y₂ − y₁. Applying the Pythagoras theorem gives the distance between P and Q.

Cg L2 Distance Formula Derivation
How the Formula is DerivedShow P(x1,y1), Q(x2,y2), and a right triangle with horizontal leg x2-x1 and vertical leg y2-y1.
Distance FormulaLaTeX
Special Case: Distance from the Origin

If one point is the origin O(0, 0), then the distance of P(x, y) from the origin is OP = √(x² + y²).

Worked Example: Distance Between Two Points

Problem
Find the distance between A(2, 3) and B(7, 11).

  1. 1.Use the distance formula.
  2. 2.AB = √[(7 - 2)² + (11 - 3)²]
  3. 3.= √[5² + 8²]
  4. 4.= √[25 + 64]
  5. 5.= √89 units.
Worked Example: Distance from the Origin

Problem
Find the distance of the point P(-6, 8) from the origin.

  1. 1.Use the special case of the distance formula.
  2. 2.OP = √[(-6)² + 8²]
  3. 3.= √[36 + 64]
  4. 4.= √100
  5. 5.= 10 units.
Worked Example: Are Three Points Collinear?

Problem
Check whether the points A(1, 2), B(4, 6) and C(7, 10) are collinear.

  1. 1.Find AB: AB = √[(4 - 1)² + (6 - 2)²] = √[9 + 16] = 5.
  2. 2.Find BC: BC = √[(7 - 4)² + (10 - 6)²] = √[9 + 16] = 5.
  3. 3.Find AC: AC = √[(7 - 1)² + (10 - 2)²] = √[36 + 64] = 10.
  4. 4.Since AB + BC = AC, the three points lie on the same straight line.
  5. 5.Therefore, A, B and C are collinear.
Worked Example: Identify a Triangle

Problem
The points P(0, 0), Q(3, 4) and R(3, 0) form a triangle. Name its type.

  1. 1.PQ = √[(3 - 0)² + (4 - 0)²] = 5.
  2. 2.QR = √[(3 - 3)² + (4 - 0)²] = 4.
  3. 3.PR = √[(3 - 0)² + (0 - 0)²] = 3.
  4. 4.Since 3² + 4² = 5², the triangle satisfies the Pythagoras relation.
  5. 5.Therefore, △PQR is a right triangle.
Worked Example: Point Equidistant from Two Points

Problem
Find the point on the y-axis that is equidistant from A(4, 2) and B(-2, -4).

  1. 1.Let the required point be P(0, y), since it lies on the y-axis.
  2. 2.Because P is equidistant from A and B, PA = PB.
  3. 3.So, (4 - 0)² + (2 - y)² = (-2 - 0)² + (-4 - y)².
  4. 4.16 + (2 - y)² = 4 + (-4 - y)².
  5. 5.Expanding and simplifying gives y = -1.
  6. 6.Therefore, the required point is P(0, -1).
Cg L2 Distance Applications
Distance Formula in ActionShow three points on a coordinate plane with one collinear example and a right triangle example noted visually.
Common Mistakes

• Do not forget the square root at the end. • Subtract coordinates in pairs: x with x, y with y. • Distance is always non-negative. • For distance from the origin, use both x and y, not only one coordinate.

Try These

Quiz

Quick check

Which theorem is used to derive the distance formula?

Quick check

What is the distance of the point (3, 4) from the origin?

Quick check

Which expression gives the distance between A(x₁, y₁) and B(x₂, y₂)?

Practice Problems

Practice Problems
  1. Find the distance between (3, -2) and (8, 4).
  2. Find the distance of the point (-5, 12) from the origin.
  3. Check whether the points (2, 1), (4, 5) and (6, 9) are collinear.

Key Takeaways

Key Takeaways

• The distance formula is used to find the straight-line distance between two points on a coordinate plane. • For points P(x₁, y₁) and Q(x₂, y₂), the distance is PQ = √[(x₂ − x₁)² + (y₂ − y₁)²]. • The distance formula is derived from the Pythagoras theorem by treating the horizontal and vertical differences as the legs of a right triangle. • The order of subtraction does not affect the answer because the coordinate differences are squared. • Distance is always non-negative, and it is zero only when the two points have exactly the same coordinates.