Distance in the Coordinate Plane
How far apart are two points on a graph? If they line up horizontally or vertically, you can simply count the units between them. When they don't line up, the segment connecting them is slanted — and the trick is to see that slanted segment as the hypotenuse of a right triangle.
Draw one leg going across and one leg going up, and the Pythagorean theorem hands you the distance. There is no new formula to learn — this is the same theorem you already know, pointed at the coordinate plane.
Build the right triangle
Start at one point and travel horizontally until you are directly below or above the other point, then travel vertically up to it. Those two paths are the legs of a right triangle, and the slanted segment between the original points is the hypotenuse.
The horizontal leg is the difference in the -coordinates, and the vertical leg is the difference in the -coordinates. In the figure, the legs are and , so the distance is .
The steps
Subtract the -coordinates to get the horizontal leg, and subtract the -coordinates to get the vertical leg. If a difference comes out negative, drop the sign — a leg is a length, and lengths are positive.
Then square both legs, add, and take the square root: the distance is , where and are the two legs.
Watch the negatives
Points with negative coordinates cause the most errors. The horizontal distance from to is , not — subtracting a negative combines the distance on each side of zero. When in doubt, sketch the two points and count the units for each leg instead of relying on the arithmetic.
Worked examples
Example 1: two points given
What is the distance between the points and ?
Answer:
Example 2: negative coordinates
What is the distance between the points and ?
Answer:
Example 3: a straight-line distance on a map
On a city map, each unit represents one block. Mia's house is at and her school is at . How far is the school from her house in a straight line?
Answer: blocks
Try one yourself
Common questions
Is this the same as the distance formula?
Yes. The distance formula is the Pythagorean theorem with the legs written as coordinate differences. If you can build the right triangle, you already know the formula.
What if the two points line up horizontally or vertically?
Then there is no triangle to build — the distance is just the difference of the coordinates that change. From to the distance is .
What if the distance isn't a whole number?
That happens often. If the legs are and , then , so the distance is . Leave the answer as a square root unless the problem asks you to round.
Does it matter which point I start from?
No. Swapping the points flips the sign of each difference, and squaring removes the sign — so both orders give the same distance.
Want the video version?
Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.