# Thread:

1. ## Distance from a point to a line

So, the point given is A = ( 4, 2 ) and the line given is
p: (x,y) = (1,2) + s[-1 3]

Okay.. so I re-write the line in form ax + by = c which would be..

y - 2 = (-1/3)(x-1)
y = (-1/3)x + (7/3)
(1/3)x - y = (7/3)

so a = (1/3) b = (-1)

so a normal to the line p would be n = [1/3 -1]

I find a point on line p, I pick Q = (1,2)

I find a new vector by subtracting Q from A.. so (4,2) - (1,2) would be the new vector r.

now for me to find the distance of the point, I project n (r).. so

I take a unit vector of n and take the dot product of it with r and to find the scalar. then I take the scalar and multiple it by n again.

then i find the distance of the new vector and that is the distance of the point?

Does that make sense, or am I completely wrong?

2. The distance from the point $(p,q)$ to the line $Ax+By+C=0$ is given as $\frac{{\left| {Ap + Bq + C} \right|}}{{\sqrt {A^2 + B^2 } }}$
Your line is standard form is $3x+y-5=0$

3. okay, i see now i messed up converting from slope to standard form.. i understand the formula but not so much how it works.. my question is, how do you get to the formula? I thought it involved the dot product of a unit vector which is a normal to the line given and the vector from the point given to any point on the line then once you have the scalar, you multiple it by the unit vector of the normal and find the length of that vector..

4. Originally Posted by zodiacbrave
okay, i see now i messed up converting from slope to standard form.. i understand the formula but not so much how it works.. my question is, how do you get to the formula? I thought it involved the dot product of a unit vector which is a normal to the line given and the vector from the point given to any point on the line then once you have the scalar, you multiple it by the unit vector of the normal and find the length of that vector..
Here is a general solution.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 4, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.945731520652771, "perplexity_flag": "head"}