Distance of a point from a line

NCERT Class 11 Mathematics Chapter 9 Section 9.4

Quick answer

The distance of the point (x, y) from the line Ax + By + C = 0 is d = |Ax + By + C| / √(A + B), the length of the perpendicular from the point to the line. Two parallel lines that differ only in their constant terms C and C are d = |C − C| / √(A + B) apart. For example, the point (3, −5) is at distance 3/5 from the line 3x − 4y − 26 = 0.

With your textbook

NCERT Mathematics (Class 11), Chapter 9 “Straight Lines”, Section 9.4 “Distance of a Point From a Line”, pages 164–168.

Open the official NCERT chapter (PDF, 2.5 MB, ncert.nic.in) (opens in a new tab)

Checked against the 2026-27 reprint on .

Distance of a point from a line

Distance of a point from a line

The distance of a point from a line is the length of the perpendicular drawn from the point to the line.

NCERT Mathematics (Class 11), Section 9.4, page 164

  • It is the shortest distance from the point to any point of the line. The foot of the perpendicular is the nearest point of the line.

In plain words: to measure how far a point is from a line, go straight towards the line at right angles. Any slanting path is longer, because it is the hypotenuse of a right triangle whose other side is the perpendicular.

The distance formula

Let L be Ax + By + C = 0, with A and B not both zero, and P(x1, y1) a point, with PM perpendicular to L (NCERT Section 9.4, pages 164–166, Fig 9.14). NCERT finds PM from an area. Take A, B and C all non-zero, so that L meets the axes at Q(−C/A, 0) and R(0, −C/B). Then:

  • PM = 2 × area PQR ÷ QR, since area PQR = ½ × PM × QR;
  • by the area formula for the three vertices, 2 × area PQR = |C/(AB)| × |Ax1 + By1 + C|;
  • by the distance formula, QR = √(C2/A2 + C2/B2).

QR = |C/(AB)| × √(A2 + B2).

Dividing, the factor |C/(AB)| cancels:

Distance of (x, y) from Ax + By + C = 0

d = |Ax + By + C| / √(A + B)

The line 3x + 4y − 12 = 0 meets the axes at Q(4, 0) and R(0, 3). From P(5, 4) the perpendicular PM meets it at M; PM = d = 19/5, which equals 2 × area PQR ÷ QR = 19 ÷ 5.
NCERT’s proof on a concrete line: triangle PQR has area 19/2 and base QR = 5, so its height PM is 19/5, the same as the formula gives.

The proof needs A, B and C to be non-zero, but the formula holds for every line. For a vertical line x = a (A = 1, B = 0, C = −a) it gives |x1 − a|, which is plainly right. For a line through the origin, C = 0 and the formula still works. The distance of the origin from Ax + By + C = 0 is |C|/√(A2 + B2).

NCERT Example 9 (page 167): the distance of (3, −5) from 3x − 4y − 26 = 0 is

|3 × 3 + (−4)(−5) − 26| / √(9 + 16)

= |9 + 20 − 26|/5 = 3/5.

Which side of the line? (JEE) The sign of Ax1 + By1 + C tells you the side. Points on one side of the line make it positive and points on the other side make it negative: each side is the solution set of a linear inequality in two variables, Ax + By + C > 0 or Ax + By + C < 0. For 3x + 4y − 12 = 0, the origin gives −12 and P(5, 4) gives +19, so they are on opposite sides.

Distance between parallel lines

We know that slopes of two parallel lines are equal.

NCERT Mathematics (Class 11), Section 9.4.1, page 166

Write the lines as y = mx + c1 and y = mx + c2. For m ≠ 0 the first meets the x-axis at A(−c1/m, 0), and the gap between the lines is the distance of A from the second line, mx − y + c2 = 0 (NCERT Fig 9.15). The formula above gives |c1 − c2|/√(1 + m2). (For m = 0, y = c1 and y = c2 are plainly |c1 − c2| apart.) For lines in general form, NCERT leaves the same steps to the reader, and they give the second box below.

Distance between parallel lines

d = |c − c| / √(1 + m)

d = |C − C| / √(A + B)

The second form needs the same A and B in both equations. NCERT Example 10 (page 167): 3x − 4y + 7 = 0 and 3x − 4y + 5 = 0 are |7 − 5|/√(9 + 16) = 2/5 apart.

The parallel lines 3x + 4y − 12 = 0 and 3x + 4y + 8 = 0. The perpendicular from A(4, 0) on the first line meets the second at N(8/5, −16/5); AN = |−12 − 8|/5 = 4.
Two parallel lines 4 units apart: the perpendicular from any point of one line to the other has length |C − C|/√(A + B).

Foot of the perpendicular and image (JEE)

A normal direction to Ax + By + C = 0 is (A, B), perpendicular to its direction (B, −A). Hence the perpendicular from P(x1, y1) follows direction (A, B), including horizontal and vertical cases. Its points are (x1 + At, y1 + Bt). It meets the line when

A(x1 + At) + B(y1 + Bt) + C = 0,

that is, when t = −(Ax1 + By1 + C)/(A2 + B2). That value of t gives the foot M. So PM = |t|√(A2 + B2) = |Ax1 + By1 + C|/√(A2 + B2), which proves the distance formula for every line. The image P′ of P in the line, its mirror point, lies the same distance beyond M, at 2t:

Foot M(h, k) of the perpendicular from (x, y)

(h − x)/A = (k − y)/B

= −(Ax + By + C)/(A + B)

Image (h, k) of (x, y) in Ax + By + C = 0

(h − x)/A = (k − y)/B

= −2(Ax + By + C)/(A + B)

If A or B is 0, use h = x1 + At and k = y1 + Bt directly, with t or 2t.

NCERT Miscellaneous Example 13 (page 169) finds the image of (1, 2) in x − 3y + 4 = 0, treating the line as a plane mirror. Here Ax1 + By1 + C = 1 − 6 + 4 = −1 and A2 + B2 = 10. So h − 1 = 2/10 and k − 2 = −6/10, and the image is (6/5, 7/5), as NCERT finds by another route.

Solved examples

Example 1: Rearrange first (NCERT Exercise 9.3, Q3, page 167)

Find the distance of (−1, 1) from the line 12(x + 6) = 5(y − 2).

In general form the line is 12x − 5y + 82 = 0. So

d = |−12 − 5 + 82| / √(144 + 25)

= 65/13 = 5.

Answer: 5 units.

Example 2: Points at a given distance (NCERT Exercise 9.3, Q4, page 167)

Find the points on the x-axis whose distances from the line x/3 + y/4 = 1 are 4 units.

In general form the line is 4x + 3y − 12 = 0. For (a, 0), |4a − 12|/5 = 4, so 4a − 12 = 20 or 4a − 12 = −20.

Answer: (8, 0) and (−2, 0).

Example 3: Parallel lines (NCERT Exercise 9.3, Q5, page 167)

Find the distance between (i) 15x + 8y − 34 = 0 and 15x + 8y + 31 = 0; (ii) l(x + y) + p = 0 and l(x + y) − r = 0, with l ≠ 0.

(i) A = 15, B = 8, √(225 + 64) = 17, so d = |−34 − 31|/17 = 65/17.

(ii) A = B = l, C1 = p, C2 = −r, so d = |p + r|/(|l|√2).

Answer: (i) 65/17; (ii) |p + r|/(|l|√2).

Example 4: Foot of the perpendicular (NCERT Exercise 9.3, Q13, page 168)

Find the foot of the perpendicular from (−1, 3) to 3x − 4y − 16 = 0.

Ax1 + By1 + C = −3 − 12 − 16 = −31 and A2 + B2 = 25, so (h + 1)/3 = (k − 3)/(−4) = 31/25. Then h = −1 + 93/25 and k = 3 − 124/25.

Answer: (68/25, −49/25). Check: 3(68/25) − 4(−49/25) = 400/25 = 16, so the foot is on the line.

Example 5: An image in a line mirror (NCERT Miscellaneous Exercise, Q17, page 173)

Find the image of (3, 8) in the line x + 3y = 7, treating the line as a plane mirror.

The line is x + 3y − 7 = 0, and 3 + 24 − 7 = 20, so (h − 3)/1 = (k − 8)/3 = −2 × 20/10 = −4.

Answer: (−1, −4). Check: the mid-point (1, 2) of (3, 8) and (−1, −4) is on the line, since 1 + 6 = 7.

Example 6: The line midway between two parallel lines (NCERT Miscellaneous Exercise, Q20, page 174)

Find the equation of the line equidistant from 9x + 6y − 7 = 0 and 3x + 2y + 6 = 0.

First give both lines the same A and B: the second is 9x + 6y + 18 = 0. The line midway has the average constant: 9x + 6y + C = 0 is equally far from both when |C + 7| = |C − 18|, so C = (−7 + 18)/2 = 11/2.

Answer: 18x + 12y + 11 = 0.

Example 7: An altitude (NCERT Exercise 9.3, Q16, page 168)

In triangle ABC with A(2, 3), B(4, −1) and C(1, 2), find the equation and length of the altitude from A.

BC has slope (2 + 1)/(1 − 4) = −1, so BC is x + y − 3 = 0. The altitude from A is perpendicular to it, with slope 1: y − 3 = x − 2. Its length is the distance of A from BC: |2 + 3 − 3|/√2 = √2.

Answer: x − y + 1 = 0, of length √2.

Common mistakes to avoid

Common mistake

Using the parallel-lines formula with different coefficients

For 9x + 6y − 7 = 0 and 3x + 2y + 6 = 0, |−7 − 6|/√(81 + 36) is wrong. Rewrite the second as 9x + 6y + 18 = 0 first; the distance is |−7 − 18|/√117 = 25/√117. Match the signs too: −3x + 4y + 5 = 0 is 3x − 4y − 5 = 0, so it is |7 + 5|/5 = 12/5 from 3x − 4y + 7 = 0, not 2/5.

Common mistake

Not writing the line as Ax + By + C = 0 first

In 12(x + 6) = 5(y − 2), C is 82 after moving every term to one side, not 6 or −2.

Common mistake

Forgetting the modulus

The formula gives a length, which is never negative. Without the modulus, Example 2 loses the point (−2, 0).

Common mistake

Stopping at the foot when the image is asked

The image is twice as far from P as the foot is: use 2(Ax1 + By1 + C) in its formula, not Ax1 + By1 + C.

Quick revision summary

  • The distance of a point from a line is the length of the perpendicular from the point to the line.
  • The distance of (x1, y1) from Ax + By + C = 0 is |Ax1 + By1 + C|/√(A2 + B2); from the origin it is |C|/√(A2 + B2).
  • Parallel lines Ax + By + C1 = 0 and Ax + By + C2 = 0 are |C1 − C2|/√(A2 + B2) apart, with the same A and B in both.
  • For A, B ≠ 0, the foot and the image of (x1, y1) come from (h − x1)/A = (k − y1)/B = −(Ax1 + By1 + C)/(A2 + B2), doubled for the image.
  • For example (NCERT Example 9), (3, −5) is 3/5 from 3x − 4y − 26 = 0.

Formula sheet

  • d = |Ax + By + C| / √(A + B)
  • origin: d = |C| / √(A + B)
  • parallel lines: d = |C − C| / √(A + B)
  • y = mx + c, y = mx + c: d = |c − c| / √(1 + m)
  • foot: (h − x)/A = (k − y)/B = −(Ax + By + C)/(A + B), A, B ≠ 0
  • image: (h − x)/A = (k − y)/B = −2(Ax + By + C)/(A + B), A, B ≠ 0

Questions students ask

What is the difference between the foot of the perpendicular and the image of a point?

The foot of the perpendicular from a point P to a line is the point M of the line nearest to P, while the image of P is its mirror point P′ on the other side, as far beyond the line as P is in front of it, so M is the mid-point of PP′. The perpendicular distance is the length PM, a number, whereas the foot and the image are points with coordinates. For example, for the line y = x the foot of the perpendicular from (5, 1) is (3, 3), the image is (1, 5) and the distance is 2√2: reflecting in y = x swaps the coordinates.

What is the distance of a point from the x-axis and the y-axis?

