Distance formula: Difference between revisions
m →Proof |
|||
| Line 3: | Line 3: | ||
==Shortest distance from a point to a line== | ==Shortest distance from a point to a line== | ||
The distance between the line <imath>ax+by+c = 0</imath> and point <imath>(x_1,y_1)</imath> is | |||
<cmath>\dfrac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}}</cmath> | <cmath>\dfrac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}}.</cmath> | ||
===Proof=== | ===Proof=== | ||
The equation < | The equation <imath>ax + by + c = 0</imath> can be written as <imath>y = -\dfrac{a}{b}x - \dfrac{c}{b}</imath> | ||
Thus, the perpendicular line through < | Thus, the perpendicular line through <imath>(x_1,y_1)</imath> is: | ||
<cmath>\dfrac{x-x_1}{a}=\dfrac{y-y_1}{b}=\dfrac{t}{\sqrt{a^2+b^2}}</cmath> | <cmath>\dfrac{x-x_1}{a}=\dfrac{y-y_1}{b}=\dfrac{t}{\sqrt{a^2+b^2}}</cmath> | ||
where < | where <imath>t</imath> is the parameter. | ||
< | <imath>t</imath> will be the distance from the point <imath>(x_1,y_1)</imath> along the perpendicular line to <imath>(x,y)</imath>. | ||
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> | 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 < | This meets the given line <imath>ax+by+c = 0</imath>, where: | ||
<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>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>\implies ax_1 + by_1 + c + \dfrac{t(a^2+b^2)}{\sqrt{a^2+b^2}} + c = 0</cmath> | <cmath>\implies ax_1 + by_1 + c + \dfrac{t(a^2+b^2)}{\sqrt{a^2+b^2}} + c = 0</cmath> | ||
| Line 24: | Line 24: | ||
<cmath>\implies t = \dfrac{-(ax_1+by_1+c)}{\sqrt{a^2+b^2}}</cmath> | <cmath>\implies t = \dfrac{-(ax_1+by_1+c)}{\sqrt{a^2+b^2}}</cmath> | ||
Therefore the perpendicular distance from < | Therefore the perpendicular distance from <imath>(x_1,y_1)</imath> to the line <imath>ax+by+c = 0</imath> is: | ||
<cmath>|t| = \dfrac{|ax_1 + by_1 + c|}{\sqrt{a^2+b^2}}</cmath> | <cmath>|t| = \dfrac{|ax_1 + by_1 + c|}{\sqrt{a^2+b^2}}</cmath> | ||
Revision as of 23:36, 10 November 2025
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
.
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:
This article is a stub. Help us out by expanding it.