Free Mathematics Class 9 CBSE notes · practise this chapter with an AI quiz

← All study notes

Two Points and a Right Triangle You Draw Yourself

Learn to derive the distance between two points from a right triangle, apply the distance formula, classify a triangle from its side lengths, and find an unknown coordinate from a given distance.

How do you find the straight-line distance between two points on a grid?

By drawing a right-angled triangle that was not there, and then using the theorem you already know.

Take P(1,2)P(1, 2) and Q(4,6)Q(4, 6). Nothing joins them but a slanting line whose length you cannot read off the grid.

So make a triangle. Go across from PP until you are directly below QQ, then go up to QQ. The across step is 4−1=34 - 1 = 3 units and the up step is 6−2=46 - 2 = 4 units, and both can be read straight off the grid.

Those two steps and the slanting line PQPQ form a right-angled triangle, so by the Baudhayana-Pythagoras theorem:

PQ2=32+42=9+16=25⇒PQ=5PQ^2 = 3^2 + 4^2 = 9 + 16 = 25 \quad \Rightarrow \quad PQ = 5

The slanting distance was never measured. It was calculated from two distances that could be. This page covers the second part of the CBSE Class 9 Mathematics chapter on the use of coordinates.

How is the distance formula derived from a right triangle?

By taking the two steps as the legs of a right-angled triangle and the join as the hypotenuse.

Take any two points P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2). Draw a horizontal line through PP and a vertical line through QQ, and let them meet at RR. That gives a right-angled triangle PRQPRQ with the right angle at RR.

The two legs can be read off directly:

- The horizontal leg PRPR has length x2−x1x_2 - x_1, since both PP and RR are at the same height and differ only in their xx-coordinates
- The vertical leg RQRQ has length y2−y1y_2 - y_1, since RR and QQ differ only in their yy-coordinates

Applying the Baudhayana-Pythagoras theorem to triangle PRQPRQ:

PQ2=PR2+RQ2=(x2−x1)2+(y2−y1)2PQ^2 = PR^2 + RQ^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2

Worked derivation with numbers. For P(1,2)P(1, 2) and Q(4,6)Q(4, 6), the meeting point is R(4,2)R(4, 2).

- PR=4−1=3PR = 4 - 1 = 3
- RQ=6−2=4RQ = 6 - 2 = 4
- PQ2=9+16=25PQ^2 = 9 + 16 = 25, so PQ=5PQ = 5

Check the triangle is genuinely right-angled. PRPR is horizontal and RQRQ is vertical, so they meet at 90∘90^\circ by construction. That is why the theorem may be applied — the right angle was built, not assumed.

Worked derivation for a second pair. For A(−3,2)A(-3, 2) and B(1,5)B(1, 5), the meeting point is R(1,2)R(1, 2).

- AR=1−(−3)=4AR = 1 - (-3) = 4
- RB=5−2=3RB = 5 - 2 = 3
- AB2=16+9=25AB^2 = 16 + 9 = 25, so AB=5AB = 5

The subtraction handles the negative coordinate automatically. 1−(−3)=41 - (-3) = 4, and no separate rule was needed for a point in a different quadrant. That is worth noticing, because it is the reason the formula works for any two points anywhere on the plane.

Why the differences, and not the coordinates themselves. The legs of the triangle are gaps between the points, so each leg is a difference. For A(−3,2)A(-3, 2) and B(1,5)B(1, 5) the horizontal leg is 44, and it is certainly not −3-3 or 11. Squaring the coordinates instead of their difference is the single commonest error in the whole chapter, and the triangle picture is the cure — you can see that the leg runs between the two points.
Formula

What is the distance formula and how do you use it?

For any two points P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2):

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

and for the distance of a point (x,y)(x, y) from the origin, where (x1,y1)=(0,0)(x_1, y_1) = (0, 0):

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

Worked example 1. (1,2)(1, 2) and (4,6)(4, 6).

(4−1)2+(6−2)2=9+16=25=5\sqrt{(4-1)^2 + (6-2)^2} = \sqrt{9 + 16} = \sqrt{25} = 5

Worked example 2 — from the origin. (6,8)(6, 8).

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

Worked example 3 — with negatives. (−3,2)(-3, 2) and (1,5)(1, 5).

(1−(−3))2+(5−2)2=16+9=5\sqrt{(1 - (-3))^2 + (5 - 2)^2} = \sqrt{16 + 9} = 5

Worked example 4 — both points negative. (−1,−1)(-1, -1) and (2,3)(2, 3).

(2−(−1))2+(3−(−1))2=9+16=5\sqrt{(2 - (-1))^2 + (3 - (-1))^2} = \sqrt{9 + 16} = 5

