Difference between revisions of "Distance formula"
m |
(Fixed LaTeX, minor grammar mistakes, and cleaned up formatting.) |
||
Line 6: | Line 6: | ||
--Shortest distance from a point to a line-- | --Shortest distance from a point to a line-- | ||
the distance between the line <math>ax+by+c = 0</math> and point <math>(x_1,y_1)</math> is | the distance between the line <math>ax+by+c = 0</math> and point <math>(x_1,y_1)</math> is | ||
− | <cmath>\dfrac{ | + | <cmath>\dfrac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}}</cmath> |
---Proof--- | ---Proof--- | ||
− | The equation <math>ax + by + c = 0</math> can be written as <math>y = - | + | The equation <math>ax + by + c = 0</math> can be written as <math>y = -\dfrac{a}{b}x - \dfrac{c}{a}</math> |
− | + | Thus, the perpendicular line through <math>(x_1,y_1)</math> is: | |
− | <cmath> | + | <cmath>\dfrac{x-x_1}{a}=\dfrac{y-y_1}{b}=\dfrac{t}{\sqrt{a^2+b^2}}</cmath> |
− | where <math>t</math> is | + | where <math>t</math> is the parameter. |
<math>t</math> will be the distance from the point <math>(x_1,y_1)</math> along the perpendicular line to <math>(x,y)</math>. | <math>t</math> will be the distance from the point <math>(x_1,y_1)</math> along the perpendicular line to <math>(x,y)</math>. | ||
− | So <cmath>x = x_1 + a | + | So <cmath>x = x_1 + a \cdot \dfrac{t}{\sqrt{a^2+b^2}}</cmath> and <cmath>y = y_1 + b \cdot \dfrac{t}{\sqrt{a^2+b^2}}</cmath> |
− | This meets the given line <math>ax+by+c = 0</math> where: | + | This meets the given line <math>ax+by+c = 0</math>, where: |
− | <cmath>a(x_1 + a | + | <cmath>a\left(x_1 + a \cdot \dfrac{t}{\sqrt{a^2+b^2}}\right) + b\left(y_1 + b \cdot \dfrac{t}{\sqrt{a^2+b^2}}\right) + c = 0</cmath> |
− | <cmath>ax_1 + by_1 + c + t(a^2+b^2) | + | <cmath>\implies ax_1 + by_1 + c + \dfrac{t(a^2+b^2)}{\sqrt{a^2+b^2}} + c = 0</cmath> |
− | <cmath>ax_1 + by_1 + c + t | + | <cmath>\implies ax_1 + by_1 + c + t \cdot \sqrt{a^2+b^2} = 0</cmath> |
− | so | + | , so: |
− | <cmath> t | + | <cmath> t \cdot \sqrt{a^2+b^2} = -(ax_1+by_1+c)</cmath> |
− | <cmath>t = -(ax_1+by_1+c) | + | <cmath>\implies t = \dfrac{-(ax_1+by_1+c)}{\sqrt{a^2+b^2}}</cmath> |
− | Therefore the perpendicular distance from <math>(x_1,y_1)</math> to the line | + | Therefore the perpendicular distance from <math>(x_1,y_1)</math> to the line <math>ax+by+c = 0</math> is: |
− | ax+by+c = 0 is: | + | |
− | <cmath>|t| = | + | <cmath>|t| = \dfrac{|ax_1 + by_1 + c|}{\sqrt(a^2+b^2)}</cmath> |
Revision as of 13:34, 30 July 2014
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 Thus, the perpendicular line through is: where is the parameter.
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 is: