On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Geometry Fundamentals · Grade 6-8

Distance on the Coordinate Plane

Distance on the coordinate plane means finding the straight-line distance between two points.

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

Quick Answer

Distance on the coordinate plane means finding the straight-line distance between two points. Use it when two points are given as coordinates and you need how far apart they are in a straight line, as a bird flies rather than along the grid. The run (change in x) and the rise (change in y) form the legs of a right triangle, and the Pythagorean theorem gives the slanted side: d=(x2−x1)2+(y2−y1)2. When the points share an x- or y-coordinate, just subtract the other coordinates.

Why This Matters

Maps, games and screens all store positions as coordinates, so this is how a game checks whether an enemy is within 5 squares of a tower, or how an app finds the straight-line distance between two places. Adding the run and the rise instead gives the longer along-the-grid distance: from (1,2) to (5,5) that is 7 instead of 5.

Intuitive Explanation

On a city map laid out in blocks, walking from the corner at (2,1) to the corner at (8,9) takes you 6 blocks east and 8 blocks north, 14 blocks in all. A drone flying straight between the corners travels less. Its path is the slanted side of a right triangle whose legs are the 6 blocks east and the 8 blocks north.

The Pythagorean theorem finds that slanted side: d2=62+82=36+64=100, so d=100=10 blocks. Stopping at 100 would give the distance squared, not the distance. In general the legs are the coordinate differences x2−x1 and y2−y1, which gives d=(x2−x1)2+(y2−y1)2. A negative difference does no harm, because squaring makes it positive: going from (8,9) back to (2,1) gives legs −6 and −8 and still d=10.

When the two points line up horizontally or vertically there is no triangle: from (2,1) to (2,9) the distance is just 9−1=8. Distance is also not the same as slope. Slope compares the legs by dividing, rise over run, and tells you how steep the segment is. Distance combines them with squares and a square root and tells you how long it is.

Think of it like this. Cutting diagonally across a rectangular park is shorter than walking the sidewalk around two sides, east then north, and the Pythagorean theorem says exactly how much shorter. Because the legs are squared, direction does not matter: crossing the park either way gives the same length.

Core idea. Coordinate distance is Pythagorean theorem applied to horizontal and vertical changes.


When to Use

Use the distance formula when two points are given as coordinates and the question asks how far apart they are, the length of a segment, or the side length of a shape drawn on a grid. If the points share an x- or a y-value, just subtract. If the question asks how steep the segment is, find the slope instead; if it asks for the point halfway between, average the coordinates to get the midpoint.

Tip. Ask: Can I draw horizontal and vertical legs between the points?

How to Recognize It

Before you calculate, plot or picture the two points and see whether they line up across, line up up-and-down, or sit diagonally apart.

  1. Do the two points sit on the same horizontal or vertical grid line?

    Then just count or subtract: from (−3,2) to (5,2) is 5−(−3)=8 units. When the points are on opposite sides of an axis, subtracting the negative adds the two parts, 3 and 5.

  2. Must the path follow the grid, like streets, instead of going straight?

    Then add the run and the rise: from (1,1) to (7,9) is 6+8=14 blocks along the streets. Only the straight path uses the Pythagorean theorem, giving 10.

  3. Do you already know the side lengths of the right triangle, with no points given?

    Then you do not need coordinates; use the Pythagorean theorem with the two legs. Coordinate distance is the same theorem, with the legs found by subtracting x-values and y-values.

  4. Does the problem ask how steep the line between the points is?

    Then it is slope: rise divided by run, a ratio with no length units. Distance squares the rise and run and adds them; slope divides one by the other.

Distance on the Coordinate Plane compared with Pythagorean theorem and Slope

Coordinate distance, the Pythagorean theorem and slope all use the same right triangle drawn between two points. Ask whether you want the length of the slanted side, a side of a triangle you already know, or how steep the slanted side is.

Distance on the Coordinate Plane

Meaning
Use this when two points on a coordinate plane have a straight-line distance to find.
Key test
Can I draw horizontal and vertical legs between the points?
Formula
d=(x2−x1)2+(y2−y1)2
Example
Find the distance from (1,2) to (5,5).

Pythagorean theorem

Meaning
The underlying right-triangle rule.
Key test
Use when the triangle side lengths are already known.
Formula
a2+b2=c2
Example
Legs 3 and 4

Slope

Meaning
Measures steepness as rise over run.
Key test
Use when the question asks rate of change, not length.
Formula
m=Δy/Δx
Example
How steep is the line?

Formula & Notation

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

How to read it: Horizontal and vertical coordinate differences become the legs of a right triangle.

Worked Examples

Example 1 — Distance between points

Easy

Find the distance from (1,2) to (5,5).
Show the steps and the answer
  1. Find the horizontal leg: 5−1=4.

    Moving from x=1 to x=5 is 4 units to the right.

  2. Find the vertical leg: 5−2=3.

    Moving from y=2 to y=5 is 3 units up, and the two legs meet at the corner (5,2) at a right angle.

  3. Use the Pythagorean theorem: d2=42+32=16+9=25.

    The straight path between the points is the hypotenuse of that right triangle.

  4. Take the square root: d=25=5 units.

    25 is the distance squared. The distance, 5, is less than the 4+3=7 units of walking along the grid, as a shortcut should be.

