Distance between a point and a line and between 2 parallel lines pending
Distance of (x0,y0) from ax + by + c = 0 formula is:
d = (ax0 + by0 + c)/sqrt(a^2 + b^2)
Proof:
Let the perpendicular from (x0,y0) fall on the line at (x1,y1).
ax1 + by1 + c = 0
Slope of the perpendicular line = (y1 - y0)/(x1- x0) = b/a
Let
y1 - y0 = kb
x1 - x0 = ka
d^2 = (x1 - x0)^2 + (y1 - y0)^2 = k^2(a^2 + b^2)
Now
ax1 + by1 + c = 0
=> a(ka + x0) + b(kb + y0) + c = 0
=> k = -(ax0 + by0 + c)/(a^2 + b^2)
=>
d^2 = (ax0 + by0 + c)^2/(a^2 + b^2)
H.P.
Distance between 2 parallel lines ax + by + c1 = 0 and ax + by + c2 = 0 formula is:
d = |c1 - c2|/sqrt(a^2 + b^2)
Proof:
Let (x0,y0) lie on the first line =>
ax0 + by0 + c1 = 0
Distance of (x0,y0) from the second line is:
(ax0 + by0 + c2)/sqrt(a^2 b+2) = |c1 - c2|/sqrt(a^2 + b^2) = answer.
Comments
Post a Comment