Worked example 5 — a larger case. (3,−2)(3, -2) and (−2,10)(-2, 10).

(−2−3)2+(10−(−2))2=25+144=169=13\sqrt{(-2 - 3)^2 + (10 - (-2))^2} = \sqrt{25 + 144} = \sqrt{169} = 13

Worked example 6. (0,0)(0, 0) and (−5,12)(-5, 12).

25+144=169=13\sqrt{25 + 144} = \sqrt{169} = 13

Worked example 7. (7,1)(7, 1) and (3,4)(3, 4).

(3−7)2+(4−1)2=16+9=5\sqrt{(3-7)^2 + (4-1)^2} = \sqrt{16 + 9} = 5

The order of the points does not matter. Because each difference is squared, (x2−x1)2=(x1−x2)2(x_2 - x_1)^2 = (x_1 - x_2)^2. So in worked example 7 you could equally write (7−3)2+(1−4)2=16+9(7-3)^2 + (1-4)^2 = 16 + 9 and get the same answer.

That also means a distance can never come out negative. If a negative appears, something has been done outside the formula — most often a subtraction taken after the squaring instead of before it.

Subtract first, then square. For (3,−2)(3, -2) to (−2,10)(-2, 10) the first term is (−2−3)2=(−5)2=25(-2 - 3)^2 = (-5)^2 = 25. Writing (−2)2+32=4+9(-2)^2 + 3^2 = 4 + 9 would give 1313 instead of 2525 — wrong, because it has squared the coordinates rather than their difference. Write the bracket, fill in the subtraction, and only then square.

How do you tell what kind of triangle three points form?

Find all three side lengths, then compare them — and compare their squares to test for a right angle.

The tests:

- All three sides equal — equilateral
- Exactly two sides equal — isosceles
- All three different — scalene
- The sum of the squares of the two shorter sides equals the square of the longest — right-angled

A triangle may be both isosceles and right-angled, so check both tests rather than stopping at the first.

Worked example 1 — right-angled. A(0,0)A(0,0), B(4,0)B(4,0), C(0,3)C(0,3).

AB=4,AC=3,BC=16+9=5AB = 4, \qquad AC = 3, \qquad BC = \sqrt{16 + 9} = 5

Testing the right angle: 32+42=9+16=25=523^2 + 4^2 = 9 + 16 = 25 = 5^2. So the triangle is right-angled at AA, and since all three sides differ it is also scalene.

Worked example 2 — isosceles and right-angled.
A(1,1)A(1,1), B(4,5)B(4,5), C(8,2)C(8,2).

AB=(4−1)2+(5−1)2=9+16=5AB = \sqrt{(4-1)^2 + (5-1)^2} = \sqrt{9 + 16} = 5

BC=(8−4)2+(2−5)2=16+9=5BC = \sqrt{(8-4)^2 + (2-5)^2} = \sqrt{16 + 9} = 5

CA=(1−8)2+(1−2)2=49+1=50CA = \sqrt{(1-8)^2 + (1-2)^2} = \sqrt{49 + 1} = \sqrt{50}

Two sides equal, so isosceles. And AB2+BC2=25+25=50=CA2AB^2 + BC^2 = 25 + 25 = 50 = CA^2, so it is right-angled at BB as well. A right-angled isosceles triangle, and stopping after the first test would have missed half the answer.

Worked example 3 — equilateral.
A(0,0)A(0,0), B(4,0)B(4,0), C(2,23)C(2, 2\sqrt{3}).

AB=4AB = 4

AC=22+(23)2=4+12=16=4AC = \sqrt{2^2 + (2\sqrt{3})^2} = \sqrt{4 + 12} = \sqrt{16} = 4

BC=(2−4)2+(23)2=4+12=4BC = \sqrt{(2-4)^2 + (2\sqrt{3})^2} = \sqrt{4 + 12} = 4

All three sides are 44, so the triangle is equilateral.

Worked example 4 — scalene and not right-angled. A(1,2)A(1,2), B(4,3)B(4,3), C(2,6)C(2,6).

AB=9+1=10,BC=4+9=13,CA=1+16=17AB = \sqrt{9 + 1} = \sqrt{10}, \qquad BC = \sqrt{4 + 9} = \sqrt{13}, \qquad CA = \sqrt{1 + 16} = \sqrt{17}

All different, so scalene. Testing for a right angle: 10+13=23≠1710 + 13 = 23 \ne 17, so it is not right-angled.

