Expresswala Academy Mathematics Tuition

Coordinate Geometry

Distance Formula in Coordinate Geometry: Class 10 Guide

Learn the distance formula from Pythagoras, then use it to test collinearity, classify triangles and quadrilaterals, find unknown coordinates and locate equidistant points, with six worked examples.

By 9 min read

Coor­di­nate geom­e­try joins alge­bra and geom­e­try. Once every point of a plane has a pair of num­bers attached to it, we can mea­sure lengths, test shapes and locate points with plain arith­metic instead of a ruler. The dis­tance for­mula is the first and most-used tool of this chap­ter. With it you can find how far apart two points are, check whether three points lie on one line, and decide whether four points make a square, a rhom­bus, a rec­tan­gle or just a par­al­lel­o­gram. The same idea is used in maps, in com­puter graph­ics and wher­ever posi­tions are stored as coor­di­nates.

The coor­di­nate plane: a quick recap

Axes, ori­gin and coor­di­nates

Two per­pen­dic­u­lar num­ber lines, the hor­i­zon­tal x-axis and the ver­ti­cal y-axis, meet at the ori­gin O(0,0)O(0, 0). Every point PP is described by an ordered pair (x,y)(x, y). The first num­ber, the abscissa, is the signed dis­tance of PP from the y-axis. The sec­ond num­ber, the ordi­nate, is the signed dis­tance of PP from the x-axis.

  • A point on the x-axis has the form (x,0)(x, 0).
  • A point on the y-axis has the form (0,y)(0, y).

The four quad­rants

The axes divide the plane into four quad­rants, num­bered anti­clock­wise start­ing from the top right.

Quad­rantSign of xSign of yExam­ple
I++(3,4)(3, 4)
II−+(−3,4)(-3, 4)
III−−(−3,−4)(-3, -4)
IV+−(3,−4)(3, -4)

Points on the axes do not belong to any quad­rant.

The dis­tance for­mula

State­ment

The dis­tance between the points A(x1,y1)A(x_1, y_1) and B(x2,y2)B(x_2, y_2) is

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

In par­tic­u­lar, the dis­tance of a point P(x,y)P(x, y) from the ori­gin is

OP=x2+y2OP = \sqrt{x^2 + y^2}

Why the for­mula is true

Take A(x1,y1)A(x_1, y_1) and B(x2,y2)B(x_2, y_2) with ABAB nei­ther hor­i­zon­tal nor ver­ti­cal. Through AA draw a line par­al­lel to the x-axis, and through BB a line par­al­lel to the y-axis. They meet at C(x2,y1)C(x_2, y_1), and the angle at CC is a right angle because the axes are per­pen­dic­u­lar.

  • AA and CC have the same y-coor­di­nate, so AC=∣x2−x1∣AC = |x_2 - x_1|.
  • BB and CC have the same x-coor­di­nate, so BC=∣y2−y1∣BC = |y_2 - y_1|.

By the Pythago­ras the­o­rem in right tri­an­gle ACBACB,

AB2=AC2+BC2=∣x2−x1∣2+∣y2−y1∣2=(x2−x1)2+(y2−y1)2\begin{aligned} AB^2 &= AC^2 + BC^2 \\ &= |x_2 - x_1|^2 + |y_2 - y_1|^2 \\ &= (x_2 - x_1)^2 + (y_2 - y_1)^2 \end{aligned}

A square of a num­ber equals the square of its absolute value, so the mod­u­lus signs can be dropped. Since a dis­tance is never neg­a­tive, we take the pos­i­tive square root. If ABAB is hor­i­zon­tal, then y2=y1y_2 = y_1 and the for­mula gives ∣x2−x1∣|x_2 - x_1|, which is cor­rect. The ver­ti­cal case works in the same way. So the for­mula holds for every pair of points.

Putting A=O(0,0)A = O(0, 0) gives the dis­tance from the ori­gin, x2+y2\sqrt{x^2 + y^2}.

Right triangle on a grid with A(2, −3), B(−4, 5) and right angle at C(−4, −3); AC = 6, BC = 8 and hypotenuse AB = 10 labelled.
The dis­tance for­mula is Pythago­ras on a grid: AC = 6, BC = 8, so AB = 10.

The order of the points does not mat­ter: (x2−x1)2=(x1−x2)2(x_2 - x_1)^2 = (x_1 - x_2)^2. So AB=BAAB = BA, as it should.

Uses of the dis­tance for­mula

Check­ing whether three points are collinear

