Skip to content

Distance Formula in Coordinate Geometry

Coordinate geometry distance formula: A(−2, −1) to B(4, 7) is 10
Coordinate geometry6 min readStarter to Challenger

The coordinate geometry distance formula gives the straight-line length between two points: d = √((x₂ − x₁)² + (y₂ − y₁)²). Find the gap in x and the gap in y. Square both, add them, then take the square root.

d = √(6² + 8²) = 10

The gaps 6 and 8 are the short sides of a right triangle. AB is its longest side.
Starter

Hello, curious mind!

What is the coordinate geometry distance formula?

The distance formula finds the length of the straight line between two points (x₁, y₁) and (x₂, y₂).

d = √((x₂ − x₁)² + (y₂ − y₁)²)

Why does it work? Draw a flat line from one point and an upright line from the other. They meet at a square corner, so you get a right triangle.

  • The flat side is x₂ − x₁. The upright side is y₂ − y₁.
  • The line between the points is the longest side, so Pythagoras’ theorem gives d² = (gap in x)² + (gap in y)².
  • Order does not matter. A gap of −6 and a gap of 6 give the same square, 36.
  • On a flat or upright line, just subtract. From (−2, 4) to (5, 4), the y values match, so d = 5 − (−2) = 7.
Explorer

How to use the distance formula: 3 worked examples

Example 1: points with negative numbers

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

  1. Gap in x: 4 − (−3) = 7. Gap in y: −2 − 5 = −7.

  2. Square and add: 49 + 49 = 98.

  3. d = √98 = 7√2 ≈ 9.90. 98 = 49 × 2, so the surd simplifies.

Example 2: decimal points

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

  1. Gaps: 3 − 0.5 = 2.5 and −4 − 2 = −6.

  2. Square and add: 6.25 + 36 = 42.25.

  3. d = √42.25 = 6.5.

Example 3: find a missing coordinate

The point (k, 2) is 13 units from (−1, −3). Find k.

  1. Write the formula with d² = 169: (k + 1)² + (2 + 3)² = 169.

  2. (k + 1)² = 169 − 25 = 144, so k + 1 = ±12.

  3. k = 11 or k = −13: two points, one on each side.

Explorer

Two jobs the distance formula does

1. Which place is nearer? (made-up map)

On a map grid, 1 unit is 1 km. A home is at (2, 9). Park A is at (−3, 6) and Park B is at (6, 4).

  • To Park A: gaps 5 and 3, so √(25 + 9) = √34 ≈ 5.83 km.
  • To Park B: gaps 4 and 5, so √(16 + 25) = √41 ≈ 6.40 km.

Park A is nearer. To compare, 34 and 41 are enough: skip the roots.

2. What type of triangle is it?

A(0, 3), B(4, 5) and C(6, 1). Work with the squares of the sides:

  • AB² = 16 + 4 = 20, BC² = 4 + 16 = 20, AC² = 36 + 4 = 40.
  • AB = BC, so the triangle is isosceles.
  • 20 + 20 = 40, so by the converse of Pythagoras it has a right angle at B.
Challenger

Beyond two points: 3D and the distance to a line

In 3D, add a third gap, (z₂ − z₁)². From (1, 0, −2) to (3, 6, 1), the gaps are 2, 6 and 3, so d = √(4 + 36 + 9) = 7.

From a point (x₀, y₀) to a line ax + by + c = 0, the distance is the shortest one, at a right angle:

d = |ax₀ + by₀ + c| ÷ √(a² + b²)

From (2, 3) to 3x − 4y + 16 = 0: |6 − 12 + 16| ÷ √(9 + 16) = 10 ÷ 5 = 2.

The bars | | mean “take the positive value”: a distance is never negative.

Explorer

Common distance formula mistakes

  1. Losing a minus sign. 5 − (−3) is 8, not 2. Use brackets.
  2. Adding the gaps before squaring. In Example 1, (7 + 7)² = 196, not 98.
  3. Mixing x and y. Writing x₂ − y₁ in place of x₂ − x₁.
  4. Stopping at d². 98 is d², not d. Take the square root.
  5. Leaving √98 as it is. Many tests want 7√2.