Compare the squares, not the sides. In worked example 4 the sides are 10\sqrt{10}, 13\sqrt{13} and 17\sqrt{17}, and comparing surds is awkward. Comparing 1010, 1313 and 1717 is immediate, and it answers both questions — equal squares mean equal sides, and the right-angle test is a statement about squares anyway. Stop at PQ2PQ^2 and only take the square root if the question asks for a length.

Always test both properties. Worked example 2 was isosceles and
right-angled, and a question asking what kind of triangle expects both facts. Naming only one is an incomplete answer even though it is not a wrong one.

How do you find an unknown coordinate from a given distance?

Substitute into the formula, square both sides to remove the root, and solve — and expect two answers.

Worked example 1 — a missing yy. The distance between (2,−3)(2, -3) and (10,y)(10, y) is 1010. Find yy.

(10−2)2+(y−(−3))2=102(10-2)^2 + (y-(-3))^2 = 10^2

64+(y+3)2=100⇒(y+3)2=36⇒y+3=±664 + (y+3)^2 = 100 \quad \Rightarrow \quad (y+3)^2 = 36 \quad \Rightarrow \quad y + 3 = \pm 6

y=3ory=−9y = 3 \quad \text{or} \quad y = -9

Check both. With y=3y = 3: 64+36=10\sqrt{64 + 36} = 10. With y=−9y = -9: 64+36=10\sqrt{64 + 36} = 10. Both are genuine answers, and giving only one loses half the marks.

Worked example 2 — a missing xx. The distance from (x,7)(x, 7) to (2,3)(2, 3) is 55.

(x−2)2+(7−3)2=25⇒(x−2)2+16=25⇒(x−2)2=9(x-2)^2 + (7-3)^2 = 25 \quad \Rightarrow \quad (x-2)^2 + 16 = 25 \quad \Rightarrow \quad (x-2)^2 = 9

x−2=±3⇒x=5orx=−1x - 2 = \pm 3 \quad \Rightarrow \quad x = 5 \quad \text{or} \quad x = -1

Worked example 3 — a point on the xx-axis, equidistant from two points. Find the point on the xx-axis equidistant from (2,−5)(2, -5) and (−2,9)(-2, 9).

A point on the xx-axis has y=0y = 0, so call it (x,0)(x, 0). Equidistant means the two squared distances are equal:

(x−2)2+(0−(−5))2=(x−(−2))2+(0−9)2(x-2)^2 + (0-(-5))^2 = (x-(-2))^2 + (0-9)^2

(x−2)2+25=(x+2)2+81(x-2)^2 + 25 = (x+2)^2 + 81

x2−4x+4+25=x2+4x+4+81x^2 - 4x + 4 + 25 = x^2 + 4x + 4 + 81

The x2x^2 terms cancel:

−4x+29=4x+85⇒−8x=56⇒x=−7-4x + 29 = 4x + 85 \quad \Rightarrow \quad -8x = 56 \quad \Rightarrow \quad x = -7

So the point is (−7,0)(-7, 0).

Check. To (2,−5)(2,-5): 81+25=106\sqrt{81 + 25} = \sqrt{106}. To (−2,9)(-2, 9): 25+81=106\sqrt{25 + 81} = \sqrt{106}. Equal, so correct.

Worked example 4 — a point on the yy-axis. Find the point on the yy-axis equidistant from (6,5)(6, 5) and (−4,3)(-4, 3).

A point on the yy-axis is (0,y)(0, y):

36+(y−5)2=16+(y−3)236 + (y-5)^2 = 16 + (y-3)^2

36+y2−10y+25=16+y2−6y+936 + y^2 - 10y + 25 = 16 + y^2 - 6y + 9

61−10y=25−6y⇒36=4y⇒y=961 - 10y = 25 - 6y \quad \Rightarrow \quad 36 = 4y \quad \Rightarrow \quad y = 9

The point is (0,9)(0, 9). Check: to (6,5)(6,5) gives 36+16=52\sqrt{36 + 16} = \sqrt{52}; to (−4,3)(-4,3) gives 16+36=52\sqrt{16 + 36} = \sqrt{52}. Correct.

Notice why the x2x^2 or y2y^2 terms cancel. Both sides contain the unknown squared, so expanding removes it and leaves a linear equation with one answer. That is why an equidistant question gives one point while a given distance question gives two — and knowing which to expect tells you whether you have finished.

Equate the squares, never the roots. Writing …=…\sqrt{\ldots} = \sqrt{\ldots} and then squaring is the same step done in two lines; going straight to the squares saves the surds and removes the chance of an error inside a root sign.
Exam tip

Exam tip: subtract inside the bracket before squaring