Three points AA, BB, CC lie on one straight line exactly when the largest of the three dis­tances equals the sum of the other two, for exam­ple AB+BC=ACAB + BC = AC. If the largest dis­tance is less than the sum of the other two, the points form a tri­an­gle.

Clas­si­fy­ing tri­an­gles

  • Equi­lat­eral: all three sides equal.
  • Isosce­les: two sides equal.
  • Sca­lene: no two sides equal.
  • Right-angled: the square of the longest side equals the sum of the squares of the other two (con­verse of Pythago­ras).

Clas­si­fy­ing quadri­lat­er­als

Take the ver­tices A,B,C,DA, B, C, D in order. Find the four sides AB,BC,CD,DAAB, BC, CD, DA and the two diag­o­nals AC,BDAC, BD.

SidesDiag­o­nalsQuadri­lat­eral
All four equalEqualSquare
All four equalNot equalRhom­bus (not a square)
Oppo­site sides equalEqualRec­tan­gle
Oppo­site sides equalNot equalPar­al­lel­o­gram (not a rec­tan­gle)

These tests rest on stan­dard facts. A quadri­lat­eral with both pairs of oppo­site sides equal is a par­al­lel­o­gram. A par­al­lel­o­gram with equal diag­o­nals is a rec­tan­gle. A rhom­bus with equal diag­o­nals is a square.

Method in steps

  1. Write the two points as (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2).
  2. Find x2−x1x_2 - x_1 and y2−y1y_2 - y_1, tak­ing care with signs.
  3. Square both, add them and take the pos­i­tive square root.
  4. For shape ques­tions, work out every side and both diag­o­nals first, then com­pare them with the tables above.
  5. For an unknown coor­di­nate, square both sides of the dis­tance equa­tion before solv­ing, then check every value you get.

Worked exam­ples

Exam­ple 1: dis­tance between two points

Find the dis­tance between A(2,−3)A(2, -3) and B(−4,5)B(-4, 5).

AB=(−4−2)2+(5−(−3))2=(−6)2+82=36+64=100=10\begin{aligned} AB &= \sqrt{(-4 - 2)^2 + (5 - (-3))^2} \\ &= \sqrt{(-6)^2 + 8^2} \\ &= \sqrt{36 + 64} = \sqrt{100} = 10 \end{aligned}

So AB=10AB = 10 units. This is the tri­an­gle shown in the fig­ure above.

Exam­ple 2: dis­tance from the ori­gin

How far is P(−5,12)P(-5, 12) from the ori­gin?

OP=(−5)2+122=25+144=169=13OP = \sqrt{(-5)^2 + 12^2} = \sqrt{25 + 144} = \sqrt{169} = 13

So PP is 13 units from the ori­gin.

Exam­ple 3: test­ing collinear­ity

Check whether A(−2,−1)A(-2, -1), B(1,3)B(1, 3) and C(7,11)C(7, 11) lie on one line.

AB=(1+2)2+(3+1)2=9+16=5BC=(7−1)2+(11−3)2=36+64=10AC=(7+2)2+(11+1)2=81+144=15\begin{aligned} AB &= \sqrt{(1 + 2)^2 + (3 + 1)^2} = \sqrt{9 + 16} = 5 \\ BC &= \sqrt{(7 - 1)^2 + (11 - 3)^2} = \sqrt{36 + 64} = 10 \\ AC &= \sqrt{(7 + 2)^2 + (11 + 1)^2} = \sqrt{81 + 144} = 15 \end{aligned}

Here AB+BC=5+10=15=ACAB + BC = 5 + 10 = 15 = AC. So the points are collinear, and BB lies between AA and CC.

Exam­ple 4: clas­si­fy­ing a tri­an­gle

Show that A(2,1)A(2, 1), B(5,5)B(5, 5) and C(9,2)C(9, 2) are the ver­tices of an isosce­les right-angled tri­an­gle.

AB=32+42=25=5BC=42+(−3)2=25=5AC=72+12=50\begin{aligned} AB &= \sqrt{3^2 + 4^2} = \sqrt{25} = 5 \\ BC &= \sqrt{4^2 + (-3)^2} = \sqrt{25} = 5 \\ AC &= \sqrt{7^2 + 1^2} = \sqrt{50} \end{aligned}

Two sides are equal, so the tri­an­gle is isosce­les. Also AB2+BC2=25+25=50=AC2AB^2 + BC^2 = 25 + 25 = 50 = AC^2, so by the con­verse of Pythago­ras the angle at BB is 90∘90^\circ. The tri­an­gle is an isosce­les right-angled tri­an­gle with the right angle at BB.

