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

Coordinate geometry joins algebra and geometry. Once every point of a plane has a pair of numbers attached to it, we can measure lengths, test shapes and locate points with plain arithmetic instead of a ruler. The distance formula is the first and most-used tool of this chapter. 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 rhombus, a rectangle or just a parallelogram. The same idea is used in maps, in computer graphics and wherever positions are stored as coordinates.

The coordinate plane: a quick recap

Axes, origin and coordinates

Two perpendicular number lines, the horizontal x-axis and the vertical y-axis, meet at the origin O(0,0)O(0, 0). Every point PP is described by an ordered pair (x,y)(x, y). The first number, the abscissa, is the signed distance of PP from the y-axis. The second number, the ordinate, is the signed distance 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 quadrants

The axes divide the plane into four quadrants, numbered anticlockwise starting from the top right.

QuadrantSign of xSign of yExample
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 quadrant.

The distance formula

Statement

The distance 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 particular, the distance of a point P(x,y)P(x, y) from the origin is

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

Why the formula is true

Take A(x1,y1)A(x_1, y_1) and B(x2,y2)B(x_2, y_2) with ABAB neither horizontal nor vertical. Through AA draw a line parallel to the x-axis, and through BB a line parallel 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 perpendicular.

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

By the Pythagoras theorem in right triangle 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 number equals the square of its absolute value, so the modulus signs can be dropped. Since a distance is never negative, we take the positive square root. If ABAB is horizontal, then y2=y1y_2 = y_1 and the formula gives ∣x2−x1∣|x_2 - x_1|, which is correct. The vertical case works in the same way. So the formula holds for every pair of points.

Putting A=O(0,0)A = O(0, 0) gives the distance from the origin, 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 distance formula is Pythagoras on a grid: AC = 6, BC = 8, so AB = 10.

The order of the points does not matter: (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 distance formula

Checking whether three points are collinear

Three points AA, BB, CC lie on one straight line exactly when the largest of the three distances equals the sum of the other two, for example AB+BC=ACAB + BC = AC. If the largest distance is less than the sum of the other two, the points form a triangle.

Classifying triangles

  • Equilateral: all three sides equal.
  • Isosceles: two sides equal.
  • Scalene: no two sides equal.
  • Right-angled: the square of the longest side equals the sum of the squares of the other two (converse of Pythagoras).

Classifying quadrilaterals

Take the vertices A,B,C,DA, B, C, D in order. Find the four sides AB,BC,CD,DAAB, BC, CD, DA and the two diagonals AC,BDAC, BD.

SidesDiagonalsQuadrilateral
All four equalEqualSquare
All four equalNot equalRhombus (not a square)
Opposite sides equalEqualRectangle
Opposite sides equalNot equalParallelogram (not a rectangle)

These tests rest on standard facts. A quadrilateral with both pairs of opposite sides equal is a parallelogram. A parallelogram with equal diagonals is a rectangle. A rhombus with equal diagonals 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, taking care with signs.
  3. Square both, add them and take the positive square root.
  4. For shape questions, work out every side and both diagonals first, then compare them with the tables above.
  5. For an unknown coordinate, square both sides of the distance equation before solving, then check every value you get.

Worked examples

Example 1: distance between two points

Find the distance 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 triangle shown in the figure above.

Example 2: distance from the origin

How far is P(−5,12)P(-5, 12) from the origin?

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 origin.

Example 3: testing collinearity

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.

Example 4: classifying a triangle

Show that A(2,1)A(2, 1), B(5,5)B(5, 5) and C(9,2)C(9, 2) are the vertices of an isosceles right-angled triangle.

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 triangle is isosceles. Also AB2+BC2=25+25=50=AC2AB^2 + BC^2 = 25 + 25 = 50 = AC^2, so by the converse of Pythagoras the angle at BB is 90∘90^\circ. The triangle is an isosceles right-angled triangle with the right angle at BB.

Example 5: identifying a quadrilateral

Name the quadrilateral with vertices 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}

Diagonals:

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 rhombus. Its diagonals 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 diagonals: ABCD is a square.

Example 6: an unknown coordinate and an equidistant point

(a) The distance 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 values 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 equidistant 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). Setting 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 distance, √26, from A and from B.

(c) Find a relation between xx and yy if P(x,y)P(x, y) is equidistant 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 equidistant from AA and BB satisfies 3x−2y+2=03x - 2y + 2 = 0. This line is the perpendicular bisector of ABAB.

Common mistakes

  • Sign slips with negatives: 5−(−3)5 - (-3) is 88, not 22.
  • Writing 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.
  • Mixing an x-coordinate with a y-coordinate inside one difference. The order of subtraction does not matter, because each difference is squared, but both numbers in a difference must be x-coordinates, or both y-coordinates.
  • Deciding a quadrilateral is a square from four equal sides alone. A rhombus also has four equal sides, so you must compare the diagonals too.
  • For collinearity, adding the wrong pair. The largest distance must equal the sum of the other two.
  • Throwing away one of the two answers in an unknown-coordinate question without checking. Often both are valid.
  • Leaving answers such as 50\sqrt{50} when the question asks for the simplest form, which is 525\sqrt{2}.

Try these

  1. Find the distance between (−3,7)(-3, 7) and (5,1)(5, 1). Answer: 10 units.
  2. Find the distance of (−8,15)(-8, 15) from the origin. Answer: 17 units.
  3. Are (1,−1)(1, -1), (3,3)(3, 3) and (−1,−5)(-1, -5) collinear? Answer: Yes; the distances 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 distance 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 equidistant from (5,2)(5, 2) and (−3,6)(-3, 6). Answer: (0,2)(0, 2).
  6. Name the quadrilateral with vertices (−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 diagonal is 4.

Key terms

Origin
The point (0,0)(0, 0) where the x-axis and y-axis meet.
Abscissa
The x-coordinate of a point: its signed distance from the y-axis.
Ordinate
The y-coordinate of a point: its signed distance from the x-axis.
Quadrant
One of the four regions into which the axes divide the plane.
Distance formula
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.
Equidistant
At equal distances from two or more given points.
Diagonal
A segment joining two opposite vertices of a quadrilateral.

Common questions

Does it matter which point I call the first point?

No. Swapping the points changes the sign of each difference, but squaring removes the sign, so the distance is the same.

Why do we take only the positive square root?

A distance is a length, and a length cannot be negative. The negative root has no meaning here.

Can I prove collinearity with the distance formula alone?

Yes. Find all three distances. If the largest equals the sum of the other two, the points are collinear. If not, they form a triangle.

How do I tell a rhombus from a square?

Both have four equal sides. Compare the diagonals: equal diagonals mean a square, unequal diagonals mean a rhombus that is not a square.

Why can an unknown-coordinate question have two answers?

Squaring leads to a quadratic equation. Geometrically, a circle around the fixed point usually cuts the given line in two places, so two positions can be at the required distance.

References

  1. National Council of Educational Research and Training. Mathematics: Textbook for Class X. NCERT, New Delhi.
  2. Sharma, R. D. Mathematics for Class 10. Dhanpat Rai Publications.
  3. Aggarwal, R. S. Secondary School Mathematics for Class 10. Bharati Bhawan.
  4. Stewart, J., Redlin, L. and Watson, S. Precalculus: Mathematics for Calculus. Cengage Learning.