The distance of a point (x1, y1) from the x-axis is |y1| and its distance from the y-axis is |x1|: the x-axis is the line y = 0, and the distance formula with A = 0, B = 1 and C = 0 gives |y1|. So the distance from the x-axis is the size of the ordinate (the y-coordinate), not of the abscissa, since the coordinates are the point’s signed distances from the axes. For example, (−7, 3) is 3 units from the x-axis and 7 units from the y-axis.

What is the distance between two lines that are not parallel?

The distance between two lines in a plane that are not parallel is 0, because two non-parallel lines in a plane meet at a point; the formula |C1 − C2|/√(A2 + B2) is for parallel lines only, written with the same A and B. Perpendicular lines are a case of this: they intersect, so the distance between them is 0 too. A positive shortest distance between two non-parallel lines arises only in three dimensions, for skew lines, which the JEE Main syllabus covers in Unit 11, three-dimensional geometry.

How do you find the distance of a point from a line measured along another line?

To find the distance of a point P from a line measured along a given direction, draw the line through P in that direction, find the point Q where it meets the given line, and use the distance formula for PQ; for P off the line, this is never shorter than the perpendicular distance and equals it only for a perpendicular direction. A direction parallel to the target line gives no intersection when P is off it; if P is already on the target line, the distance is 0. For example, measured parallel to the x-axis, (5, −2) is 4 units from x + y = 7, since the line y = −2 meets it at (9, −2), while its perpendicular distance is |5 − 2 − 7|/√2 = 2√2. NCERT Miscellaneous Example 12 is worked this way.

Practice questions

Try each question first, then open the answer to check your working.

  1. Q1. The perpendicular from the origin to the line y = mx + c meets it at (−1, 2). Find m and c (NCERT Exercise 9.3, Q14).

    Show answerHide answer

    The perpendicular from O to (−1, 2) has slope −2, so the line has slope m = 1/2. It passes through (−1, 2): 2 = −1/2 + c, so c = 5/2.

  2. Q2. Find the points on the y-axis whose distance from the line x/3 + y/4 = 1 is 4 units (NCERT Miscellaneous Exercise, Q3).

    Show answerHide answer

    The line is 4x + 3y − 12 = 0. For (0, b), |3b − 12|/5 = 4, so 3b − 12 = ±20 and b = 32/3 or −8/3. The points are (0, 32/3) and (0, −8/3).

  3. Q3. Find the distance of the point (2, 1) from the line 3x + 4y + 5 = 0, and say whether the point is on the same side of the line as the origin.

    Show answerHide answer

    |6 + 4 + 5|/5 = 3. At (2, 1) the expression 3x + 4y + 5 is 15, and at the origin it is 5. Both are positive, so the point and the origin are on the same side.

  4. Q4. If p is the length of the perpendicular from the origin to the line with non-zero intercepts a and b on the axes, show that 1/p2 = 1/a2 + 1/b2 (NCERT Exercise 9.3, Q17).

    Show answerHide answer

    The line is bx + ay − ab = 0, so p = |ab|/√(a2 + b2). Then 1/p2 = (a2 + b2)/(a2b2) = 1/b2 + 1/a2.

More practice questions

Sources and review

Written by
TopicLamp Editorial Team.
Checked by
TopicLamp Review Team.
NCERT source
NCERT, Mathematics (Class 11), reprint 2026-27. Chapter 9 “Straight Lines”, Section 9.4 “Distance of a Point From a Line”, pages 164–168. Checked on . Official chapter PDF on ncert.nic.in (opens in a new tab) (2.5 MB).
Dates
First published Checked and updated
Corrections
  • : OpenAI Codex review: corrected domain, degenerate-case and geometry explanations; independently solved examples and practice. Detailed per-topic findings retained in content-quality audit.

Report a mistake on this page How pages are written, reviewed and corrected

Topics in Straight Lines

  1. Coordinate geometry basics

    NCERT Section 9.1 20 min read

  2. Locus and its equation

    14 min read

  3. Slope of a line

    NCERT Section 9.2 17 min read

  4. Forms of the equation of a line

    NCERT Section 9.3 17 min read

  5. Distance of a point from a line

    NCERT Section 9.4 You are reading this topic

  6. Intersection of lines and centres of a triangle

    17 min read