# Distance from a point to a line

Consider a point $P \,(-6,-5)$, and a line $s$ given by $y=-3x+7$.

I have at least two options $A$ and $B$ to compute the distance between them:

A.1) Find a line $t$, perpendicular to $s$, that goes through $(-6,-5)$.
A.2) Find the point of intersection between $s$ and $t$.
A.3) Compute the distance between that point and $(-6,-5)$.

This would give me the answer $3\sqrt{10}$.

OR

B) Use the formula $$d(P,s)=\frac{|ax_0+by_0+c_0|}{\sqrt{a^2+b^2}}$$

which gives me $\sqrt{61}$ on the denominator.

How do I solve that to get $3\sqrt{10}$?

$$\frac{\left| (-3 )(-6)+(-1)(-5)+7\right| }{\sqrt{10}}=3\sqrt{10}$$
• Thank you. Was substituting $x_0$ and $y_0$ instead of $a$ and $b$. – Samuel Barbosa Oct 1 '14 at 14:07