Distance of a point from a line

Drop a perpendicular from any point to any straight line and there is exactly one foot where it lands — and the length of that perpendicular segment is, by definition, the shortest possible distance from the point to the line. Every other path from the point to the line is longer. Coordinate geometry turns this geometric fact into a one-line formula: write the line in general form Ax+By+C=0Ax+By+C=0, plug in the point's coordinates, and the perpendicular distance falls out directly, no diagram or construction needed. This sits in the Straight Lines chapter of CBSE Class 11 Coordinate Geometry, right after the various forms of a line's equation, and it quietly underlies later ideas like the distance between two parallel lines. The formula rewards careful bookkeeping — get the line into the right form, read off AA, BB, CC correctly, and the rest is arithmetic.

The core insight

The perpendicular distance of a point (x1,y1)(x_1,y_1) from the line Ax+By+C=0Ax+By+C=0 is d=∣Ax1+By1+C∣A2+B2d=\dfrac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}.

The core idea

Among all the line segments joining a point to a given line, the perpendicular one is shortest — this is why "the distance of a point from a line" always means the perpendicular distance, not distance to some arbitrary point on the line. For a line in general form,

Ax+By+C=0,Ax + By + C = 0,

the perpendicular distance dd of a point (x1,y1)(x_1, y_1) from it is

d=∣Ax1+By1+C∣A2+B2.d = \frac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}}.

where: AA, BB, CC are the coefficients of the line's general equation, (x1,y1)(x_1,y_1) is the given point, and the modulus in the numerator forces d≥0d \geq 0 regardless of which side of the line the point sits on. A few structural facts make this formula easy to use correctly. If the point lies on the line, then Ax1+By1+C=0Ax_1+By_1+C=0 exactly, so d=0d=0 — the formula degrades gracefully to the case it should. The distance of the origin from a line is nothing new — just set (x1,y1)=(0,0)(x_1,y_1)=(0,0) in the same formula, giving d=∣C∣A2+B2d=\dfrac{|C|}{\sqrt{A^2+B^2}}. Rescaling the whole equation Ax+By+C=0Ax+By+C=0 by any nonzero constant kk changes nothing: the numerator picks up a factor ∣k∣|k| and so does the denominator, and they cancel. That is why clearing fractions or common factors before substituting is always safe. If a line is given in any other form — slope-intercept y=mx+cy=mx+c, intercept form, or two-point form — it must first be rearranged into Ax+By+C=0Ax+By+C=0 before the formula applies at all; plugging numbers in from the wrong form is the single most common source of error. It also helps to notice what the formula is really doing dimensionally. The numerator ∣Ax1+By1+C∣|Ax_1+By_1+C| measures how far the point's coordinates are from satisfying the line's equation — zero if the point is on the line, and growing as the point moves away from it. But this raw number depends on how the line's equation happens to be scaled (multiplying by 22 doubles it, for instance), so dividing by A2+B2\sqrt{A^2+B^2} — the length of the vector of coefficients (A,B)(A,B) — normalises it back into an honest, scale-independent length. That normalising denominator is exactly why the scaling fact above holds: it cancels whatever factor the numerator picked up.

Figure
A point off a line with the perpendicular segment drawn to the foot on the line marked with a right angle, labelled as the shortest path from the point to the line
Perpendicular distance is the shortest path from point to line line: Ax + By + C = 0 point (x1, y1) perpendicular distance d any other path to the line is longer than d
Derivation APerpendicular distance from a point to a line in general form

The goal is to derive the formula d=∣Ax1+By1+C∣A2+B2d=\dfrac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}} for the perpendicular distance of a point (x1,y1)(x_1,y_1) from the line Ax+By+C=0Ax+By+C=0, starting only from the two-point distance formula and the fact that a perpendicular from a point to a line meets it at a single foot, so that the result the syllabus asks students to quote is not merely memorised but justified from first principles.

Step 1. Let M(h,k)M(h,k) be the foot of the perpendicular dropped from the point P(x1,y1)P(x_1,y_1) onto the line Ax+By+C=0Ax+By+C=0. Since MM lies on the line, Ah+Bk+C=0Ah+Bk+C=0, and the segment PMPM is perpendicular to the line, so PMPM is parallel to the line's normal direction (A,B)(A,B) — the direction that measures how steeply the line's value Ax+By+CAx+By+C changes as you move away from it.

Step 2. Because PMPM is parallel to (A,B)(A,B), write h=x1−Ath=x_1-At and k=y1−Btk=y_1-Bt for some real number tt: starting from PP and stepping a distance proportional to tt along the direction (A,B)(A,B) lands exactly on the foot MM. The unknown tt measures how far along that normal direction one must travel.

Step 3. Substitute h,kh,k into Ah+Bk+C=0Ah+Bk+C=0: A(x1−At)+B(y1−Bt)+C=0A(x_1-At)+B(y_1-Bt)+C=0, which gives Ax1+By1+C−t(A2+B2)=0Ax_1+By_1+C-t(A^2+B^2)=0, so t=Ax1+By1+CA2+B2t=\dfrac{Ax_1+By_1+C}{A^2+B^2}. This pins down exactly how far along the normal direction one must move from PP to land on the line.

