Canadian flagMath101 · Independent Ontario learning libraryCreated and edited by Kamran
GeometryGrades 5–8Grades 9–123 min read

Distance Formula

The distance formula uses horizontal and vertical change with the Pythagorean theorem to measure straight-line separation between coordinates.

Cheat sheet
The distance between $(x_1,y_1)$ and $(x_2,y_2)$ is $d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$.

Built from a right triangle

Horizontal change $\Delta x=x_2-x_1$ and vertical change $\Delta y=y_2-y_1$ form perpendicular legs of a right triangle. The segment joining the points is its hypotenuse, so

$$ d^2=(\Delta x)^2+(\Delta y)^2. $$

Taking the positive square root gives distance because length cannot be negative.

A reliable method

  1. Label the two points consistently.
  2. Calculate horizontal and vertical differences.
  3. Square each difference.
  4. Add.
  5. Take the principal square root.
  6. State exact or approximate form with units.

Because differences are squared, reversing both point labels gives the same distance.

Worked example

This is a scaled $3$–$4$–$5$ right triangle.

Exact and approximate form

For points $(1,2)$ and $(5,7)$, distance is

$$ \sqrt{4^2+5^2}=\sqrt{41}. $$

$\sqrt{41}$ is exact; $6.40$ is an approximation to two decimal places. Keep the radical during work and round only when the context requests a decimal.

Horizontal and vertical cases

If points share the same $y$-coordinate, distance is $|x_2-x_1|$. If they share the same $x$-coordinate, it is $|y_2-y_1|$. The general formula reduces to these simpler results automatically.

Recognizing the special case avoids unnecessary calculation and provides a check.

Proving geometric facts

Distances can verify triangle type and quadrilateral properties. Equal distances can establish congruent sides; squared distances can be compared without taking roots.

To test whether a triangle is right, find squared side lengths and check whether the two smaller sum to the largest.

Three dimensions

The same Pythagorean idea extends to space:

$$ d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}. $$

Each coordinate difference represents motion in a perpendicular direction.

Context and scale

Coordinate units might represent metres, kilometres, pixels, or map-grid intervals. If a map scale says one coordinate unit is $50$ m, multiply coordinate distance by $50$ to interpret the real separation.

Straight-line distance may differ from travel distance along roads or obstacles.

Common mistakes

Forgetting brackets around negative coordinates. Write $4-(-2)$ explicitly.

Adding differences before squaring. Square horizontal and vertical changes separately.

Stopping at $d^2$. Take the square root for distance.

Rounding too early. Preserve exact values until the final step.

Quick self-check

  • Are my coordinate differences paired correctly?
  • Did I square each complete difference?
  • Is my answer nonnegative and at least as large as either leg?
  • Are units and required precision included?

Explore the idea

Geometry measurement

Change one quantity at a time and connect what moves to Distance Formula.

Works offline
Measured geometric shapeA right triangle with base six units and height four units. width = 6height = 4
What the model is showing Static example: legs 6 and 4 give area 12 square units and hypotenuse √52 ≈ 7.21 units.
Check your understanding

Try it yourself

Hints are part of learning. Open one whenever it makes the next step feel possible.

1 practice question
Question 1Calculate coordinate distance · Gentle

Find the distance between (−2, 3) and (4, −5).

End of lesson

Nice work making it this far.

Understanding grows through return visits. Save this lesson, try the practice, or continue when you are ready.

Lesson complete

That one is yours now.

Distance Formula is saved to My Learning. Take the win—you earned it.

1Your Math101 collectionlesson completed
Search 464 published lessons, 123 answer guides, courses, and learning tools.
Your experience

Settings

Ontario math tutoringWork with KamranBook ↗