Exam­ple 5: iden­ti­fy­ing a quadri­lat­eral

Name the quadri­lat­eral with ver­tices A(1,1)A(1, 1), B(4,2)B(4, 2), C(3,5)C(3, 5) and D(0,4)D(0, 4), taken in order.

Sides:

AB=32+12=10BC=(−1)2+32=10CD=(−3)2+(−1)2=10DA=12+(−3)2=10\begin{aligned} AB &= \sqrt{3^2 + 1^2} = \sqrt{10} \\ BC &= \sqrt{(-1)^2 + 3^2} = \sqrt{10} \\ CD &= \sqrt{(-3)^2 + (-1)^2} = \sqrt{10} \\ DA &= \sqrt{1^2 + (-3)^2} = \sqrt{10} \end{aligned}

Diag­o­nals:

AC=22+42=20,BD=(−4)2+22=20AC = \sqrt{2^2 + 4^2} = \sqrt{20}, \qquad BD = \sqrt{(-4)^2 + 2^2} = \sqrt{20}

All four sides are equal, so ABCDABCD is a rhom­bus. Its diag­o­nals are also equal, so ABCDABCD is a square.

Square ABCD with A(1, 1), B(4, 2), C(3, 5), D(0, 4); each side marked √10 and dashed diagonals AC and BD, both equal to √20.
Four equal sides and equal diag­o­nals: ABCD is a square.

Exam­ple 6: an unknown coor­di­nate and an equidis­tant point

(a) The dis­tance between P(x,3)P(x, 3) and Q(2,−1)Q(2, -1) is 5 units. Find xx.

(x−2)2+(3+1)2=52(x−2)2+16=25(x−2)2=9x−2=±3\begin{aligned} (x - 2)^2 + (3 + 1)^2 &= 5^2 \\ (x - 2)^2 + 16 &= 25 \\ (x - 2)^2 &= 9 \\ x - 2 &= \pm 3 \end{aligned}

So x=5x = 5 or x=−1x = -1. Both val­ues work, because there are two points on the line y=3y = 3 that are 5 units from QQ.

(b) Find the point on the x-axis that is equidis­tant from A(1,5)A(1, 5) and B(7,−1)B(7, -1).

A point on the x-axis is P(x,0)P(x, 0). Set­ting PA2=PB2PA^2 = PB^2:

(x−1)2+52=(x−7)2+(−1)2x2−2x+1+25=x2−14x+49+1−2x+26=−14x+5012x=24x=2\begin{aligned} (x - 1)^2 + 5^2 &= (x - 7)^2 + (-1)^2 \\ x^2 - 2x + 1 + 25 &= x^2 - 14x + 49 + 1 \\ -2x + 26 &= -14x + 50 \\ 12x &= 24 \\ x &= 2 \end{aligned}

The point is P(2,0)P(2, 0). Check: PA=1+25=26PA = \sqrt{1 + 25} = \sqrt{26} and PB=25+1=26PB = \sqrt{25 + 1} = \sqrt{26}.

Points A(1, 5) and B(7, −1) joined to P(2, 0) on the x-axis; segments PA and PB are both labelled √26, showing P is equidistant.
P(2, 0) on the x-axis is the same dis­tance, √26, from A and from B.

(c) Find a rela­tion between xx and yy if P(x,y)P(x, y) is equidis­tant from A(5,2)A(5, 2) and B(−1,6)B(-1, 6).

(x−5)2+(y−2)2=(x+1)2+(y−6)2x2−10x+25+y2−4y+4=x2+2x+1+y2−12y+36−10x−4y+29=2x−12y+37−12x+8y−8=03x−2y+2=0\begin{aligned} (x - 5)^2 + (y - 2)^2 &= (x + 1)^2 + (y - 6)^2 \\ x^2 - 10x + 25 + y^2 - 4y + 4 &= x^2 + 2x + 1 + y^2 - 12y + 36 \\ -10x - 4y + 29 &= 2x - 12y + 37 \\ -12x + 8y - 8 &= 0 \\ 3x - 2y + 2 &= 0 \end{aligned}

Every point equidis­tant from AA and BB sat­is­fies 3x−2y+2=03x - 2y + 2 = 0. This line is the per­pen­dic­u­lar bisec­tor of ABAB.

