Difference between revisions of "Distance formula"
Armalite46 (talk | contribs) m |
Armalite46 (talk | contribs) m |
||
Line 4: | Line 4: | ||
{{stub}} | {{stub}} | ||
− | Shortest distance from a point to a line | + | --Shortest distance from a point to a line-- |
− | the distance | + | the distance between the line <math>ax+by+c = 0</math> and point <math>(x_1,y_1)</math> is |
− | between the line <math>ax+by+c = 0</math> and point <math>(x_1,y_1)</math> is | ||
<cmath>|ax_1+by_1+c|/\sqrt(a^2+b^2)</cmath> | <cmath>|ax_1+by_1+c|/\sqrt(a^2+b^2)</cmath> | ||
− | + | ---Proof--- | |
− | The equation <math>ax + by + c = 0</math> can be written | + | The equation <math>ax + by + c = 0</math> can be written as <math>y = -(a/b)x - (c/a)</math> |
− | + | So the perpendicular line through <math>(x_1,y_1)</math> is: | |
− | |||
− | |||
− | So the perpendicular line through ( | ||
− | |||
<math>x-x_1</math> <math>y-y_1</math> | <math>x-x_1</math> <math>y-y_1</math> | ||
---- = ---- = <math>t/\sqrt(a^2+b^2)</math> where t is a parameter. | ---- = ---- = <math>t/\sqrt(a^2+b^2)</math> where t is a parameter. | ||
a b | a b | ||
− | t will be the distance from the point <math>(x_1,y_1)</math> along the perpendicular line to (x,y). | + | t will be the distance from the point <math>(x_1,y_1)</math> along the perpendicular line to <math>(x,y)</math>. |
− | |||
So | So | ||
− | x = x_1 + a | + | <cmath>x = x_1 + a * t/\sqrt(a^2+b^2)</cmath> |
− | |||
and | and | ||
+ | <cmath>y = y_1 + b {times} t/\sqrt(a^2+b^2)</cmath> | ||
− | + | This meets the given line <math>ax+by+c = 0</math> where: | |
− | + | <cmath>a(x_1 + a * t/sqrt(a^2+b^2)) + b(y1 + b* t/sqrt(a^2+b^2)) + c = 0</cmath> | |
− | This meets the given line ax+by+c = 0 where: | + | <cmath>ax_1 + by_1 + c + t(a^2+b^2)/sqrt(a^2+b^2) + c = 0</cmath> |
− | + | <cmath>ax_1 + by_1 + c + t * sqrt(a^2+b^2) = 0</cmath> | |
− | |||
− | |||
− | |||
− | |||
− | |||
so | so | ||
+ | <math> t * sqrt(a^2+b^2) = -(ax_1+by_1+c)</math> | ||
+ | <math>t = -(ax_1+by_1+c)/\sqrt(a^2+b^2)</math> | ||
− | + | Therefore the perpendicular distance from <math>(x_1,y_1)</math> to the line | |
− | |||
− | |||
− | |||
− | Therefore the perpendicular distance from ( | ||
ax+by+c = 0 is: | ax+by+c = 0 is: | ||
− | + | <cmath>|t| = (ax_1 + by_1 + c)/\sqrt(a^2+b^2)</cmath> | |
− | |||
− | |||
− |
Revision as of 19:22, 7 November 2013
The distance formula is a direct application of the Pythagorean Theorem in the setting of a Cartesian coordinate system. In the two-dimensional case, it says that the distance between two points and is given by . In the -dimensional case, the distance between and is
This article is a stub. Help us out by expanding it.
--Shortest distance from a point to a line-- the distance between the line and point is
---Proof--- The equation can be written as So the perpendicular line through is:
---- = ---- = where t is a parameter. a b
t will be the distance from the point along the perpendicular line to . So
and
This meets the given line where:
so
Therefore the perpendicular distance from to the line ax+by+c = 0 is: