Distance from a point to a straight line

Let us define an arbitrary point P(x0; y0) and a straight line MN: Ax + By + C = 0. Distance from a point to a straight line We obtain the formula for determining the distance d from the point P to the line MN. Let's write the equation of a straight line as an equation with an angular coefficient:

y = - A ∕ B ⋅ x - C ∕ B.

We find the coordinates of the points of intersection of this straight line with the coordinate axes:

M: x=0  =>   y = - C ∕ B  =>  M(0; - C ∕ B).

N: y=0  =>   x = - C ∕ A  =>  N(- C ∕ A; 0).

Let's draw a straight line EF || MN through the point P. Using the equation of a straight line passing through a given point, and the condition of parallelism of straight lines, we obtain the equation of a straight line EF in the form:

y = - A ∕ B ⋅ x + y0 + A ∕ B ⋅ x0.

The distance between the parallel lines MN and EF is equal to the distance from the point P to the line MN, that is PQ=MK=d. Let's ∠NOH=α, then ∠NOH=∠MEK=α, as angles with respectively perpendicular sides. Since ΔEKM - is rectangular, by definition the sine of the angle is

sinα = MK / ME   ⇔   MK = ME⋅sinα.

Coordinates of the point M(0;- C ∕ B), and of the point E(0; y0 + A ∕ B ⋅ x0), therefore, the length of the segment ME is: Distance ME

Calculators for solving examples and problems in mathematics

The best math apps for schoolchildren and their parents, students and teachers. More detailed ...


To find sinα, consider the right triangle ΔMON. According to the Pythagoras' theorem: Distance MN The rectangular ΔMON is similar to the rectangular ΔHON, therefore,

∠OMN=∠HON=α;    sinα=ON/MN.

Substituting the values of the lengths of the segments ON and MN, we obtain

sin(alpha)
Thus, for the distance MK we have:

Distance MK
Finally, the formula for determining the distance from the point P(x0; y0) to the straight line Ax + By + C = 0 is: Formula for the distance from a point to a line
RNG - Random Number Generator app
Related Sites & Topics:
Saturday, November 8, 2025
Contact
Privacy Policy
Terms & Conditions

Copyright © 2025 Intemodino Group s.r.o.
All rights reserved
Menu