PYQ Vault

NDA Maths · Lines

Distance, Section & Locus

Distances between points, from a point to a line, and between parallel lines; the section formula for dividing a segment; and locus equations from a geometric condition.

Why this matters

These three formulas underpin half the chapter. The point-to-line distance and the section formula appear constantly, and 'locus' questions are just a geometric condition translated into an equation.

Test yourself — a quick 13-question Lines recall quiz, instant score.

Concept 1 of 3: Distance: point-point, point-line, parallel lines

Three distances recur: between two points (Pythagoras), from a point to a line (perpendicular distance using the normalised equation), and between two parallel lines (difference of constants over the same normaliser).

Definition

  • Two points: (x2−x1)2+(y2−y1)2\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}.
  • Point to line: distance from (x0,y0)(x_0,y_0) to ax+by+c=0ax+by+c=0 is ∣ax0+by0+c∣a2+b2\dfrac{|ax_0+by_0+c|}{\sqrt{a^2+b^2}}.
  • Parallel lines ax+by+c1=0ax+by+c_1=0, ax+by+c2=0ax+by+c_2=0: ∣c1−c2∣a2+b2\dfrac{|c_1-c_2|}{\sqrt{a^2+b^2}} (make the a,ba,b match first).
  • Distance measured PARALLEL to a given direction ("the distance from PP to the line LL, measured along a line making angle θ\theta with the x-axis") is NOT the perpendicular distance: it is the length of the segment from PP to LL along that direction. Parametrise P+t(cos⁡θ,sin⁡θ)P+t(\cos\theta,\sin\theta), substitute into LL, solve for tt; ∣t∣|t| is the answer, and it equals ∣ax0+by0+c∣∣acos⁡θ+bsin⁡θ∣\dfrac{|ax_0+by_0+c|}{|a\cos\theta+b\sin\theta|}. The perpendicular distance is its minimum over θ\theta.

Distance formulas

(x2−x1)2+(y2−y1)2∣ax0+by0+c∣a2+b2∣c1−c2∣a2+b2\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\qquad \dfrac{|ax_0+by_0+c|}{\sqrt{a^2+b^2}}\qquad \dfrac{|c_1-c_2|}{\sqrt{a^2+b^2}}
P(x₀,y₀)ax+by+c=0dd = |ax₀+by₀+c| / √(a²+b²)

Worked example

Find the distance from (1,2)(1,2) to the line 3x+4y−10=03x+4y-10=0.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2018 · Q64Easy

Example 1 · Lines · Distance, Section, and Locus

What is the distance between 3x+4y=93x+4y=9 and 6x+8y=156x+8y=15?

Put the line in ax+by+c=0ax+by+c=0 form first, and divide by a2+b2\sqrt{a^2+b^2} — not by a+ba+b

Two things go wrong with point-to-line distance. (1) The line must be written as ax+by+c=0ax+by+c=0 (everything on one side) before substituting — applying the formula to y=mx+cy=mx+c or ax+by=cax+by=c as-is gives the wrong numerator. (2) The denominator is a2+b2\sqrt{a^2+b^2}, not a2+b2a^2+b^2 or a+ba+b. For parallel lines, the a,ba,b coefficients of both lines must be made identical first, or ∣c1−c2∣|c_1-c_2| is meaningless.

Concept 2 of 3: Section formula and ratios

The point dividing a segment in a given ratio is a weighted average of the endpoints. Run it backwards to find the ratio in which a point (or a line) divides a segment, or forwards to find midpoints and divisions.

Definition

  • Forward: the point dividing P(x1,y1)P(x_1,y_1) and Q(x2,y2)Q(x_2,y_2) internally in ratio m:nm:n is (mx2+nx1m+n,my2+ny1m+n)\left(\dfrac{mx_2+nx_1}{m+n},\dfrac{my_2+ny_1}{m+n}\right). The midpoint is the 1:11:1 case. External division uses m:−nm:-n.
  • Backwards — the k:1k:1 trick. When the ratio is what you are looking for, write it as k:1k:1 rather than m:nm:n. You may always do this, because m:nm:n is the same ratio as mn:1\tfrac{m}{n}:1 — a ratio has only one unknown in it, not two. The dividing point becomes (kx2+x1k+1,ky2+y1k+1)\left(\dfrac{kx_2+x_1}{k+1},\dfrac{ky_2+y_1}{k+1}\right); impose whatever the question says about that point and solve the single equation for kk. This is the move behind almost every "in what ratio does … divide …" question.

