Geometry · Grade 8

Distance on the Coordinate Plane

Quick answer

Two points that share a coordinate are a subtraction apart. Two that share neither are the hypotenuse of a right triangle whose legs run across and up, so the Pythagorean theorem gives the distance. That is all the distance formula is — a² + b² = c² with the legs written as differences of coordinates.

What you'll learn

  • Find the distance between two points on the coordinate plane
  • Explain where the distance formula comes from
  • Find the perimeter and area of a polygon drawn on a grid

When the points line up

If two points share a coordinate, they sit on a grid line and no formula is needed.

(2,−3) to (2,5):∣−3−5∣=8(2, -3) \text{ to } (2, 5): \qquad |{-3} - 5| = 8

The xx matches, so the points lie on a vertical line, and the distance is the difference in yy with the sign stripped by absolute value.

When they do not

Two points sharing neither coordinate are the ends of a hypotenuse.

The distance from (1, 1) to (7, 4) A coordinate grid. A right triangle has its right angle at (7, 1). The horizontal leg runs six units from (1, 1) to (7, 1), the vertical leg runs three units up to (7, 4), and the hypotenuse joins (1, 1) directly to (7, 4). 6 by 3 2468246xy (1, 1) (7, 4)
The distance from (1, 1) to (7, 4)

Draw a horizontal leg and a vertical leg. They meet at a right angle, so the Pythagorean theorem applies:

across=∣7−1∣=6up=∣4−1∣=3\text{across} = |7 - 1| = 6 \qquad \text{up} = |4 - 1| = 3 62+32=c2⇒36+9=456^2 + 3^2 = c^2 \quad\Rightarrow\quad 36 + 9 = 45 c=45≈6.7c = \sqrt{45} \approx 6.7

The distance formula is that, written down

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Compare it with a2+b2=c2a^2 + b^2 = c^2:

TheoremFormulaMeaning
aax2−x1x_2 - x_1the horizontal leg
bby2−y1y_2 - y_1the vertical leg
ccddthe hypotenuse

The formula is not a new fact. It is the Pythagorean theorem with the legs expressed as coordinate differences, and the square root moved to the front because you want cc rather than c2c^2.

Working an example

Find the distance from (−2,3)(-2, 3) to (4,−5)(4, -5).

x2−x1=4−(−2)=6y2−y1=−5−3=−8x_2 - x_1 = 4 - (-2) = 6 \qquad y_2 - y_1 = -5 - 3 = -8 d=62+(−8)2=36+64=100=10d = \sqrt{6^2 + (-8)^2} = \sqrt{36 + 64} = \sqrt{100} = 10

The −8-8 squared to +64+64, so the negative never reached the answer.

Polygons on a grid

A polygon’s vertices are coordinates, so its perimeter is a sum of distances.

A triangle with vertices on the grid A coordinate grid with a triangle whose corners are at (0, 0), (6, 0) and (6, 8). The base runs six units along the horizontal axis and the right side runs eight units up. P 2468246810xy (0, 0) (6, 0) (6, 8)
A triangle with vertices on the grid

Two sides lie along grid lines, so they are subtractions:

base=∣6−0∣=6right side=∣8−0∣=8\text{base} = |6 - 0| = 6 \qquad \text{right side} = |8 - 0| = 8

The third is slanted, so it needs the formula:

d=62+82=100=10d = \sqrt{6^2 + 8^2} = \sqrt{100} = 10 perimeter=6+8+10=24\text{perimeter} = 6 + 8 + 10 = 24

The area is easier, because the right angle means the two grid-line sides are the base and height:

A=12×6×8=24 square unitsA = \tfrac{1}{2} \times 6 \times 8 = 24 \text{ square units}

That the perimeter and area both come to 2424 is a coincidence of this triangle, not a rule — one is a length and the other an area.

Why the coordinate plane makes distance computable

Before coordinates, finding a distance meant measuring it. With coordinates it becomes arithmetic on two pairs of numbers, and that changes what is possible.

A computer has no ruler. Every distance it calculates — how far a character is from a wall, whether two circles overlap, which of a thousand points is nearest — runs through this formula. The screen has coordinates, so the geometry becomes subtraction, squaring and a square root.

It also runs in three dimensions, with one more term under the root:

d=(Δx)2+(Δy)2+(Δz)2d = \sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}

The reason is the same. The third axis is perpendicular to the other two, so the theorem applies again.

Worked examples

