WishWasTraining Academy
NDA & Naval Academy entrance exam school
โ† home
Chapter M4-1 ยท 1 of 7 in Analytical Geometry of Two and Three Dimensions ยท 13 min read

Coordinates and the distance formula

29 real NDA questions of this kind in the 19 papers of 2017 to 2026.

Try three questions free โ†“

Why this chapter matters. This chapter drew 9 questions in the 7 papers from 2023 to 2026, and the whole unit drew 106, about 15 in every paper. The questions here are short: find a distance, a mid-point, a centroid, an area, or the path (locus) of a moving point. Every later chapter of the unit uses these formulas, so they must become automatic.

What you will be able to do

  • Find the distance between two points and use it to name a triangle or a quadrilateral.
  • Find the point that divides a line segment in a given ratio, and the mid-point, the centroid and the incentre.
  • Find the area of a triangle from its vertices, and test whether three points lie on one line.
  • Write the equation of a locus.

Before you start you should know: how to plot a point, the theorem of Pythagoras, and how to solve a simple equation. This chapter opens the unit, so no earlier chapter of the course is needed.

1. The coordinate plane

Draw two number lines that cross at right angles. The horizontal one is the x-axis, the vertical one is the y-axis, and they cross at the origin โ€‹O(0, 0)โ€‹.

Every point of the plane has two coordinates โ€‹(x, y)โ€‹. The first number โ€‹xโ€‹ tells how far the point is to the right of the y-axis (negative means left). The second number โ€‹yโ€‹ tells how far it is above the x-axis (negative means below).

The axes cut the plane into four quadrants. The signs of โ€‹(x, y)โ€‹ are โ€‹(+, +)โ€‹ in the first, โ€‹(-, +)โ€‹ in the second, โ€‹(-, -)โ€‹ in the third and โ€‹(+, -)โ€‹ in the fourth. A point on the x-axis has โ€‹y = 0โ€‹. A point on the y-axis has โ€‹x = 0โ€‹.

2. The distance formula

The distance between โ€‹A(x_1, y_1)โ€‹ and โ€‹B(x_2, y_2)โ€‹ comes from the theorem of Pythagoras:

AB = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

For example, the distance between โ€‹(1, 2)โ€‹ and โ€‹(4, 6)โ€‹ is โ€‹\sqrt{3^2 + 4^2} = \sqrt{25} = 5โ€‹.

Points A(1, 2) and B(4, 6) with a right-angled triangle under AB: legs 3 and 4, hypotenuse 5

The distance of โ€‹(x, y)โ€‹ from the origin is โ€‹\sqrt{x^2 + y^2}โ€‹.

Use it to name a figure. Find the lengths of the sides. Three equal sides give an equilateral triangle. Two equal sides give an isosceles triangle. If the squares of two sides add up to the square of the third, the triangle is right-angled.

3. The section formula

Let โ€‹Pโ€‹ lie on the segment โ€‹ABโ€‹ so that โ€‹AP : PB = m : nโ€‹. We say โ€‹Pโ€‹ divides โ€‹ABโ€‹ internally in the ratio โ€‹m : nโ€‹. Then

P = \left( \frac{m x_2 + n x_1}{m + n}, \; \frac{m y_2 + n y_1}{m + n} \right)

Notice the cross-over: โ€‹mโ€‹ multiplies the coordinates of the far point โ€‹Bโ€‹.

For example, the point dividing the join of โ€‹(1, 2)โ€‹ and โ€‹(7, 8)โ€‹ in the ratio โ€‹1 : 2โ€‹ is โ€‹\left( \frac{1 \times 7 + 2 \times 1}{3}, \frac{1 \times 8 + 2 \times 2}{3} \right) = (3, 4)โ€‹.

Segment from A(1, 2) to B(7, 8) with P(3, 4) on it; AP is marked m = 1 and PB is marked n = 2

If โ€‹Pโ€‹ lies on the line โ€‹ABโ€‹ but outside the segment, the division is external. Replace โ€‹nโ€‹ by โ€‹-nโ€‹ in the formula. The point dividing the join of โ€‹(1, 2)โ€‹ and โ€‹(7, 8)โ€‹ externally in the ratio โ€‹2 : 1โ€‹ is โ€‹\left( \frac{2 \times 7 - 1 \times 1}{2 - 1}, \frac{2 \times 8 - 1 \times 2}{2 - 1} \right) = (13, 14)โ€‹.