Section formula and midpoint

(mx2+nx1m+n,my2+ny1m+n)(x1+x22,y1+y22)\left(\dfrac{mx_2+nx_1}{m+n},\dfrac{my_2+ny_1}{m+n}\right)\qquad \left(\dfrac{x_1+x_2}{2},\dfrac{y_1+y_2}{2}\right)

Worked example

Find the point dividing (1,2)(1,2) and (4,8)(4,8) internally in ratio 2:12:1.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2017 · Q56Moderate

Example 2 · Lines · Distance, Section, and Locus

What is the ratio in which the point C ⁣(−27,−207)C\!\left(-\dfrac{2}{7}, -\dfrac{20}{7}\right) divides the line joining the points A(−2,−2)A(-2, -2) and B(2,−4)B(2, -4)?

In m:nm:n the weight mm multiplies the far endpoint x2x_2 — mind the cross-pairing

For a point dividing P1P2P_1P_2 in ratio m:nm:n (with mm the part nearer P2P_2), the x-coordinate is mx2+nx1m+n\dfrac{mx_2+nx_1}{m+n}: the ratio's first number mm pairs with the second point's coordinate x2x_2. Writing mx1+nx2m+n\dfrac{mx_1+nx_2}{m+n} swaps the weights and divides in ratio n:mn:m instead — the point lands on the wrong side. Also remember the m+nm+n in the denominator.

Concept 3 of 3: Locus from a condition

A locus is the set of points satisfying a rule. Let the moving point be (x,y)(x,y), write the geometric condition algebraically, and simplify — the equation that survives is the locus. 'Equidistant from two points' always gives the perpendicular bisector.

Definition

  • The standard move: set P=(x,y)P=(x,y), translate the stated condition into algebra, and reduce. The equation left standing is the locus.
  • Equidistant from two points A,BA,B: PA2=PB2PA^2=PB^2 ⇒ the perpendicular bisector of ABAB, a straight line. Equidistant from two lines ⇒ the pair of angle bisectors between them.
  • From a varying parameter — the other common species, and the one students miss. Sometimes the moving point is not defined by a distance at all: something in the figure varies, and the point rides along with it. Write both xx and yy in terms of that parameter, then eliminate the parameter between the two equations. The relation between xx and yy that survives is the locus — and the parameter must not appear in your answer.

Worked example

Find the locus of points equidistant from A(1,2)A(1,2) and B(3,4)B(3,4).
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2022 · Q89Easy

Example 3 · Lines · Distance, Section, and Locus

What is the equation of the locus of the mid-point of the line segment obtained by cutting the line x+y=px+y=p (where pp is a real number) by the coordinate axes?

Equidistant from two points gives a line (perp. bisector); equidistant from two lines gives the angle bisectors

Don't conflate the two 'equidistant' loci. Equidistant from two points A,BA,B is the perpendicular bisector of ABAB — a single straight line. Equidistant from two lines is the pair of angle bisectors between them. Setting up PA2=PB2PA^2=PB^2 (distances to points) when the question means distance-to-lines, or vice versa, produces the wrong locus entirely.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (2)

  • Distance: point-point, point-line, parallel lines

    Distance formulas

    (x2−x1)2+(y2−y1)2∣ax0+by0+c∣a2+b2∣c1−c2∣a2+b2\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\qquad \dfrac{|ax_0+by_0+c|}{\sqrt{a^2+b^2}}\qquad \dfrac{|c_1-c_2|}{\sqrt{a^2+b^2}}
  • Section formula and ratios

    Section formula and midpoint

    (mx2+nx1m+n,my2+ny1m+n)(x1+x22,y1+y22)\left(\dfrac{mx_2+nx_1}{m+n},\dfrac{my_2+ny_1}{m+n}\right)\qquad \left(\dfrac{x_1+x_2}{2},\dfrac{y_1+y_2}{2}\right)

Watch out for (3)

Test yourself on Lines

20 past NDA questions from this chapter, timed at 25 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.