Option A.
Distance from a point to a line
In Euclidean geometry, the ‘distance from a point to a line is the shortest distance from a given point to any point on an infinite straight line. It is the perpendicular distance of the point to the line, the length of the line segment which joins the point to nearest point on the line. The formula for calculating it can be derived and expressed in several ways.
Knowing the distance from a point to a line can be useful in various situations—for example, finding the shortest distance to reach a road, quantifying the scatter on a graph, etc. In Deming regression, a type of linear curve fitting, if the dependent and independent variables have equal variance this results in orthogonal regression in which the degree of imperfection of the fit is measured for each data point as the perpendicular distance of the point from the regression line.
Line defined by an equation
In the case of a line in the plane given by the equation ax + by + c = 0, where a, b and c are real constants with a and b not both zero, the distance from the line to a point (x_{0}, y_{0}) is

$$
distance
(
a
x
+
b
y
+
c
=
0
,
(
x
0
,
y
0
)
)
=

a
x
0
+
b
y
0
+
c

a
2
+
b
2
.
{\displaystyle \operatorname distance (ax+by+c=0,(x_0,y_0))=\frac \sqrt a^2+b^2.}
The point on this line which is closest to (x_{0}, y_{0}) has coordinates:

$$
x
=
b
(
b
x
0
−
a
y
0
)
−
a
c
a
2
+
b
2
and
y
=
a
(
−
b
x
0
+
a
y
0
)
−
b
c
a
2
+
b
2
.
\displaystyle x=\frac b(bx_0ay_0)aca^2+b^2\text and y=\frac a(bx_0+ay_0)bca^2+b^2.
Horizontal and vertical lines
In the general equation of a line, ax + by + c = 0, a and b cannot both be zero unless c is also zero, in which case the equation does not define a line. If a = 0 and b ≠ 0, the line is horizontal and has equation y = −c/b. The distance from (x_{0}, y_{0}) to this line is measured along a vertical line segment of length y_{0} − (−c/b) = by_{0} + c/b in accordance with the formula. Similarly, for vertical lines (b = 0) the distance between the same point and the line is ax_{0} + c/a, as measured along a horizontal line segment.
Line defined by two points
If the line passes through two points P_{1} = (x_{1}, y_{1}) and P_{2} = (x_{2}, y_{2}) then the distance of (x_{0}, y_{0}) from the line is:

$$
distance
(
P
1
,
P
2
,
(
x
0
,
y
0
)
)
=

(
x
2
−
x
1
)
(
y
1
−
y
0
)
−
(
x
1
−
x
0
)
(
y
2
−
y
1
)

(
x
2
−
x
1
)
2
+
(
y
2
−
y
1
)
2
.
{\displaystyle \operatorname distance (P_1,P_2,(x_0,y_0))=\frac (x_2x_1)(y_1y_0)(x_1x_0)(y_2y_1)\sqrt (x_2x_1)^2+(y_2y_1)^2.}
The denominator of this expression is the distance between P_{1} and P_{2}. The numerator is twice the area of the triangle with its vertices at the three points, (x_{0}, y_{0}), P_{1} and P_{2}. See: Area of a triangle § Using coordinates. The expression is equivalent to h = 2A/b, which can be obtained by rearranging the standard formula for the area of a triangle: A = 1/2 bh, where b is the length of a side, and h is the perpendicular height from the opposite vertex.
Line defined by point and angle
If the line passes through the point P = (P_{x}, P_{y}) with angle θ, then the distance of some point (x_{0}, y_{0}) to the line is

$$
distance
(
P
,
θ
,
(
x
0
,
y
0
)
)
=

cos
(
θ
)
(
P
y
−
y
0
)
−
sin
(
θ
)
(
P
x
−
x
0
)