A useful habit. When the ratio is not known, call it โ€‹k : 1โ€‹. Then there is only one unknown to find.

4. Area of a triangle and collinear points

The area of the triangle with vertices โ€‹(x_1, y_1)โ€‹, โ€‹(x_2, y_2)โ€‹, โ€‹(x_3, y_3)โ€‹ is

\text{Area} = \frac{1}{2} \left| x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) \right|

For the triangle โ€‹(1, 1)โ€‹, โ€‹(4, 1)โ€‹, โ€‹(4, 5)โ€‹: โ€‹\frac{1}{2} |1(1 - 5) + 4(5 - 1) + 4(1 - 1)| = \frac{1}{2} |-4 + 16 + 0| = 6โ€‹.

Triangle with vertices (1, 1), (4, 1) and (4, 5): base 3, height 4, area 6

Three points are collinear (they lie on one straight line) exactly when this area is zero.

The formulas of sections 2 to 4 in one place:

What Formula
Distance โ€‹ABโ€‹ โ€‹\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}โ€‹
Point dividing โ€‹ABโ€‹ internally in โ€‹m : nโ€‹ โ€‹\left( \dfrac{m x_2 + n x_1}{m + n}, \dfrac{m y_2 + n y_1}{m + n} \right)โ€‹
Mid-point of โ€‹ABโ€‹ โ€‹\left( \dfrac{x_1 + x_2}{2}, \dfrac{y_1 + y_2}{2} \right)โ€‹
Centroid of a triangle (where the medians meet) โ€‹\left( \dfrac{x_1 + x_2 + x_3}{3}, \dfrac{y_1 + y_2 + y_3}{3} \right)โ€‹
Incentre of a triangle (where the angle bisectors meet); โ€‹aโ€‹, โ€‹bโ€‹, โ€‹cโ€‹ are the sides opposite โ€‹Aโ€‹, โ€‹Bโ€‹, โ€‹Cโ€‹ โ€‹\left( \dfrac{a x_1 + b x_2 + c x_3}{a + b + c}, \dfrac{a y_1 + b y_2 + c y_3}{a + b + c} \right)โ€‹
Area of a triangle โ€‹\dfrac{1}{2} \lvert x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) \rvertโ€‹
Fourth vertex of a parallelogram โ€‹ABCDโ€‹ โ€‹D = A + C - Bโ€‹, because the diagonals have the same mid-point

5. Locus

A locus is the path of a point that moves under a fixed condition. Its equation is found in three steps.

  1. Call the moving point โ€‹(x, y)โ€‹.
  2. Write the condition as an equation in โ€‹xโ€‹ and โ€‹yโ€‹.
  3. Simplify.

For example, a point moves so that its distance from the origin is always 3. The condition is โ€‹\sqrt{x^2 + y^2} = 3โ€‹. Squaring gives the locus โ€‹x^2 + y^2 = 9โ€‹, which is a circle.

6. Worked examples

Example 1. What kind of triangle has vertices โ€‹A(0, 0)โ€‹, โ€‹B(3, 4)โ€‹ and โ€‹C(7, 1)โ€‹?

โ€‹AB = \sqrt{9 + 16} = 5โ€‹. โ€‹BC = \sqrt{4^2 + (-3)^2} = 5โ€‹. โ€‹AC = \sqrt{49 + 1} = \sqrt{50}โ€‹.

Two sides are equal, and โ€‹AB^2 + BC^2 = 25 + 25 = 50 = AC^2โ€‹. The triangle is isosceles and right-angled at โ€‹Bโ€‹.

Triangle A(0, 0), B(3, 4), C(7, 1) with sides 5, 5 and root 50 and the right angle at B

Example 2. In what ratio does the x-axis divide the join of โ€‹A(2, -3)โ€‹ and โ€‹B(5, 6)โ€‹? Find the point.