Com­mon mis­takes

  • Sign slips with neg­a­tives: 5−(−3)5 - (-3) is 88, not 22.
  • Writ­ing a2+b2=a+b\sqrt{a^2 + b^2} = a + b. The square root of a sum is not the sum of the square roots.
  • Mix­ing an x-coor­di­nate with a y-coor­di­nate inside one dif­fer­ence. The order of sub­trac­tion does not mat­ter, because each dif­fer­ence is squared, but both num­bers in a dif­fer­ence must be x-coor­di­nates, or both y-coor­di­nates.
  • Decid­ing a quadri­lat­eral is a square from four equal sides alone. A rhom­bus also has four equal sides, so you must com­pare the diag­o­nals too.
  • For collinear­ity, adding the wrong pair. The largest dis­tance must equal the sum of the other two.
  • Throw­ing away one of the two answers in an unknown-coor­di­nate ques­tion with­out check­ing. Often both are valid.
  • Leav­ing answers such as 50\sqrt{50} when the ques­tion asks for the sim­plest form, which is 525\sqrt{2}.

Try these

  1. Find the dis­tance between (−3,7)(-3, 7) and (5,1)(5, 1). Answer: 10 units.
  2. Find the dis­tance of (−8,15)(-8, 15) from the ori­gin. Answer: 17 units.
  3. Are (1,−1)(1, -1), (3,3)(3, 3) and (−1,−5)(-1, -5) collinear? Answer: Yes; the dis­tances are 252\sqrt{5}, 252\sqrt{5} and 454\sqrt{5}, and 25+25=452\sqrt{5} + 2\sqrt{5} = 4\sqrt{5}.
  4. Find yy if the dis­tance between (2,y)(2, y) and (−4,3)(-4, 3) is 10 units. Answer: y=11y = 11 or y=−5y = -5.
  5. Find the point on the y-axis equidis­tant from (5,2)(5, 2) and (−3,6)(-3, 6). Answer: (0,2)(0, 2).
  6. Name the quadri­lat­eral with ver­tices (−1,−2)(-1, -2), (1,0)(1, 0), (−1,2)(-1, 2), (−3,0)(-3, 0) in order. Answer: A square; each side is 222\sqrt{2} and each diag­o­nal is 4.

Key terms

Ori­gin
The point (0,0)(0, 0) where the x-axis and y-axis meet.
Abscissa
The x-coor­di­nate of a point: its signed dis­tance from the y-axis.
Ordi­nate
The y-coor­di­nate of a point: its signed dis­tance from the x-axis.
Quad­rant
One of the four regions into which the axes divide the plane.
Dis­tance for­mula
AB=(x2−x1)2+(y2−y1)2AB = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} for A(x1,y1)A(x_1, y_1) and B(x2,y2)B(x_2, y_2).
Collinear points
Points that lie on one straight line.
Equidis­tant
At equal dis­tances from two or more given points.
Diag­o­nal
A seg­ment join­ing two oppo­site ver­tices of a quadri­lat­eral.

Com­mon ques­tions

Does it mat­ter which point I call the first point?

No. Swap­ping the points changes the sign of each dif­fer­ence, but squar­ing removes the sign, so the dis­tance is the same.

Why do we take only the pos­i­tive square root?

A dis­tance is a length, and a length can­not be neg­a­tive. The neg­a­tive root has no mean­ing here.

Can I prove collinear­ity with the dis­tance for­mula alone?

Yes. Find all three dis­tances. If the largest equals the sum of the other two, the points are collinear. If not, they form a tri­an­gle.

How do I tell a rhom­bus from a square?

Both have four equal sides. Com­pare the diag­o­nals: equal diag­o­nals mean a square, unequal diag­o­nals mean a rhom­bus that is not a square.

Why can an unknown-coor­di­nate ques­tion have two answers?

Squar­ing leads to a qua­dratic equa­tion. Geo­met­ri­cally, a cir­cle around the fixed point usu­ally cuts the given line in two places, so two posi­tions can be at the required dis­tance.

Ref­er­ences

  1. National Coun­cil of Edu­ca­tional Research and Train­ing. Math­e­mat­ics: Text­book for Class X. NCERT, New Delhi.
  2. Sharma, R. D. Math­e­mat­ics for Class 10. Dhan­pat Rai Pub­li­ca­tions.
  3. Aggar­wal, R. S. Sec­ondary School Math­e­mat­ics for Class 10. Bharati Bhawan.
  4. Stew­art, J., Redlin, L. and Wat­son, S. Pre­cal­cu­lus: Math­e­mat­ics for Cal­cu­lus. Cen­gage Learn­ing.