\cos(\theta )(P_yy_0)\sin(\theta )(P_xx_0)
Proofs
An algebraic proof
This proof is valid only if the line is neither vertical nor horizontal, that is, we assume that neither a nor b in the equation of the line is zero.
The line with equation ax + by + c = 0 has slope −a/b, so any line perpendicular to it will have slope b/a (the negative reciprocal). Let (m, n) be the point of intersection of the line ax + by + c = 0 and the line perpendicular to it which passes through the point (x_{0}, y_{0}). The line through these two points is perpendicular to the original line, so

$$
y
0
−
n
x
0
−
m
=
b
a
.
\displaystyle \frac y_0nx_0m=\frac ba.
Thus,
and by squaring this equation we obtain:

$$
a
2
(
y
0
−
n
)
2
+
b
2
(
x
0
−
m
)
2
=
2
a
b
(
y
0
−
n
)
(
x
0
−
m
)
.
\displaystyle a^2(y_0n)^2+b^2(x_0m)^2=2ab(y_0n)(x_0m).
Now consider,

$$
(
a
(
x
0
−
m
)
+
b
(
y
0
−
n
)
)
2
=
a
2
(
x
0
−
m
)
2
+
2
a
b
(
y
0
−
n
)
(
x
0
−
m
)
+
b
2
(
y
0
−
n
)
2
=
(
a
2
+
b
2
)
(
(
x
0
−
m
)
2
+
(
y
0
−
n
)
2
)
\displaystyle \beginaligned(a(x_0m)+b(y_0n))^2&=a^2(x_0m)^2+2ab(y_0n)(x_0m)+b^2(y_0n)^2\\&=\left(a^2+b^2\right)\left((x_0m)^2+(y_0n)^2\right)\endaligned
using the above squared equation. But we also have,

$$
(
a
(
x
0
−
m
)
+
b
(
y
0
−
n
)
)
2
=
(
a
x
0
+
b
y
0
−
a
m
−
b
n
)
2
=
(
a
x
0
+
b
y
0
+
c
)
2
\displaystyle (a(x_0m)+b(y_0n))^2=(ax_0+by_0ambn)^2=(ax_0+by_0+c)^2
since (m, n) is on ax + by + c = 0.
Thus,

$$
(
a
2
+
b
2
)
(
(
x
0
−
m
)
2
+
(
y
0
−
n
)
2
)
=
(
a
x
0
+
b
y
0
+
c
)
2
\displaystyle \left(a^2+b^2\right)\left((x_0m)^2+(y_0n)^2\right)=(ax_0+by_0+c)^2
and we obtain the length of the line segment determined by these two points,

$$
d
=
(
x
0
−
m
)
2
+
(
y
0
−
n
)
2
=

a
x
0
+
b
y
0
+
c

a
2
+
b
2
.
{\displaystyle d=\sqrt (x_0m)^2+(y_0n)^2=\frac \sqrt a^2+b^2.}
A geometric proof
This proof is valid only if the line is not horizontal or vertical.
Drop a perpendicular from the point P with coordinates (x_{0}, y_{0}) to the line with equation Ax + By + C = 0. Label the foot of the perpendicular R. Draw the vertical line through P and label its intersection with the given line S. At any point T on the line, draw a right triangle TVU whose sides are horizontal and vertical line segments with hypotenuse TU on the given line and horizontal side of length B (see diagram). The vertical side of ∆TVU will have length A since the line has slope –A/B.
∆PRS and ∆TVU are similar triangles, since they are both right triangles and ∠PSR ≅ ∠TUV since they are corresponding angles of a transversal to the parallel lines PS and UV (both are vertical lines). Corresponding sides of these triangles are in the same ratio, so:

$$

P
R
¯


P
S
¯

=

T
V
¯


T
U
¯

.
{\displaystyle \frac =\frac .}
If point S has coordinates (x_{0},m) then PS = y_{0} – m and the distance from P to the line is:

$$

P
R
¯

=

y
0
−
m


B

A
2
+
B
2
.
{\displaystyle \overline PR=\frac \sqrt A^2+B^2.}
Since S is on the line, we can find the value of m,