Write the brackets first, fill in the subtractions, and only then square: (x2−x1)2+(y2−y1)2(x_2-x_1)^2 + (y_2-y_1)^2. Squaring the coordinates instead of their differences is the commonest error in the chapter.

For (3,−2)(3,-2) to (−2,10)(-2,10) the first term is (−2−3)2=25(-2-3)^2 = 25, not (−2)2+32(-2)^2 + 3^2.

The order of the two points does not matter, because each difference is squared — so a distance can never come out negative.

Stop at the square. Compare PQ2PQ^2, QR2QR^2 and RP2RP^2 to classify a triangle, and only take the root if a length is asked for. Comparing 1010, 1313 and 1717 beats comparing surds.

For a right angle, check whether the two smaller squares add to the largest: 25+25=5025 + 25 = 50.

Test both properties — a triangle can be isosceles and right-angled, and naming only one is incomplete.

For an unknown coordinate from a given distance, expect two answers: (y+3)2=36(y+3)^2 = 36 gives y=3y = 3 and y=−9y = -9. Check both and quote both.

For an equidistant point, equate the squared distances. The squared unknown cancels, leaving a linear equation with one answer.

A point on the xx-axis is (x,0)(x, 0) and on the yy-axis is (0,y)(0, y) — write that down before substituting.

And verify your answer by computing both distances — one extra line, complete certainty.
Did you know

Why the same three numbers keep appearing

Work through the examples on this page and one pattern is hard to miss. The answer is 55 again and again, from the legs 33 and 44. Then 1313, from the legs 55 and 1212. And 1010, from 66 and 88.

Those are Pythagorean triples — sets of three whole numbers for which the sum of two squares is exactly the third square.

32+42=52,52+122=132,82+152=1723^2 + 4^2 = 5^2, \qquad 5^2 + 12^2 = 13^2, \qquad 8^2 + 15^2 = 17^2

They are chosen deliberately in textbook questions, and for a good reason: the answer comes out as a whole number instead of an awkward surd, so the arithmetic stays visible and the method is what gets tested rather than the decimals.

Notice that 6,8,106, 8, 10 is not a new triple but 3,4,53, 4, 5 with everything doubled. Multiply a triple by any whole number and you get another triple, because both sides of the equation scale by the square of that number. So 9,12,159, 12, 15 and 15,20,2515, 20, 25 work too, and the 3,4,53, 4, 5 family is infinite.

There is a practical use for this that has nothing to do with examinations. A mason wanting a true right angle measures 33 units along one wall and 44 along the other, and adjusts until the diagonal between the marks is exactly 55. No instrument is needed — the triple guarantees the right angle, and the same trick works with any multiple, so 3030 cm, 4040 cm and 5050 cm is convenient on a real building site.

That is the theorem being used in reverse. Everywhere on this page it was used to find a length from a known right angle; the mason uses it to create a right angle from known lengths. Same statement, read the other way round.
Exam relevance

How is the distance formula used in JEE Main?

It is the first formula of coordinate geometry and it is used in almost every problem of the subject, so this page is genuinely foundational rather than merely introductory.

This is the foundation for the Class 11 Mathematics chapter Straight Lines and for the whole of Conic Sections, both examined in JEE Main. The distance formula is the definition every conic is built from:

- A circle is the set of points at a fixed distance from a centre, so its equation is the distance formula with the root removed
- An ellipse is defined by the sum of the distances from two fixed points being constant
- A hyperbola by the difference of those distances being constant
- A parabola by the distance from a point equalling the distance from a line

Every one of those definitions is the formula on this page applied twice and then simplified. A student who can write the distance between two general points fluently can derive all four equations; one who cannot has to memorise them.

The section formula, the midpoint formula and the area of a triangle are added in Class 10 and Class 11, and they are used alongside this one in the same problems.

Where the triangle classification is reused. Class 11 Straight Lines asks for the type of triangle formed by three given points or three given lines, and the method is exactly the one on this page — compute the squares of the sides and compare. Questions asking for the circumcentre, orthocentre or incentre of a triangle begin with the same step.

The equidistant technique becomes the standard way of finding the perpendicular bisector of a segment and the centre of a circle through given points, both recurring JEE Main situations. The observation on this page that the squared unknown cancels is exactly why that method produces a linear equation.

What the questions look like. For board work, numericals on distance, triangle type and equidistant points are standard and quick. For JEE Main, this material appears as the opening step of a longer problem — find a distance, then use it in a condition — so accuracy matters more than novelty. Assertion-reason and match-the-column forms are rare here; it is almost entirely computational.

