# Distance between a point and a line (defined by 2 points)

I have a point at (4,6) and a line defined by points (-7,9) and (10, 9). How would I find the shortest distance between the point and the line, without converting each into linear equations?

https://imgur.com/a/FUbGMJn

• Welcome to Math.SE! Please read this post and the others there for information on writing a good question for this site. In particular, people will be more willing to help if you edit your question to include some motivation, and an explanation of your own attempts, such as your calculations using the formula $$\operatorname{distance}(ax+by+c=0, (x_0, y_0)) = \frac{|ax_0+by_0+c|}{\sqrt{a^2+b^2}}.$$ – GNUSupporter 8964民主女神 地下教會 Apr 28 '18 at 11:21
• Why "without converting each into linear equations". Its simply $y=9$ – lab bhattacharjee Apr 28 '18 at 11:21
• Because I'm doing this in a program and don't have access to writing equations to lines. – crazicrafter1 Apr 28 '18 at 11:25

The area of the parallelogram spanned by points $A,B$ (on the line), and $C$ is $$|(B-A)\times (C-A)|=|(x_B-x_A)(y_C-y_A)-(y_B-y_A)(x_C-x_A)|.$$ If we divide this by the length $\sqrt{(B-A)^2}=\sqrt{(x_B-x_A)^2+(y_B-y_A)^2}$ of its base, we obtain ist height.
So in your concrete example, the distance is $$\frac{|(10-(-7))(6-9)-(9-9)(4-(-7))|}{\sqrt{(10-(-7))^2+(9-9)^2}}=3.$$
You will Need the Hessian Normalform of the given line: $$\frac{ax+by+c}{\pm \sqrt{a^2+b^2}}=0$$