$$
m
=
−
A
x
0
−
C
B
,
\displaystyle m=\frac Ax_0CB,
and finally obtain:

$$

P
R
¯

=

A
x
0
+
B
y
0
+
C

A
2
+
B
2
.
{\displaystyle \overline PR=\frac \sqrt A^2+B^2.}
A variation of this proof is to place V at P and compute the area of the triangle ∆UVT two ways to obtain that
$$
where D is the altitude of ∆UVT drawn to the hypotenuse of ∆UVT from P. The distance formula can then used to express
,
$$, and
$$in terms of the coordinates of P and the coefficients of the equation of the line to get the indicated formula.^{[citation needed]}
A vector projection proof
Let P be the point with coordinates (x_{0}, y_{0}) and let the given line have equation ax + by + c = 0. Also, let Q = (x_{1}, y_{1}) be any point on this line and n the vector (a, b) starting at point Q. The vector n is perpendicular to the line, and the distance d from point P to the line is equal to the length of the orthogonal projection of
$$on n. The length of this projection is given by:

$$
d
=

Q
P
→
⋅
n

‖
n
‖
.
\displaystyle d=\frac \.
Now,

$$
Q
P
→
=
(
x
0
−
x
1
,
y
0
−
y
1
)
,
\displaystyle \overrightarrow QP=(x_0x_1,y_0y_1),
so
$$
Q
P
→
⋅
n
=
a
(
x
0
−
x
1
)
+
b
(
y
0
−
y
1
)
\displaystyle \overrightarrow QP\cdot \mathbf n =a(x_0x_1)+b(y_0y_1)
and
$$
‖
n
‖
=
a
2
+
b
2
,
\displaystyle \
thus

$$
d
=

a
(
x
0
−
x
1
)
+
b
(
y
0
−
y
1
)

a
2
+
b
2
.
{\displaystyle d=\frac \sqrt a^2+b^2.}
Since Q is a point on the line,
$$, and so,

$$
d
=

a
x
0
+
b
y
0
+
c

a
2
+
b
2
.
{\displaystyle d=\frac \sqrt a^2+b^2.}
Although the distance is given as a modulus, the sign can be useful to determine which side of the line the point is on, in a sense determined by the direction of normal vector (a,b)
Another formula
It is possible to produce another expression to find the shortest distance of a point to a line. This derivation also requires that the line is not vertical or horizontal.
The point P is given with coordinates (
$$).
The equation of a line is given by
. The equation of the normal of that line which passes through the point P is given
$$.
The point at which these two lines intersect is the closest point on the original line to the point P. Hence:

$$
m
x
+
k
=
x
0
−
x
m
+
y
0
.
\displaystyle mx+k=\frac x_0xm+y_0.
We can solve this equation for x,

$$
x
=
x
0
+
m
y
0
−
m
k
m
2
+
1
.
\displaystyle x=\frac x_0+my_0mkm^2+1.
The y coordinate of the point of intersection can be found by substituting this value of x into the equation of the original line,

$$
y
=
m
(
x
0
+
m
y
0
−
m
k
)
m
2
+
1
+
k
.
\displaystyle y=m\frac (x_0+my_0mk)m^2+1+k.
Using the equation for finding the distance between 2 points,
$$, we can deduce that the formula to find the shortest distance between a line and a point is the following:

$$
d
=
(
x
0
+
m
y
0
−
m
k
m
2
+
1
−
x
0
)
2
+
(
m
x
0
+
m
y
0
−
m
k
m
2
+
1
+
k
−
y
0
)
2
=

k
+
m
x
0
−
y
0

1
+
m
2
.
{\displaystyle d={\sqrt {\left(\frac x_0+my_0mkm^2+1x_0\right)^2+\left(m\frac x_0+my_0mkm^2+1+ky_0\right)^2}}=\frac \sqrt 1+m^2.}
Recalling that m = –a/b and k = – c/b for the line with equation ax + by + c = 0, a little algebraic simplification reduces this to the standard expression.
Vector formulation
The equation of a line can be given in vector form:

