Distance Formula Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Distance Formula.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

A formula for finding the distance between two points in the coordinate plane, derived directly from the Pythagorean theorem.

Imagine two points on a grid. Draw a horizontal line from one and a vertical line from the other to form a right triangle. The horizontal leg is the difference in xx-coordinates, the vertical leg is the difference in yy-coordinates, and the hypotenuseβ€”the direct distanceβ€”comes from the Pythagorean theorem. The distance formula is just a2+b2=c2a^2 + b^2 = c^2 in coordinate clothing.

Read the full concept explanation β†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: The straight-line distance between two points is the hypotenuse of the right triangle made by their coordinate differences.

Common stuck point: The procedure for distance formula is the easy part; the trap is forgetting to square the differences before adding. Asking "Do I have two points' coordinates and need the length of the segment joining them?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Do I have two points' coordinates and need the length of the segment joining them?

Worked Examples

Example 1

easy
Find the distance between the points (1,2)(1, 2) and (4,6)(4, 6).

Answer

d=5d = 5

First step

1
The distance formula is derived from the Pythagorean theorem: the horizontal and vertical separations form the legs of a right triangle, and the distance is the hypotenuse. d=(x2βˆ’x1)2+(y2βˆ’y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}.

Full solution

  1. 2
    Identify the coordinates: (x1,y1)=(1,2)(x_1, y_1) = (1, 2) and (x2,y2)=(4,6)(x_2, y_2) = (4, 6). Compute the differences: x2βˆ’x1=3x_2 - x_1 = 3, y2βˆ’y1=4y_2 - y_1 = 4.
  2. 3
    Substitute: d=32+42=9+16=25=5d = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5. Recognise the 3-4-5 Pythagorean triple β€” no calculator needed.
The distance formula is a direct application of the Pythagorean theorem on the coordinate plane. The horizontal and vertical differences form the legs of a right triangle, and the distance is the hypotenuse.

Example 2

medium
Find the distance between (βˆ’3,5)(-3, 5) and (2,βˆ’7)(2, -7).

Example 3

medium
Show that the points A(1,1),B(4,5),C(8,2)A(1, 1), B(4, 5), C(8, 2) form a right triangle.

Example 4

challenge
Derive the distance formula from the Pythagorean theorem starting with two general points P1(x1,y1)P_1(x_1, y_1) and P2(x2,y2)P_2(x_2, y_2).

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

medium
Show that the triangle with vertices A(0,0)A(0, 0), B(3,4)B(3, 4), and C(6,0)C(6, 0) is isosceles.

Example 2

medium
Find the points on the xx-axis that are 55 units away from the point (2,4)(2, 4).

Example 3

easy
Find the distance between (2,3)(2, 3) and (7,15)(7, 15).

Example 4

easy
Find the distance between (βˆ’1,4)(-1, 4) and (2,0)(2, 0).

Example 5

easy
Find the distance between (6,βˆ’2)(6, -2) and (6,7)(6, 7).

Example 6

easy
Find the distance between (0,0)(0, 0) and (9,12)(9, 12).

Example 7

easy
Find the distance between (3,8)(3, 8) and (0,4)(0, 4).

Example 8

medium
Find the distance from (2,3)(2, 3) to (2+62,3+62)(2 + 6\sqrt{2}, 3 + 6\sqrt{2}).

Example 9

medium
Find the distance between (βˆ’5,2)(-5, 2) and (3,βˆ’4)(3, -4), in simplest radical form.

Example 10

medium
A circle has equation (xβˆ’4)2+(y+1)2=25(x - 4)^2 + (y + 1)^2 = 25. Is the point (8,2)(8, 2) on, inside, or outside the circle?

Example 11

medium
Find the perimeter of the triangle with vertices (0,0),(8,0),(4,6)(0, 0), (8, 0), (4, 6).

Example 12

medium
Find the distance between (1,βˆ’2)(1, -2) and (4,2)(4, 2).

Example 13

medium
A square has vertices (0,0),(a,0),(a,a),(0,a)(0,0), (a, 0), (a, a), (0, a). Find the length of its diagonal in terms of aa.

Example 14

medium
Find a point on the yy-axis at distance 50\sqrt{50} from (5,0)(5, 0).

Example 15

medium
Find the 3D distance between (0,0,0)(0, 0, 0) and (3,4,12)(3, 4, 12).

Example 16

hard
The midpoint of segment ABAB is (3,5)(3, 5) and A=(βˆ’1,2)A = (-1, 2). Find BB and the length of ABAB.

Example 17

hard
Determine whether the points (0,0),(4,0),(4,3),(0,3)(0, 0), (4, 0), (4, 3), (0, 3) form a rectangle by computing the diagonals.

Example 18

hard
Find the point on the line y=2xy = 2x closest to the point (5,0)(5, 0).

Example 19

hard
If (x,y)(x, y) is equidistant from (0,0)(0, 0) and (6,8)(6, 8), find the equation relating xx and yy.

Example 20

hard
Find the distance between the centers of two circles x2+y2=4x^2 + y^2 = 4 and (xβˆ’7)2+(yβˆ’24)2=9(x - 7)^2 + (y - 24)^2 = 9, and determine whether they intersect.

Example 21

hard
A regular hexagon has center at the origin and a vertex at (4,0)(4, 0). Find the distance between two adjacent vertices.

Example 22

hard
Three towns at (0,0),(12,0),(0,5)(0, 0), (12, 0), (0, 5). Which two are farthest apart?

Example 23

hard
Find all aa such that (a,2a)(a, 2a) is at distance 45\sqrt{45} from the origin.

Example 24

challenge
Find the area of the triangle with vertices A(0,0),B(6,0),C(2,4)A(0, 0), B(6, 0), C(2, 4) using the distance formula plus Heron's formula.

Background Knowledge

These ideas may be useful before you work through the harder examples.

pythagorean theoremcoordinate planesquare roots