Step 4. The distance PMPM is the length of the step taken, which is ∣t∣|t| times the length of the direction vector (A,B)(A,B), namely A2+B2\sqrt{A^2+B^2}. So d=PM=∣t∣A2+B2=∣Ax1+By1+C∣A2+B2⋅A2+B2=∣Ax1+By1+C∣A2+B2d=PM=|t|\sqrt{A^2+B^2}=\dfrac{|Ax_1+By_1+C|}{A^2+B^2}\cdot\sqrt{A^2+B^2}=\dfrac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}, exactly the formula stated above, and since it came from a length it is automatically non-negative.

Worked example

Problem. Find the perpendicular distance of the point (2,3)(2, 3) from the line 3x−4y+5=03x - 4y + 5 = 0.

Step 1. Identify A=3A=3, B=−4B=-4, C=5C=5, and the point (x1,y1)=(2,3)(x_1,y_1)=(2,3). Check the line is already in general form, so no rearrangement is needed.

Step 2. Substitute into the formula:

d=∣3(2)+(−4)(3)+5∣32+(−4)2=∣6−12+5∣9+16=∣−1∣25.d = \frac{|3(2) + (-4)(3) + 5|}{\sqrt{3^2 + (-4)^2}} = \frac{|6 - 12 + 5|}{\sqrt{9+16}} = \frac{|-1|}{\sqrt{25}}.

Step 3. Simplify: d=15d=\dfrac{1}{5}. Answer: d=15d=\dfrac{1}{5} units.

Competitive stretch

Problem. Find the distance of the origin from the line y=34x+10y=\tfrac34 x+10.

Step 1. Rearrange to general form: 34x−y+10=0\tfrac34 x-y+10=0, then clear the fraction by multiplying through by 44: 3x−4y+40=03x-4y+40=0. This does not change the distance, since scaling the whole equation scales numerator and denominator of the formula by the same factor.

Step 2. Identify A=3A=3, B=−4B=-4, C=40C=40, and the point is the origin (0,0)(0,0).

Step 3. Substitute: d=∣3(0)−4(0)+40∣32+(−4)2=409+16=405=8d=\dfrac{|3(0)-4(0)+40|}{\sqrt{3^2+(-4)^2}}=\dfrac{40}{\sqrt{9+16}}=\dfrac{40}{5}=8. Answer: d=8d=8 units, matching what direct substitution into the unscaled equation 34x−y+10=0\tfrac34x-y+10=0 would also give.

Common traps

  • Plugging coefficients from a non-general form (like y=mx+cy=mx+c) straight into the formula instead of first rearranging to Ax+By+C=0Ax+By+C=0.
  • Dropping the absolute value and reporting a negative "distance," which has no meaning.
  • Sign slips when moving terms across the equals sign — e.g. from y=34x+10y=\tfrac34x+10 forgetting that moving yy left flips its sign to give B=−1B=-1, not B=1B=1.
  • Substituting (y1,x1)(y_1,x_1) in place of (x1,y1)(x_1,y_1), or using coordinates from the wrong point when a problem gives several.
  • Forgetting to simplify A2+B2\sqrt{A^2+B^2} correctly — a common slip is writing A2+B2\sqrt{A^2+B^2} as A+BA+B, which is only true if one of them is zero.
  • Assuming the formula tells you which side of the line the point is on. It doesn't, by itself: the unsigned expression inside the modulus does carry that information (points on opposite sides give opposite signs before the absolute value is taken), but the standard distance formula throws that sign away, so extra reasoning is needed if the question also asks about sides.

Ask the tutor: want to practice rearranging equations into general form before computing distance, or try a few more distance problems with different lines?

Why does the formula use the absolute value instead of just Ax1 plus By1 plus C over the square root?

Without the modulus, the expression Ax1+By1+CAx_1+By_1+C can come out negative when the point lies on one side of the line and positive on the other — it is a signed quantity related to which side of the line the point is on. But "distance" by definition cannot be negative, so the formula wraps the numerator in absolute value bars to guarantee a non-negative answer regardless of which side the point lies on.

Do I have to rearrange every line into Ax plus By plus C equals 0 before finding a distance?

Yes, always. The formula is defined specifically for a line written in general form, so if you are given y=mx+cy=mx+c, two-point form, or intercept form, the very first step is to move every term to one side to get Ax+By+C=0Ax+By+C=0, then read off AA, BB, CC carefully before substituting. Skipping this step is the most common reason students get the wrong sign or the wrong coefficient.

Is there a shortcut for distance from the origin specifically?

Yes — since the origin is just the point (0,0)(0,0), substituting x1=0x_1=0 and y1=0y_1=0 into the general formula kills both the Ax1Ax_1 and By1By_1 terms, leaving d=∣C∣A2+B2d=\dfrac{|C|}{\sqrt{A^2+B^2}}. It is worth remembering this special case directly since it appears often, but it is not a separate formula — it is the same one with the point fixed at the origin. The same idea underlies why the derivation writes the foot of the perpendicular as the point shifted by an unknown multiple tt of the normal direction (A,B)(A,B): forcing that shifted point onto the line pins down tt, and the length travelled, once simplified, is exactly the formula — so it is not an arbitrary rule but a genuine consequence of "shortest path is the perpendicular one."

Before this

Where this leads