$$
x
=
a
+
t
n
\displaystyle \mathbf x =\mathbf a +t\mathbf n
Here a is a point on the line, and n is a unit vector in the direction of the line. Then as scalar t varies, x gives the locus of the line.
The distance of an arbitrary point p to this line is given by

$$
distance
(
x
=
a
+
t
n
,
p
)
=
‖
(
p
−
a
)
−
(
(
p
−
a
)
⋅
n
)
n
‖
.
.
This formula can be derived as follows:
$$is a vector from a to the point p. Then
$$is the projected length onto the line and so

$$
a
+
(
(
p
−
a
)
⋅
n
)
n
\displaystyle \mathbf a +((\mathbf p \mathbf a )\cdot \mathbf n )\mathbf n
is a vector that is the projection of
$$onto the line and represents the point on the line closest to
$$. Thus

$$
(
p
−
a
)
−
(
(
p
−
a
)
⋅
n
)
n
\displaystyle (\mathbf p \mathbf a )((\mathbf p \mathbf a )\cdot \mathbf n )\mathbf n
is the component of
$$perpendicular to the line. The distance from the point to the line is then just the norm of that vector. This more general formula is not restricted to two dimensions.
Another vector formulation
If the vector space is orthonormal and if the line goes through point a and has a direction vector n, the distance between point p and the line is

$$
distance
(
x
=
a
+
t
n
,
p
)
=
‖
(
p
−
a
)
×
n
‖
‖
n
‖
.
{\displaystyle \operatorname distance (\mathbf x =\mathbf a +t\mathbf n ,\mathbf p )=\frac \.}
Note that cross products only exist in dimensions 3 and 7.
See also
 Hesse normal form
 Lineline intersection
 Distance between two lines
 Distance from a point to a plane
 Skew lines#Distance
Notes
References
 Anton, Howard (1994), Elementary Linear Algebra (7th ed.), John Wiley & Sons, ISBN 0471587427
 Ballantine, J.P.; Jerbert, A.R. (1952), “Distance from a line or plane to a point”, American Mathematical Monthly, 59 (4): 242–243, doi:10.2307/2306514, JSTOR 2306514
 Larson, Ron; Hostetler, Robert (2007), Precalculus: A Concise Course, Houghton Mifflin Co., ISBN 9780618627196
 Spain, Barry (2007) [1957], Analytical Conics, Dover Publications, ISBN 9780486457734
 Weisstein, Eric W. “PointLine Distance–3Dimensional”. MathWorld.
Further reading
 Deza, Michel Marie; Deza, Elena (2013), Encyclopedia of Distances (2nd ed.), Springer, p. 86, ISBN 9783642309588
Source: Distance from a point to a line
Wikipedia
Video about Which Diagram Represents A Perpendicular Distance In Euclidean Geometry
Perpendicular Distance (1 of 2: Introduction to the Formula)
Question about Which Diagram Represents A Perpendicular Distance In Euclidean Geometry
If you have any questions about Which Diagram Represents A Perpendicular Distance In Euclidean Geometry, please let us know, all your questions or suggestions will help us improve in the following articles!
The article Which Diagram Represents A Perpendicular Distance In Euclidean Geometry was compiled by me and my team from many sources. If you find the article Which Diagram Represents A Perpendicular Distance In Euclidean Geometry helpful to you, please support the team Like or Share!
Rate Articles Distance from a point to a line
Rate: 45 stars
Ratings: 3781
Views: 83217155
Search keywords Which Diagram Represents A Perpendicular Distance In Euclidean Geometry
1. PointLine Distance
2. Perpendicular Distance
3. Shortest Distance
4. Vector Projection
5. Line Segment
6. Vector Direction
7. Orthogonal Distance
8. Vector Magnitude
9. Vector Subtraction
10. Vector Addition
#Distance #point #line