Distance from a Point to a Line Calculator

Enter the coordinates of the point and the equation of the line to get the distance, the step-by-step solution, and the Cartesian graph.

Point Coordinates
( , )
Equation of the Line
x + y + = 0

Result

The distance between the point and the line is:

Quick Examples

Rate this tool

What Is the Distance from a Point to a Line?

In analytic geometry, the distance from a point to a line is the length of the perpendicular line segment connecting that point to the line. The general formula to calculate the distance d from a point P(x0, y0) to a line L expressed in its general form, Ax + By + C = 0, is:

\(d=\dfrac{|Ax_0+By_0+C|}{\sqrt{A^{2}+B^{2}}}\)

Graph of the minimum distance from a point to a line with its general formula

Solved Exercises

Calculate the distance from point (2, 3) to the straight line x + y + 1 = 0.

Result

The distance between point \( P(2, 3) \) and the line \( x+ y+ 1 = 0 \) is:

$$ d = 3\sqrt{2} \approx 4.24 $$

Step-by-step solution

The formula to use is the following:

$$ d = \dfrac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}} $$

1. Identify the coefficients and the coordinates of the point:

$$ \begin{aligned} A &= 1 & x_0 &= 2 \\[1em] B &= 1 & y_0 &= 3 \\[1em] C &= 1 & & \end{aligned} $$

2. Substitute the values into the formula:

$$ d = \dfrac{|1\left(2\right) + 1\left(3\right) +1|}{\sqrt{1^2 + 1^2}} $$

3. Calculate the products and powers:

$$ d = \dfrac{|2 +3 +1|}{\sqrt{1 + 1}} $$

4. Simplify the numerator and denominator:

$$ d = \dfrac{|6|}{\sqrt{2}} = \dfrac{6}{\sqrt{2}} $$

5. Exact and approximate final result:

$$ d = 3\sqrt{2} \approx 4.24 $$
Calculating the distance from a point to a line: graph of the perpendicular segment connecting a point to a line on the Cartesian plane.
Distance between a point and a line
Determine the distance between point P(-2, 5) and the line passing through (0, 0) and (3, 4).

Solution

The distance between point \( P(-2, 5) \) and the line with equation \( -4x+ 3y = 0 \) is:

$$ d = \dfrac{23}{5} = 4.6 $$

Step-by-step solution

The distance formula is the following:

$$ d = \dfrac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}} $$

The general equation of the line passing through the given points is:

$$ -4x+ 3y = 0 $$

1. Identify the coefficients and the coordinates of the point:

$$ \begin{aligned} A &= -4 & x_0 &= -2 \\[1em] B &= 3 & y_0 &= 5 \\[1em] C &= 0 & & \end{aligned} $$

2. Substitute the values into the formula:

$$ d = \dfrac{|\left(-4\right)\left(-2\right) + 3\left(5\right) +0|}{\sqrt{\left(-4\right)^2 + 3^2}} $$

3. Calculate the products and powers:

$$ d = \dfrac{|8 +15 +0|}{\sqrt{16 + 9}} $$

4. Simplify the numerator and denominator:

$$ d = \dfrac{|23|}{\sqrt{25}} = \dfrac{23}{\sqrt{25}} $$

5. Final result:

$$ d = \dfrac{23}{5} = 4.6 $$
Graph of the perpendicular segment connecting a point to a line on the Cartesian plane and its length.
Find the distance between the point (1, 1) and the straight line 3x + y/2 + 1 = 0.

Result

The distance between point \( P(1, 1) \) and the line \( 3x+ \dfrac{1}{2}y+ 1 = 0 \) is:

$$ d = \dfrac{9\sqrt{37}}{37} \approx 1.48 $$

Step-by-step solution

The formula to use is the following:

$$ d = \dfrac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}} $$

1. Identify the coefficients and the coordinates of the point:

$$ \begin{aligned} A &= 3 & x_0 &= 1 \\[1em] B &= \dfrac{1}{2} & y_0 &= 1 \\[1em] C &= 1 & & \end{aligned} $$

2. Substitute the values into the formula:

$$ d = \dfrac{\left|3\left(1\right) + \left(\dfrac{1}{2}\right)\left(1\right) +1\right|}{\sqrt{3^2 + \left(\dfrac{1}{2}\right)^2}} $$

3. Calculate the products and powers:

$$ d = \dfrac{\left|3 +\dfrac{1}{2} +1\right|}{\sqrt{9 + \dfrac{1}{4}}} $$

4. Simplify the numerator and denominator:

$$ d = \dfrac{\left|\dfrac{9}{2}\right|}{\sqrt{\dfrac{37}{4}}} = \dfrac{\dfrac{9}{2}}{\sqrt{\dfrac{37}{4}}} $$

5. Final result and its decimal approximation:

$$ d = \dfrac{9\sqrt{37}}{37} \approx 1.48 $$
Graph of the perpendicular segment connecting a point to a line on the Cartesian plane and its distance.

Related Tools

Daniel Machado

Professor of Mathematics, graduated from the Faculty of Exact, Chemical and Natural Sciences of the National University of Misiones (UNAM). Developer and creator of RigelUp, dedicated to building tools for mathematical learning.

Leave a Reply

Your email address will not be published. Required fields are marked *