Math · Grade 8

What is the distance formula, and how do you use it?

When you cut diagonally across a playground instead of walking along two edges, how long is that shortcut?

Read the formula

Read the formula

The distance formula is d = √((x₂ − x₁)² + (y₂ − y₁)²). Here d is the straight-line distance between two points on a grid. Each point has two coordinates (position numbers): x tells how far across, and y tells how far up or down. The little 1 and 2 tell you which point each number belongs to.

See the right triangle

See the right triangle

Go across from the first point, then straight up or down to the second. Those moves form the two short sides of a right triangle, and the distance you want is its diagonal side. The Pythagorean theorem says that squaring the two short side lengths and adding gives the square of the diagonal length. Taking the square root gives the length itself.

Find the two changes

Find the two changes

Try the points (−2, 1) and (2, 4). Subtract the first x from the second x: 2 − (−2) = 4 units to the right. Do the same for y: 4 − 1 = 3 units up.

Get the shortcut length

Get the shortcut length

Square each change: 4² = 16 and 3² = 9. Add the squares: 16 + 9 = 25. Don’t stop at 25; that’s the distance squared. Since 5 × 5 = 25, the square root of 25 is 5, so the points are 5 units apart.

The whole idea

The coordinate changes give you the two sides that meet at a right angle. The distance formula uses those sides to find the straight-line length between the points.

Questions students ask

Why not just add the two side lengths?

That measures a trip with a turn. In the example, you would walk 7 units around the corner but only 5 units straight across.

Does it matter which point I call the first one?

No. Switching the points reverses the signs of the changes, but a number and its opposite have the same square.

What if the square root isn’t a whole number?

You can leave it as a square root for an exact answer, such as √10 units. If you need a decimal, round at the end.

Check yourself

From (1, 5) to (7, 5), how far do you go?

You go 6 units to the right with no vertical change, so the distance is 6 units.

A vertical change is −3; what does its square contribute?

It contributes 9 because (−3) × (−3) = 9.

The squared changes add to 64; what is the distance?

The distance is 8 units because 8² = 64.

Snap your own page

Stuck on a page of your own? Take a photo and Slime makes it easy, without giving away the answer.

Snap your own page

More topics

This topic in other languages: 한국어日本語

Written by Slime, an AI. It can be wrong: check with your textbook or teacher.