Common mistakes

Practice problems

  1. Find the distance from (2,1)(2, 1) to (2,7)(2, 7).

    Answer

    66

    Full solution

    The xx matches, so ∣7−1∣=6|7 - 1| = 6.

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

    Answer

    1010

    Full solution

    36+64=100=10\sqrt{36 + 64} = \sqrt{100} = 10.

  3. Find the distance from (1,2)(1, 2) to (4,6)(4, 6).

    Answer

    55

    Full solution

    Differences of 33 and 44: 9+16=5\sqrt{9 + 16} = 5.

  4. Find the distance from (−3,0)(-3, 0) to (5,0)(5, 0).

    Answer

    88

    Full solution

    Both lie on the xx-axis: ∣5−(−3)∣=8|5 - (-3)| = 8.

  5. Find the distance from (2,3)(2, 3) to (5,7)(5, 7).

    Answer

    55

    Full solution

    Differences of 33 and 44 again: 25=5\sqrt{25} = 5.

  6. Find the distance from (0,0)(0, 0) to (2,3)(2, 3), leaving the answer exact.

    Answer

    13\sqrt{13}

    Full solution

    4+9=13\sqrt{4 + 9} = \sqrt{13}, which is irrational and cannot be simplified.

  7. Find the distance from (−2,−1)(-2, -1) to (1,3)(1, 3).

    Answer

    55

    Full solution

    x2−x1=3x_2 - x_1 = 3 and y2−y1=4y_2 - y_1 = 4, giving 25=5\sqrt{25} = 5.

  8. A rectangle has corners (0,0)(0, 0), (7,0)(7, 0), (7,2)(7, 2), (0,2)(0, 2). Find its perimeter.

    Answer

    1818

    Full solution

    Width 77, height 22, so 2(7)+2(2)=182(7) + 2(2) = 18.

  9. A triangle has vertices (0,0)(0, 0), (4,0)(4, 0) and (4,3)(4, 3). Find its perimeter.

    Hint

    Which side needs the formula?

    Answer

    1212

    Full solution

    Two sides lie on grid lines: base 44 and height 33.

    The hypotenuse needs the formula: 16+9=5\sqrt{16 + 9} = 5.

    Perimeter: 4+3+5=124 + 3 + 5 = 12.

  10. Finding the distance from (1,2)(1, 2) to (7,10)(7, 10), Ana writes 6+8=146 + 8 = 14. Find her error.

    Hint

    Is the direct route longer or shorter than going across then up?

    Answer

    She added the legs instead of using the theorem. The distance is 1010.

    Full solution

    Her differences are right: 66 across and 88 up. Adding them measures the route that goes across and then up, which is two sides of a right triangle.

    The distance between the points is the hypotenuse, the direct route:

    62+82=100=10\sqrt{6^2 + 8^2} = \sqrt{100} = 10.

    A sense check settles it without any arithmetic. The straight line between two points is always shorter than any path that turns a corner, so an answer of 1414 has to be too large.

Frequently asked questions

What is the distance formula?

d = √((x₂ − x₁)² + (y₂ − y₁)²). It is the Pythagorean theorem with the legs written as the differences in x and y.

Do I need the formula if the points line up?

No. If two points share an x or a y they lie on a grid line, so subtract the other coordinate and take the absolute value.

Does the order of subtraction matter?

No. Each difference is squared, and squaring removes the sign, so subtracting either way gives the same distance.

Why is there a square root?

Because the theorem gives c², the square of the distance. The root is the last step that turns an area back into a length.

How do I find the perimeter of a polygon on a grid?

Find each side's length separately — a subtraction for the horizontal and vertical sides, the distance formula for the slanted ones — then add them.

What to learn next

Standards alignment

This lesson covers the following Common Core State Standards for Mathematics.

  • CCSS.MATH.CONTENT.8.G.B.8GeometryApply the Pythagorean Theorem to find the distance between two points in a coordinate system.
  • CCSS.MATH.CONTENT.6.G.A.3GeometryDraw polygons in the coordinate plane given coordinates for the vertices; use coordinates to find the length of a side joining points with the same first coordinate or the same second coordinate. Apply these techniques in the context of solving real-world and mathematical problems.
  • CCSS.MATH.CONTENT.HSG.GPE.B.7Expressing Geometric Properties with EquationsUse coordinates to compute perimeters of polygons and areas of triangles and rectangles, e.g., using the distance formula.