Check this with the Free BMI Maths Test

  • Gets 5 − (−3) wrong: CMT, calculation mistake.
  • Adds the gaps, then squares: CNC, concept not clear.
  • Puts a y value where an x value goes: CWV, copied a wrong value.
  • Gives d² as the answer: BPT, bad presentation.
  • Leaves the surd unsimplified: BPT, bad presentation.

Each slip above is one of the 6 mistake types. The Free BMI Maths Test shows which ones your child makes and finds their real maths level.

BMI = Bureau of Math Investigation

Challenger

Test prep corner

The distance formula in JEE Main and the SAT

NTA’s JEE Main 2027 maths topic list names the distance formula in Unit 10, Co-ordinate Geometry, with the distance of a point from a line. The SAT reference sheet in College Board’s digital practice tests gives c² = a² + b², but not the distance formula. These are SAT-style and JEE-style questions, not real past questions.

SAT-style: Two opposite corners of a square are at (−1, 2) and (5, 2). What is the area of the square?

The corners are on a flat line, so the diagonal is 5 − (−1) = 6. A square’s area is diagonal² ÷ 2 = 36 ÷ 2 = 18. Trap: 36 treats the diagonal as a side.

JEE-style: Find the distance between the parallel lines 3x + 4y − 7 = 0 and 6x + 8y + 11 = 0.

Divide the second line by 2: 3x + 4y + 5.5 = 0. Now the x and y parts match. Distance = |−7 − 5.5| ÷ √(9 + 16) = 12.5 ÷ 5 = 2.5. Trap: using 11 without halving gives 3.6.

For a longer mixed set, see our JEE-style maths questions with answers page.

Facts checked on 14 November 2026 on jeemain.nta.nic.in and satsuite.collegeboard.org.

Explorer

Quick check: 5 distance formula questions

1. How far is (2, −4) from the origin?

Not quite. 2 + 4 adds the gaps. Square them first.

Yes! √(4 + 16) = √20 = 2√5.

Not quite. 20 is d². Take the root.

2. What is the distance from (3, −1) to (3, 6)?

Yes! The x values match, so 6 − (−1) = 7.

Not quite. 6 − (−1) is 7, not 5.

Not quite. The gap in x is 0, not 3.

3. What is the distance from (−1, 4) to (2, 0)?

Not quite. 3 + 4 adds the gaps.

Not quite. 25 is d². Take the root.

Yes! √(9 + 16) = 5.

4. The point (a, 0) is 10 units from (0, 6). What is a?

Not quite. a² = 64 has two roots.

Yes! a² = 100 − 36 = 64.

Not quite. Subtract the squares, not the numbers.

5. How far is (1, 2, 2) from (0, 0, 0)?

Not quite. 1 + 2 + 2 adds the gaps.

Not quite. 9 is d². Take the root.

Yes! √(1 + 4 + 4) = 3.

Got 2 or fewer right? Book the Free BMI Maths Test to find the cause.

Questions people ask about the distance formula

What is the distance formula in coordinate geometry?

d = √((x₂ − x₁)² + (y₂ − y₁)²). It gives the straight-line length between two points on a grid.

How do I find the distance of a point from the origin?

Use d = √(x² + y²). For (5, −1), d = √26 ≈ 5.10.

Is the distance formula on the SAT reference sheet?

No. The sheet in College Board’s digital practice tests gives c² = a² + b². The distance formula comes from it.

Keep exploring

a²+b²Pythagoras’ theoremExplorer mSlope of a lineMath Topics
MMidpoint formulaComing soon
r²Equation of a circleComing soon

Does a lost minus sign keep costing marks?

Sign slips are often CMT, not a gap in the concept. The Free BMI Maths Test tells the two apart.

BMI = Bureau of Math Investigation

Written by Himanshu Jain

B.Tech, IIT Delhi. Founder of Math Quotient.

WhatsApp us