0

I am not sure mathematically, if my understanding to $|Ax_p+By_p+C|$ to be correct. I noticed in a code that it is being used as a kind of distance of a point $P=(x_p,y_p)$ to line L $Ax+By+C = 0$

For that I am asking the question, what is the difference between the absolute value of substituting a point $P=(x_p,y_p)$ (not lying on a line) to a line $Ax+By+C = 0$ as follows,

$|A x_p + B y_p +C|$

and

Eucludean distance= $\frac{|Ax_p+By_p+C|}{\sqrt{A^2+B^2}}$

I am curious to understand the numerator of the euclidean distance. In the euclidean distance we are dividing by the magnitude or length of the vector (A,B). But what if I used only the numerator as the distance. What would be the difference between both values?

Another way of seeing it which I found based on this link,

enter image description here

to have something relative for the distance between point $P_1$ and line S, $$||\vec{PQ}||cos(\theta) = \frac{a(x_0)+b(y_0)+c}{\sqrt{a^2+b^2}} = \frac{||\vec{PQ}|| ||\vec{n}|| cos(\theta)}{||\vec{n}||}$$

where $\vec{PQ} ||\vec{n}|| cos(\theta) = \vec{PQ}.\vec{n}$ which is the dot product between the vector $\vec{PQ}$ and vector ${\vec{n}}$.

the dot product is the projection (purple line) of one vector $\vec{PQ}$ over the other $\vec{n}$.

If I compared the purple lines can be also used as a kind of relative distances of points $P_1$ and $P_2$ to the line S.

Is my understanding correct mathematically or there is a mistake of why $|Ax_p+By_p+C|$ actually works as a distance.

Mour_Ka
  • 316
  • It's not clear what you are asking. For example, from the equation $$\text{Euclidean distance} = \frac{|Ax_p+By_p+C|}{A^2+B^2}$$ I can immediately derive $$|Ax_p+By_p+C| = (\text{Euclidean distance}) \cdot (A^2+B^2)$$ Is that what you wanted to know? – Lee Mosher May 13 '23 at 23:11
  • 3
    Your expression for euclidean distance (of a point $(x_p,y_p)$ to line $Ax+By+C = 0$) is wrong, should be $\frac{|Ax_p+By_p+C|}{\sqrt{A^2+B^2}}$. – achille hui May 14 '23 at 03:00
  • @LeeMosher i am asking what is the difference between the two formulas on the plot. I know that shortest distance is the length of perpendicular line with the division while the other is a longer line but is there a definition for it? – Mour_Ka May 14 '23 at 13:57

0 Answers0