Let the ratio be โ€‹k : 1โ€‹. The point of division has โ€‹yโ€‹-coordinate โ€‹\dfrac{6k - 3}{k + 1}โ€‹. On the x-axis this is zero, so โ€‹6k = 3โ€‹ and โ€‹k = \dfrac{1}{2}โ€‹. The ratio is โ€‹1 : 2โ€‹.

The โ€‹xโ€‹-coordinate is โ€‹\dfrac{1 \times 5 + 2 \times 2}{3} = 3โ€‹. The point is โ€‹(3, 0)โ€‹.

Example 3. For what value of โ€‹kโ€‹ are the points โ€‹(2, 3)โ€‹, โ€‹(4, k)โ€‹ and โ€‹(6, -3)โ€‹ collinear?

Set the area to zero: โ€‹2(k + 3) + 4(-3 - 3) + 6(3 - k) = 0โ€‹. This gives โ€‹2k + 6 - 24 + 18 - 6k = 0โ€‹, so โ€‹-4k = 0โ€‹ and โ€‹k = 0โ€‹.

Example 4. Find the locus of a point that is always at the same distance from โ€‹A(1, 2)โ€‹ and โ€‹B(3, 4)โ€‹.

Let the point be โ€‹(x, y)โ€‹. Equal distances mean equal squares of distances:

(x - 1)^2 + (y - 2)^2 = (x - 3)^2 + (y - 4)^2

Expand both sides and cancel โ€‹x^2 + y^2โ€‹: โ€‹-2x - 4y + 5 = -6x - 8y + 25โ€‹. So โ€‹4x + 4y - 20 = 0โ€‹, that is โ€‹x + y = 5โ€‹.

The locus is a straight line. It is the perpendicular bisector of โ€‹ABโ€‹.

Points A(1, 2) and B(3, 4), the line x + y = 5 crossing AB at right angles at its mid-point, and a point P on the line with PA = PB

7. From the real papers

Try each question for 75 seconds before reading the solution.

NDA II 2025, Q62. If the vertices โ€‹Bโ€‹ and โ€‹Dโ€‹ of a square โ€‹ABCDโ€‹ are โ€‹(2, 3)โ€‹ and โ€‹(4, 1)โ€‹ respectively, then what is the area of the square?

(a) 2 square unitsโ€ƒโ€ƒ(b) 3 square unitsโ€ƒโ€ƒ(c) 4 square unitsโ€ƒโ€ƒ(d) 8 square units

Solution. โ€‹Bโ€‹ and โ€‹Dโ€‹ are opposite corners, so โ€‹BDโ€‹ is a diagonal. โ€‹BD^2 = (4 - 2)^2 + (1 - 3)^2 = 8โ€‹. The area of a square is half the square of its diagonal: โ€‹\frac{8}{2} = 4โ€‹. Answer (c).

NDA II 2023, Q82. The points โ€‹(-a, -b)โ€‹, โ€‹(0, 0)โ€‹, โ€‹(a, b)โ€‹ and โ€‹(a^2, ab)โ€‹ are :

(a) lying on the same circleโ€ƒโ€ƒ(b) vertices of a squareโ€ƒโ€ƒ(c) vertices of a parallelogram that is not a squareโ€ƒโ€ƒ(d) collinear

Solution. For every one of the four points, โ€‹b \times x - a \times y = 0โ€‹. Check the last: โ€‹b \times a^2 - a \times ab = 0โ€‹. So all four lie on the one line โ€‹bx - ay = 0โ€‹ through the origin. Answer (d).

NDA I 2024, Q62. โ€‹ABCโ€‹ is a triangle with โ€‹A(3, 5)โ€‹. The mid-points of sides โ€‹ABโ€‹, โ€‹ACโ€‹ are at โ€‹(-1, 2)โ€‹, โ€‹(6, 4)โ€‹ respectively. What are the coordinates of centroid of the triangle โ€‹ABCโ€‹?

(a) โ€‹\left(\frac{8}{3}, \frac{11}{3}\right)โ€‹โ€ƒโ€ƒ(b) โ€‹\left(\frac{7}{3}, \frac{7}{3}\right)โ€‹โ€ƒโ€ƒ(c) โ€‹\left(2, \frac{8}{3}\right)โ€‹โ€ƒโ€ƒ(d) โ€‹\left(\frac{8}{3}, 2\right)โ€‹