Answer: 5 units

Takeaway: Subtract the x's and the y's, square them, add, then take the square root: 16+9=5.

Example 2 — Find slope

Standard

Find the slope from (1,2) to (5,5).
Show the steps and the answer
  1. Notice the question asks for slope: how steep the segment is, not how long.

    The same two points can be asked about in different ways, and slope means rise over run.

  2. Find the same two legs: rise =5−2=3, run =5−1=4.

    Slope and distance both start from the vertical and horizontal changes.

  3. Divide: slope =34.

    Slope compares the legs by dividing; distance would combine them as 32+42=5.

Answer: 3/4

Takeaway: Rise over run gives steepness, 34; squares and a square root give length, 5.

Example 3 — Find the mistake: stopping before the square root

Application

Find the distance from (−2,1) to (4,9). Jordan writes: "(4−(−2))2+(9−1)2=36+64=100, so the distance is 100 units." Find the mistake and correct it.
Show the steps and the answer
  1. Check Jordan's legs: 4−(−2)=6 and 9−1=8.

    Subtracting a negative number adds, so the horizontal leg is 6; Jordan got this right.

  2. Check the squares: 62+82=36+64=100.

    This is right too, but by the Pythagorean theorem it equals d2, the distance squared.

  3. Finish with the square root that Jordan left out: d=100=10.

    The theorem gives d2, so the distance itself is the number whose square is 100.

  4. Check by size: the distance must be more than 8 (the longer leg) and less than 6+8=14 (the walk along the grid).

    100 is far outside that range, while 10 fits inside it.

Answer: 10 units

Takeaway: The sum of the squared legs is d2; finish with the square root, and check the result lies between the longer leg and the sum of the legs.

Where You'll See It

  • Tower range in a video game

    A tower at (3,4) can hit enemies within 5 tiles. An enemy at (6,8) is 32+42=5 tiles away, just in range; one at (7,8) is 42+42=32≈5.7 tiles away, out of range.

  • As the crow flies on a map

    On a map with 1 km squares, a cabin at (0,0) and a lake at (9,12) are 81+144=225=15 km apart in a straight line, while a trail along the grid lines would be 9+12=21 km.

  • Telling a tap from a swipe

    A touchscreen records touches in pixels. If your finger goes down at (100,200) and lifts at (160,280), it moved 602+802=10,000=100 pixels, far enough for the phone to treat it as a swipe rather than a tap.

Common Mistakes

  1. The slip: Adding run and rise

    Instead: use Pythagorean theorem for diagonal distance.

  2. The slip: Squaring the sum instead of summing the squares

    Instead: (Δx+Δy)2 is not Δx2+Δy2.

  3. The slip: Forgetting square root after adding squares

    Instead: the sum is distance squared.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Find the distance between (2,3) and (2,11).

    Hint: The x-coordinates match, so the segment is vertical.

  2. Find the distance from (0,0) to (6,8).

    Hint: Square the horizontal and vertical changes, add, then take the square root.

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

    Hint: Be careful with signs: the change in x is 2−(−3).

  4. Find the distance between (1,1) and (4,3). Give the exact value and a decimal to two places.

    Hint: The sum of squares will not be a perfect square this time.

  5. A drone flies in a straight line from (0,0) to (9,12) on a map grid. You want to know how far it flew. Do you need the distance or the slope?

    Hint: Does the question ask how long or how steep?

  6. Tom finds the distance from (1,−2) to (7,6) by adding the run and rise: 6+8=14. Correct Tom.

    Hint: The straight path is the hypotenuse of a right triangle, not the two legs walked one after the other.

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

How can I check my answer without a calculator?

Two quick tests help. First, the straight distance must be longer than the longer leg and shorter than the two legs added together. Second, estimate the square root between whole numbers: 50\sqrt{50} is between 7 and 8, because 72=497^2 = 49 and 82=648^2 = 64, and it is just over 7. For legs of 5 and 5, an answer of about 7.07 passes both tests.

How does a video game know how far apart two characters are?

It stores each character's position as coordinates and runs this calculation, often thousands of times a second. To save time, many games skip the square root: to check whether two characters are closer than 10 units, they test whether the squared distance is less than 100. Skipping the root gives the same yes or no answer with less work.

How do I find the perimeter of a shape drawn on a grid?

Find each side's length separately, then add. Count the horizontal and vertical sides; use the Pythagorean theorem for slanted ones. For the triangle (0,0)(0, 0), (4,0)(4, 0), (4,3)(4, 3), the sides are 4, 3 and 16+9=5\sqrt{16 + 9} = 5, so the perimeter is 12. Slanted sides on a grid are always longer than they first look.

Learning Path

Distance on the Coordinate Plane

You are here

You need the Coordinate Plane (reading (x,y)), the Pythagorean Theorem (a2+b2=c2) and Square Roots first. This concept joins them: the coordinate differences become the legs of a right triangle, and the distance is its hypotenuse. Next, the Distance Formula writes this as one general rule, and the Midpoint Formula finds the point halfway along the same segment.

See Also