If $M(x_2,y_2)$ is the foot of a perpendicular drawn from $P(x_1,y_1)$ on the line $ax+by+c=0$, then $$\frac{x_2-x_1}{a}=\frac{y_2-y_1}{b}=\frac{-(ax_1+by_1+c)}{a^2+b^2}.$$

This is given as a formula in my module without any explanation. I can understand the first equality since the product of the slopes of two perpendicular lines is $-1$. But I cannot understand what $\large\frac{-(ax_1+by_1+c)}{a^2+b^2}$ means and how the last equality holds. Please explain.

up vote 10 down vote accepted

$$\frac{x_2-x_1}{a}=\frac{a(x_2-x_1)}{a^2}=\frac{y_2-y_1}{b}=\frac{b(y_2-y_1)}{b^2}$$

implies

$$\frac{x_2-x_1}{a}=\frac{y_2-y_1}{b}=\frac{a(x_2-x_1)+b(y_2-y_1)}{a^2+b^2}=\frac{ax_2+by_2-ax_1-by_1}{a^2+b^2}$$

and using the fact that $M$ lies on the original line we have the result.

This works because $\frac{A}{B}=\frac{C}{D}$ implies that each equals $\frac{A+C}{B+D}$.

  • 1
    How does that implies this? .. how can we add terms like that? :o – Quixotic Apr 19 '11 at 19:06
  • 1
    Aha,got it ... right from the elementary proportion chapter!! :) – Quixotic Apr 19 '11 at 19:11
  • @Jasper:Although this is not my question and his approach could not be use to solve the problem say finding the foot of the perpendicular or image,but still +1. – Quixotic Apr 19 '11 at 19:17
  • @Tretwick: Actually this works. +1. Nice solution. I find this much better than my solution :) – Aryabhata Apr 19 '11 at 19:20
  • @Moron:Given the point P and an equation of the line how could we find the foot of the perpendicular using this? – Quixotic Apr 19 '11 at 19:44

This comes for the fact that the distance of point $\displaystyle P(x_1, y_1)$ from the line $\displaystyle ax + by + c = 0$ is given by $$\frac{| ax_1 + by_1 + c|}{\sqrt{a^2 + b^2}}$$

If $\displaystyle \frac{x_2 - x_1}{a} = \frac{y_2 - y_1}{b} = k$ say, then we have that, by considering the triangle formed by drawing a horizontal line from M and a vertical line from P (depends on your figure, though).

For instance see this figure:

enter image description here

$$(ka)^2 + (kb)^2 = \left(\frac{| ax_1 + by_1 + c|}{\sqrt{a^2 + b^2}}\right)^2$$ and thus

$$ |k| = \frac{|ax_1 + by_1 + c|}{a^2 + b^2}$$

I am guessing you can now determine the right sign to take.

  • I don't understand,what I could is that $\frac{| ax_1 + by_1 + c|}{\sqrt{a^2 + b^2}}$ is the distance of $PM$ right? but I could not understand how the triangle is formed? and also why/how $(ka)^2 + (kb)^2 = (\frac{| ax_1 + by_1 + c|}{\sqrt{a^2 + b^2}})^2$? – Quixotic Apr 19 '11 at 19:00
  • @Tretwick: It comes from the Pythagorean theorem. I will try to add a figure.. – Aryabhata Apr 19 '11 at 19:03
  • Yes,I guessed that but how are you getting a right angle right-angle triangle,..a figure would be great help :) – Quixotic Apr 19 '11 at 19:04
  • Got it.. thanks a lot umm the sign part is due to the fact that slope is perpendicular right? – Quixotic Apr 19 '11 at 19:38
  • @Tretwick: Actually I would recommend you go through Jasper's neat answer. I haven't thought about the sign, but for all points (x1,y1) lying on one side of the line ax+by+c = 0, the values ax1 + by1 + c are all of the same sign. You should be able to use that. – Aryabhata Apr 19 '11 at 19:40

Since, the point $M(x_2, y_2)$ i.e. foot of perpendicular lies on the line $ax+by+c=0$ hence, it will satisfy the equation as follows $$ax_2+by_2+c=0$$ $$=> ax_2+by_2=-c$$

Now applying the condition of line $ax+by+c=0$ & the line joining $P(x_1, y_1)$ & $M(x_2, y_2)$ to be perpendicular to each other, we have $$(\text{slope of line: ax+by+c=0})\times(\text{slope of line PM})=-1$$ $$=>\left(\frac{-a}{b}\right)\times \left(\frac{y_2-y_1}{x_2-x_1}\right)=-1$$ $$=>\frac{x_2-x_1}{a}=\frac{y_2-y_1}{b}$$ $$=>\frac{x_2-x_1}{a}=\frac{y_2-y_1}{b}=\frac{a(x_2-x_1)}{a^2}=\frac{b(y_2-y_1)}{b^2}=\frac{a(x_2-x_1)+b(y_2-y_1)}{a^2+b^2}$$$$=\frac{-ax_1-by_1+ax_2+by_2}{a^2+b^2}=\frac{-ax_1-by_1+(ax_2+by_2)}{a^2+b^2}=\frac{-ax_1-by_1+(-c)}{a^2+b^2}=\frac{-(ax_1+by_1+c)}{a^2+b^2}$$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.