Solution. Use the mid-point formula backwards: the other end is twice the mid-point minus the known end. โ€‹B = (2(-1) - 3, \; 2(2) - 5) = (-5, -1)โ€‹ and โ€‹C = (2(6) - 3, \; 2(4) - 5) = (9, 3)โ€‹. The centroid is โ€‹\left( \frac{3 - 5 + 9}{3}, \frac{5 - 1 + 3}{3} \right) = \left( \frac{7}{3}, \frac{7}{3} \right)โ€‹. Answer (b).

NDA II 2025, Q58. The equation of the locus of a point equidistant from the points โ€‹(a, b)โ€‹ and โ€‹(c, d)โ€‹ is โ€‹(a - c)x + (b - d)y + k = 0โ€‹. What is the value of โ€‹kโ€‹?

(a) โ€‹a^2 - c^2 + b^2 - d^2โ€‹โ€ƒโ€ƒ(b) โ€‹c^2 + d^2 - a^2 - b^2โ€‹โ€ƒโ€ƒ(c) โ€‹(a^2 - c^2 + b^2 - d^2)/2โ€‹โ€ƒโ€ƒ(d) โ€‹(c^2 + d^2 - a^2 - b^2)/2โ€‹

Solution. Work as in Example 4. โ€‹(x - a)^2 + (y - b)^2 = (x - c)^2 + (y - d)^2โ€‹. Cancel โ€‹x^2 + y^2โ€‹ and bring everything to one side: โ€‹2(a - c)x + 2(b - d)y + (c^2 + d^2 - a^2 - b^2) = 0โ€‹. Divide by 2 to match the given form: โ€‹k = \dfrac{c^2 + d^2 - a^2 - b^2}{2}โ€‹. Answer (d).

NDA II 2026, Q59. โ€‹ABCโ€‹ is a triangle, where the vertices โ€‹Aโ€‹ and โ€‹Bโ€‹ are fixed points both lying on the โ€‹xโ€‹-axis. Let โ€‹AB = 10โ€‹ cm. The vertex โ€‹Cโ€‹ moves such that โ€‹\frac{1}{\tan A} + \frac{1}{\tan B} = \frac{1}{k}โ€‹, where โ€‹k \ne 0โ€‹. What is the equation of the locus of the point โ€‹Cโ€‹?

(a) โ€‹y = 10kโ€‹โ€ƒโ€ƒ(b) โ€‹x = 10kโ€‹โ€ƒโ€ƒ(c) โ€‹ky = 10โ€‹โ€ƒโ€ƒ(d) โ€‹kx = 10โ€‹

Solution. Let โ€‹C = (x, y)โ€‹ and drop a perpendicular from โ€‹Cโ€‹ to the x-axis at โ€‹Fโ€‹. Its length is โ€‹yโ€‹. In the two right-angled triangles, โ€‹\frac{1}{\tan A} = \frac{AF}{y}โ€‹ and โ€‹\frac{1}{\tan B} = \frac{FB}{y}โ€‹. Adding, โ€‹\frac{AF + FB}{y} = \frac{10}{y}โ€‹. So โ€‹\frac{10}{y} = \frac{1}{k}โ€‹ and โ€‹y = 10kโ€‹. Answer (a).

The first three needed only one formula from the table. The last two are locus questions, the hardest kind this chapter gives.

8. Mistakes that cost marks

  1. Mixing up โ€‹mโ€‹ and โ€‹nโ€‹ in the section formula. โ€‹mโ€‹ goes with the far point: the numerator is โ€‹m x_2 + n x_1โ€‹, not โ€‹m x_1 + n x_2โ€‹. Check with the mid-point: the answer must lie between the two ends.
  2. Dividing by the wrong number. The mid-point divides by 2. The centroid divides by 3.
  3. A negative area. The formula can give a negative number before the modulus is taken. Area is never negative: take the positive value. Do not forget the โ€‹\frac{1}{2}โ€‹.
  4. Sign slips with negative coordinates. โ€‹(-3) - (-5) = 2โ€‹ and โ€‹(-3)^2 = 9โ€‹. Write the subtraction in brackets before squaring.

9. Quick check

