The shortest distance between a given point and a point on an infinite straight line as per Euclidean geometry is the distance between the point and the line. The shortest distance between the point and the closest point on the line is defined as the length of the line segment, which binds the point to the nearest point on the line, and is the perpendicular distance of the point to the line.
There are several ways to write the formula for computing the distance between two points and a line. Understanding the distance between two points and a line can prove beneficial in various scenarios, for instance, determining the distance between two trees.
Definition of the Distance of a Point from a Line
The distance of a point from a line can be defined as the shortest distance between two points. It is the shortest distance that can be travelled from one point on the line to the point. A line segment perpendicular to the line can represent this minimal length distance. Take a line M and a point Y that does not lie on M.
To measure the distance of the point from a line when the point is not lying on the line? Let us go through the equation of a straight line and the distance formula. E.g. take a triangle, PQR, which is right-angled at Q:
Given that ∠Q = 90° is the biggest angle in the triangle, PR (the hypotenuse) is the longest side; this is always the case. The hypotenuse PR will always be greater than PQ, perpendicular to P to QR.
The formula of perpendicular distance from the point of the line
For instance, take line M in XY−plane, and T (x1,y1) is any point at a distance d from line M. The line equation is given by Px + Qy + R = 0. The distance of a point from a line, ‘d’ is the length of the perpendicular drawn from T to M. The x and y-intercepts can be given as (-R/P) and (-R/Q), respectively.
Line M intersects at points Q and P, line M intersects at the x and y axes, respectively. The perpendicular distance between point T and the base QR of the triangle TPQ at point L is TL. The coordinates for the three specified points are as follows: T(x1,y1), P(x2,y2), and Q(x3,y3)
Here, (x2,y2) = ((-R/P), 0) and (x3,y3) = (0, (-R/Q)).
We need to find the perpendicular distance TL = d
The area of triangle is defined by the formula: Area (Δ TPQ) = ½ base × perpendicular height
Area (Δ TPQ) = ½ AB × TL
⇒ TL = 2 × area (Δ TPQ) / AB …….(1)
In coordinate geometry, the area (Δ TPQ) can be measured as:
Area = ½ |x1(y2 − y3) + x2(y3− y1) +x3(y1 − y2)|
= ½ | x1 (0 – (-R/Q)) + (−R/P) ((−R/Q) − y1) +0 (y1− 0)|
= ½ |(R/Q) × x1 – R/P((−R/Q) -y1) + 0|
= ½ |(R/Q) × x1 – R/P ((−R-Qy1)/Q)|
= ½ |(R/Q) × x1 + R2/PQ+ ((QRy1)/PQ)|
= ½ |(R/Q) × x1 + (R/P) × y1 + (R2/PQ)|
= ½ |R( x1/Q + y1/P + R/PQ)|
Multiply and divide the expression by PQ2, we get
= ½ |R(PQx1/PQ2 + (PQy1)/PQ2+ (PQ R2)/(PQ)2|
= ½ |RPx1/PQ + RQy1/PQ + R2/PQ|
=½ |R/ (PQ)|.|Px1 + Qy1 + R| …….(2)
As per the distance formula, the distance of the line PQ with the coordinates P(x1,y1), Q(x2,y2) can be calculated as:
PQ = ((x2 – x1)² + (y2 – y1)²)1/2
Here, P(x1,y1) = P(0, -R/Q) and Q(x2,y2) = Q(-R/P,0)
AB = (((-R/P)2 – 0) + (0 – (-R/Q))1/2
= ((R/P)2 + (R/Q)2)1/2
Distance, PQ = |R/PQ| (P2 + Q2)1/2 ……. (3)
Substituting (2) & (3) in (1), we have
The distance of the perpendicular KJ = d = |Px1 + Qy1 + R| / (P2 + Q2)1/2
Hence, the distance from a point (x1,y1) to the line Px + Qy + R = 0 is given by = |Px1 + Qy1 + R| / √(P2+ Q2).
Because the distance must be in positive value and some configurations of Px1, Qy1, R can generate negative value, the numerator under this expression must be encased with the absolute value sign.
Conclusion
The distance formulation and the region of the triangle formulation are used to get the formula for measuring the distance of a point from a line in space.
Euclidean geometry states that the shortest distance among factors on an infinite straight line is the distance between a point and a line.
The shortest distance between the point and the closest point on the road is the length of the line segment connecting the factor to the nearest point on the line, that is, the perpendicular distance of the point to the road.