Results 1 to 5 of 5

Math Help - distance of line and a point

  1. #1
    Member
    Joined
    Oct 2008
    Posts
    206

    distance of line and a point

    if l:ax+by+c=0 is a line in the 2-space and P_0(x_0,y_0) is a point, then the distance between the point P_0 and the line l is:

    \frac{|ax_0+by_0+c|}{\sqrt{a^2+b^2}}

    Can anyone explain briefly to me why is that so? Does it based on the concept of orthogonal projection?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor red_dog's Avatar
    Joined
    Jun 2007
    From
    Medgidia, Romania
    Posts
    1,245
    Thanks
    1
    Let d be the line passing through P_0 and perpendicular to line l.

    The slope of line l is: m_l=-\frac{a}{b}

    Then the slope of line d is m_d=\frac{b}{a}.

    The equation of line d is y-y_0=\frac{b}{a}(x-x_0)

    The intersection point of the two lines is P_1\left(\frac{b^2x_0-aby_0-ac}{a^2+b^2},\frac{a^2y_0-abx_0-bc}{a^2+b^2}\right).

    Then the distance between the point P0 and the line l is the distance between the points P0 and P1. Use the formula of distance between two points and you'll get the result you want to prove.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member alunw's Avatar
    Joined
    May 2009
    Posts
    188
    The shortest distance from a point to the line is perpendicular to the line (which I guess you could show with calculus if you didn't believe). And any perpendicular to the line ax+by+c=0 will have the form -bx+ay+d=0.
    Clearly to pass through (x0,y0) you need d to take the value bx_0-ay_0. Then you can find where the perpendicular meets the line and so calculate the distance. You could do this in a general way, and it will turn out you get the answer that you do. I'm not sure there is any special reason why it turns out so elegantly (and it is even more elegant if you arrange to have a^2+b^2=1, which you can do for any line). It is also well worth noting that the sign of ax+by+c tells you which side of the line your point is on. This is extremely useful when you are doing geometry in a computer program - for instance you would probably test test whether a point is in a convex polygon using this kind of formula. I find this form of line equation far more useful than the usual y=mx+c form.
    See Point-Line Distance--2-Dimensional -- from Wolfram MathWorld for a derivation
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Oct 2008
    Posts
    206
    Hi, thanks for help. It turns out that the distance btw line and point is rather intuitive. What about a plane and a point? Such as the distance between L:ax+by+cz+d=0 and the point P_0(x_0,y_0,z_0) is

    \frac{|ax_0+by_0+cz_0+d|}{\sqrt{a^2+b^2+c^2}}
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor
    Opalg's Avatar
    Joined
    Aug 2007
    From
    Leeds, UK
    Posts
    4,041
    Thanks
    7
    Quote Originally Posted by noob mathematician View Post
    What about a plane and a point? Such as the distance between L:ax+by+cz+d=0 and the point P_0(x_0,y_0,z_0) is

    \frac{|ax_0+by_0+cz_0+d|}{\sqrt{a^2+b^2+c^2}}
    That formula is also true. To prove it, notice that the unit normal vector to the plane ax+by+cz+d=0 is \mathbf{n} = k(a,b,c), where k=\frac1{\sqrt{a^2+b^2+c^2}}. If you travel t units along this vector, starting from the point \mathbf{p} = (x_0,y_0,z_0) then you get to the point \mathbf{p}+t\mathbf{n}. The condition for that point to lie on the plane is a(x_0+tka) + b(y_0+tkb) + c(z_0+tkc) + d = 0. Solve that equation for t and you find that the distance from \mathbf{p} to the plane is |t| = \frac{|ax_0+by_0+cz_0+d|}{\sqrt{a^2+b^2+c^2}}.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 6
    Last Post: May 16th 2011, 04:57 AM
  2. Distance from a point to the line
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: December 1st 2010, 07:32 PM
  3. Distance from a point to a line in r^3
    Posted in the Calculus Forum
    Replies: 3
    Last Post: June 6th 2010, 09:55 AM
  4. Distance from a point to a line.
    Posted in the Pre-Calculus Forum
    Replies: 4
    Last Post: May 30th 2009, 07:30 AM
  5. Replies: 3
    Last Post: February 20th 2008, 10:17 AM

Search Tags


/mathhelpforum @mathhelpforum