Do these without help. Answers are at the end.

  1. Find the distance between โ€‹(-2, 3)โ€‹ and โ€‹(4, -5)โ€‹.
  2. Find the mid-point of the join of โ€‹(3, -4)โ€‹ and โ€‹(-7, 10)โ€‹.
  3. Find the centroid of the triangle with vertices โ€‹(1, 2)โ€‹, โ€‹(3, 5)โ€‹ and โ€‹(5, -1)โ€‹.
  4. Find the area of the triangle with vertices โ€‹(0, 0)โ€‹, โ€‹(6, 0)โ€‹ and โ€‹(4, 5)โ€‹.
  5. Find the locus of a point that is equidistant from โ€‹(0, 0)โ€‹ and โ€‹(4, 2)โ€‹.

10. Read and watch more, free

What Where Language
Textbook NCERT Class 11 Mathematics, Chapter 9 Straight Lines ยท Hindi edition English, Hindi
Self-study notes NIOS Mathematics, Lesson 13 Cartesian System ยท Hindi edition English, Hindi
Video, this chapter for NDA Chandigarh Career Group: NDA Maths one shots (Class 1, "Point", about 4 hours) Hinglish
Video, short lessons in English SSBCrackExams: NDA Mathematics (Parts 19 to 24 cover two-dimensional and three-dimensional geometry) English
Video, the whole of 2D geometry with past questions Doon Defence Dreamers: one shots (the "2D Geometry" video, about 11 hours) Hinglish
Past questions with answers ExamSIDE: Coordinate System and Straight Line English

The videos were chosen from their titles, length and views; they have not yet been watched by a teacher.

Answers to the quick check

  1. โ€‹\sqrt{6^2 + (-8)^2} = \sqrt{100} = 10โ€‹.
  2. โ€‹\left( \frac{3 - 7}{2}, \frac{-4 + 10}{2} \right) = (-2, 3)โ€‹.
  3. โ€‹\left( \frac{1 + 3 + 5}{3}, \frac{2 + 5 - 1}{3} \right) = (3, 2)โ€‹.
  4. โ€‹\frac{1}{2} |0(0 - 5) + 6(5 - 0) + 4(0 - 0)| = \frac{1}{2} \times 30 = 15โ€‹.
  5. โ€‹x^2 + y^2 = (x - 4)^2 + (y - 2)^2โ€‹ gives โ€‹8x + 4y - 20 = 0โ€‹, that is โ€‹2x + y = 5โ€‹.

Next chapter: The straight line.

Free ยท no sign-up

Try three questions on this chapter

Exam-pattern questions from this chapter's drill. Pick an answer for each, then check.

  1. Question 1 of 3
    A triangle has vertices โ€‹(2, 3)โ€‹, โ€‹(8, 11)โ€‹ and โ€‹(-4, 7)โ€‹. What is the area of the triangle formed by joining the mid-points of its three sides?
  2. Question 2 of 3
    Consider the line segment joining โ€‹A(-2, 3)โ€‹ and โ€‹B(4, -6)โ€‹, and the following statements: I. The point dividing โ€‹ABโ€‹ internally in the ratio โ€‹2 : 1โ€‹ is โ€‹(0, 0)โ€‹. II. The point dividing โ€‹ABโ€‹ externally in the ratio โ€‹2 : 1โ€‹ is โ€‹(-8, 12)โ€‹. Which of the statements given above is/are correct?
  3. Question 3 of 3
    Let โ€‹P(-2, -5)โ€‹, โ€‹Q(1, 1)โ€‹ and โ€‹R(3, 5)โ€‹ be three points. Consider the following statements: I. โ€‹Pโ€‹, โ€‹Qโ€‹ and โ€‹Rโ€‹ are collinear. II. โ€‹PR = PQ + QRโ€‹. Which of the statements given above is/are correct?
Free sign-up

You have read the chapter. Now make it stick.

A free account adds the video lesson, a drill of ten questions on this chapter marked like the exam, the timed mock papers, a study plan to your exam date and your own record of what you have done. No fee, no card.

Past questions quoted are from the official UPSC paper named in the text; the explanations are WishWas's own and have been checked against the official key. The links under โ€œRead and watch moreโ€ go to free material on other sites; nothing is copied.