Distance Formula

Distance is the length of the shortest path between two points, always a non-negative real number.

The Formula

d=(x2−x1)2+(y2−y1)2

Ask yourself: Am I finding the shortest straight-line length between two specific points?

Quick example

Distance between (0,0) and (3,4) is 32+42=5

Notation

d(A,B) or ∣AB∣ denotes the distance between points A and B

What this formula means

The length of the shortest path between two points, always a non-negative real number.

Pull a string tight between two pins on a corkboard: it snaps into the shortest path, and its length is the distance. Any slack, like a road that wanders, makes the string longer, never shorter, which is why no route can beat the distance.

Formal view

Euclidean distance: d(P,Q)=∥P−Q∥=∑i=1n(pi−qi)2 for P,Q∈Rn; satisfies metric axioms: d(P,Q)≥0, d(P,Q)=0  ⟺  P=Q, d(P,Q)=d(Q,P), d(P,R)≤d(P,Q)+d(Q,R)

Worked examples

Example 1

easy
Find the distance between points A(1,2) and B(4,6).
Show solution

Answer

d=5 units

First step

1.
Step 1: Use the distance formula: d=(x2−x1)2+(y2−y1)2.

Full solution

  1. 2.
    Step 2: Substitute: d=(4−1)2+(6−2)2=32+42.
  2. 3.
    Step 3: Calculate: d=9+16=25=5.
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. Here the 3-4-5 right triangle makes the answer a whole number.

Example 2

medium
Find the distance between P(−2,3) and Q(4,−1). Leave your answer in simplest radical form.

Example 3

medium
Show that the points (0,0),(5,0),(5,5) form a right isosceles triangle. Compute all side lengths.

Common mistakes

  • Reporting a negative distance — distance is always non-negative.
  • Forgetting to square the differences before adding — the formula is (Δx)2+(Δy)2, not Δx+Δy.
  • Measuring along a bent path instead of straight — distance is the shortest, straight-line length.

Why this formula matters

Once you can turn two coordinate pairs into one length, you can find the sides of any shape drawn on a grid, check whether a triangle is isosceles or right-angled, find a circle's radius from its centre and one point on it, and compare how far apart places are on a map. Without it, students add the horizontal and vertical gaps and get a length that is too long for every slanted segment.

Frequently asked questions

What is the Distance formula?

The length of the shortest path between two points, always a non-negative real number.

How do you use the Distance formula?

Reach for distance when a problem asks how far apart two points are, gives two coordinate pairs and wants a length, or says straight-line or as the crow flies. Subtract coordinates, square, add and take the root. If it asks how far someone travelled along a route, add the lengths of the route's pieces instead. If it wants the direction too, use displacement or a vector; for the whole way around a shape, use perimeter.

What do the symbols mean in the Distance formula?

d(A,B) or ∣AB∣ denotes the distance between points A and B

Why is the Distance formula important in Math?

Once you can turn two coordinate pairs into one length, you can find the sides of any shape drawn on a grid, check whether a triangle is isosceles or right-angled, find a circle's radius from its centre and one point on it, and compare how far apart places are on a map. Without it, students add the horizontal and vertical gaps and get a length that is too long for every slanted segment.

What do students get wrong about Distance?

The procedure for distance is the easy part; the trap is reporting a negative distance. Asking "Am I finding the shortest straight-line length between two specific points?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

What should I learn before the Distance formula?

Before studying the Distance formula, you should understand: pythagorean theorem.