PYQ Vault

JEE Mains Maths · Straight Lines

Distance from a Line and Parallel Lines

The perpendicular distance from a point to a line, the distance between parallel lines, and the sign of ax + by + c that tells which side of a line a point is on.

Why this matters

Thirteen PYQs, twelve of them multiple choice, and three from 2026. Six use the distance from a point to a line, five of them for an equilateral triangle with one side on a given line. Four use parallel lines: an equilateral triangle with vertices on two of them, sides shifted inwards, or the points at a fixed distance from a line. Three decide which side of a line a point is on. Three ideas cover the page.

Concept 1 of 3: Distance from a point to a line

The distance from (x1,y1)(x_1,y_1) to ax+by+c=0ax+by+c=0 is ∣ax1+by1+c∣a2+b2\frac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}}. The foot of the perpendicular is the point moved back along the normal (a,b)(a,b). In an equilateral triangle with one side on a line, that distance is the height hh: the side is 2h3\frac{2h}{\sqrt3}, and the centroid, orthocentre and circumcentre all sit a third of the way up from the foot.

Definition

  • Distance: d=∣ax1+by1+c∣a2+b2d=\frac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}}.
  • Foot: x−x1a=y−y1b=−ax1+by1+ca2+b2\frac{x-x_1}a=\frac{y-y_1}b=-\frac{ax_1+by_1+c}{a^2+b^2}.
  • Equilateral triangle of height hh: side 2h3\frac{2h}{\sqrt3}, area h23\frac{h^2}{\sqrt3}.
  • Its centre is h3\frac h3 above the base: r=h3r=\frac h3, R=2h3R=\frac{2h}3.

Perpendicular distance

d=∣ax1+by1+c∣a2+b2d=\frac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}}

Worked example

Find the distance of (2,−1)(2,-1) from 3x−4y+5=03x-4y+5=0, and the foot of the perpendicular.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2026 · 5 Apr 2026 Shift 1 · Q61Moderate

Example 1 · Straight Lines · Distance from a Line and Parallel Lines

In an equilateral triangle PQR , let the vertex P be at (3,5)(3,5) and the side QR be along the line x+y=4x+y= 4. If the orthocenter of the triangle PQRPQR is (α,β)(\alpha,\beta), then 9(α+β)9(\alpha+\beta) is equal to :

Write the line as ax + by + c = 0 first

The denominator is a2+b2\sqrt{a^2+b^2} of the rearranged equation. For y=2x+3y=2x+3, that is 2x−y+3=02x-y+3=0, so the denominator is 5\sqrt5, not 33.

Concept 2 of 3: Parallel lines

Parallel lines differ only in the constant: ax+by+c1=0ax+by+c_1=0 and ax+by+c2=0ax+by+c_2=0 are ∣c1−c2∣a2+b2\frac{|c_1-c_2|}{\sqrt{a^2+b^2}} apart, once both have the same aa and bb. A line shifted by dd is ax+by+c±da2+b2=0ax+by+c\pm d\sqrt{a^2+b^2}=0; the sign picks the side. The points at a fixed distance from a line lie on the two parallel lines at that distance, so a fixed area on a fixed base gives two parallel lines.

Definition

  • Distance: ∣c1−c2∣a2+b2\frac{|c_1-c_2|}{\sqrt{a^2+b^2}}, with equal aa and bb.
  • Parallel line through (x1,y1)(x_1,y_1): a(x−x1)+b(y−y1)=0a(x-x_1)+b(y-y_1)=0.
  • Shift by dd: ax+by+c±da2+b2=0ax+by+c\pm d\sqrt{a^2+b^2}=0.
  • Equilateral triangle with one vertex between two parallel lines, at distances pp and qq from them, and the other two vertices on the lines: side2=43(p2+pq+q2)^2=\frac43(p^2+pq+q^2).

Distance between parallel lines

d=∣c1−c2∣a2+b2d=\frac{|c_1-c_2|}{\sqrt{a^2+b^2}}

Worked example

Find the distance between 3x+4y=23x+4y=2 and 6x+8y+11=06x+8y+11=0.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2026 · 21 Jan 2026 Shift 1 · Q54Moderate

Example 2 · Straight Lines · Distance from a Line and Parallel Lines

Let a point A lie between the parallel lines L1L_{1} and L2L_{2} such that its distances from L1L_{1} and L2L_{2} are 6 and 3 units, respectively. Then the area (in sq. units) of the equilateral triangle ABC , where the points B and C lie on the lines L1L_{1} and L2L_{2} respectively, is :

Match the coefficients first

x+2y+1=0x+2y+1=0 and 2x+4y+7=02x+4y+7=0 are parallel, but the formula needs equal aa and bb. Doubling the first gives ∣2−7∣20\frac{|2-7|}{\sqrt{20}}, not ∣1−7∣5\frac{|1-7|}{\sqrt5}.

Concept 3 of 3: Which side of a line

ax+by+cax+by+c is zero on the line, positive on one side and negative on the other. Two points are on the same side exactly when they give the same sign. A point is inside a triangle when, for each side, it has the same sign as the opposite vertex. The origin is usually the easiest point to test against.

Definition

  • Same side of ax+by+c=0ax+by+c=0: ax1+by1+cax_1+by_1+c and ax2+by2+cax_2+by_2+c have the same sign.
  • Inside a triangle: on the same side of each side as the opposite vertex.
  • With b>0b>0, ax+by+c>0ax+by+c>0 is the side above the line.

Same side of a line

(ax1+by1+c)(ax2+by2+c)>0(ax_1+by_1+c)(ax_2+by_2+c)>0

Worked example

For which kk are (k,1)(k,1) and the origin on the same side of x+2y=6x+2y=6?
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2025 · 24 Jan 2025 · Q133Moderate

Example 3 · Straight Lines · Distance from a Line and Parallel Lines

Let the points (112,α)\left( \frac{11}{2},\alpha \right) lie on or inside the triangle with sides x+y=11,x+2y=16x + y = 11,x + 2y = 16 and 2x+3y=292x + 3y = 29. Then the product of the smallest and the largest values of α\alpha is equal to :

Test with the vertex, not the sketch

Deciding "inside" from a rough picture fails when the lines are close together. For each side, compare signs with the opposite vertex; the three inequalities give the exact range.

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 (3)

  • Distance from a point to a line

    Perpendicular distance

    d=∣ax1+by1+c∣a2+b2d=\frac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}}
  • Parallel lines

    Distance between parallel lines

    d=∣c1−c2∣a2+b2d=\frac{|c_1-c_2|}{\sqrt{a^2+b^2}}
  • Which side of a line

    Same side of a line

    (ax1+by1+c)(ax2+by2+c)>0(ax_1+by_1+c)(ax_2+by_2+c)>0

Watch out for (3)

Test yourself on Straight Lines

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