How board and competitive emphasis differ. A board paper asks you to find the distance between two given points, show that three points form a particular kind of triangle, and find a point on an axis equidistant from two others — each a self-contained question. A competitive paper embeds the same steps inside a conic or a straight-line problem, where the distance is a means rather than the answer. So the board paper rewards setting out, and the competitive paper rewards speed without error.

The single trap that costs the most marks. Squaring the coordinates instead of their differences. For (3,−2)(3,-2) and (−2,10)(-2,10) the correct first term is (−2−3)2=25(-2-3)^2 = 25, and the tempting (−2)2+32=13(-2)^2 + 3^2 = 13 is wrong. Write the bracket, put the subtraction inside it, and square afterwards — and the triangle picture from the second section is the reason it must be a difference.

A second trap worth naming. Giving one answer where a squared equation has two. (y+3)2=36(y+3)^2 = 36 yields y=3y = 3 and y=−9y = -9, and both satisfy the original distance. Unless the question's geometry rules one out, both must be quoted — and a question asking for the values rather than the value is telling you so.
Key takeaways

The distance formula and its uses: quick revision

- Derivation: go across and then up between two points to build a right-angled triangle, with legs x2−x1x_2 - x_1 and y2−y1y_2 - y_1, then apply the Baudhayana-Pythagoras theorem.
- PQ=(x2−x1)2+(y2−y1)2,OP=x2+y2PQ = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}, \qquad OP = \sqrt{x^2 + y^2}
- (1,2)(1,2) to (4,6)(4,6) gives 9+16=5\sqrt{9+16} = 5; origin to (6,8)(6,8) gives 1010; (−3,2)(-3,2) to (1,5)(1,5) gives 55; (−1,−1)(-1,-1) to (2,3)(2,3) gives 55.
- (3,−2)(3,-2) to (−2,10)(-2,10) gives 25+144=13\sqrt{25+144} = 13; origin to (−5,12)(-5,12) gives 1313; (7,1)(7,1) to (3,4)(3,4) gives 55.
- Subtract inside the bracket, then square. For (3,−2)(3,-2) to (−2,10)(-2,10) the first term is (−2−3)2=25(-2-3)^2 = 25, not (−2)2+32(-2)^2 + 3^2.
- The order of the points does not matter, since each difference is squared — so a distance is never negative.
- Classify a triangle by its three sides: all equal is equilateral, exactly two equal is isosceles, all different is scalene, and the two smaller squares summing to the largest means right-angled.
- A(0,0)A(0,0), B(4,0)B(4,0), C(0,3)C(0,3) gives sides 44, 33, 55 with 9+16=259 + 16 = 25 — right-angled and scalene.
- A(1,1)A(1,1), B(4,5)B(4,5), C(8,2)C(8,2) gives 55, 55, 50\sqrt{50} with 25+25=5025 + 25 = 50 — isosceles and right-angled.
- A(0,0)A(0,0), B(4,0)B(4,0), C(2,23)C(2, 2\sqrt{3}) gives three sides of 44 — equilateral.
- A(1,2)A(1,2), B(4,3)B(4,3), C(2,6)C(2,6) gives 10\sqrt{10}, 13\sqrt{13}, 17\sqrt{17} with 10+13≠1710 + 13 \ne 17 — scalene, not right-angled.
- Compare the squares, not the sides, and test both properties — a triangle can be isosceles and right-angled.
- Unknown coordinate from a distance: (2,−3)(2,-3) to (10,y)(10,y) being 1010 gives (y+3)2=36(y+3)^2 = 36, so y=3y = 3 or y=−9y = -9. Both check.
- (x,7)(x,7) to (2,3)(2,3) being 55 gives (x−2)2=9(x-2)^2 = 9, so x=5x = 5 or x=−1x = -1.
- Equidistant on the xx-axis: from (2,−5)(2,-5) and (−2,9)(-2,9), equate squares to get −8x=56-8x = 56, so the point is (−7,0)(-7, 0).
- Equidistant on the yy-axis: from (6,5)(6,5) and (−4,3)(-4,3), 36=4y36 = 4y gives (0,9)(0, 9).
- Equate the squared distances, never the roots. The squared unknown cancels, leaving a linear equation — which is why an equidistant question has one answer and a given-distance question has two.
- Textbook answers use Pythagorean triples such as 3,4,53, 4, 5 and 5,12,135, 12, 13, and any multiple of a triple is another triple.

Take three points of your own choosing, compute all three squared side lengths, and classify the triangle both ways — the habit of testing for a right angle after finding the sides is what completes the answer.

Ready to put this into practice?

Create a personalized quiz on this exact topic — free to start.

Create your own quiz on Orienting Yourself: The Use of Coordinates — Part 2Create a free account
← Back to all articles