Distance from Point to Line Calculator

x +
y +
= 0
(
,
)

Enter the coefficients A, B, and C for the line equation, and the coordinates of the point. See Example

Distance from Point to Line Calculator

What is the Distance from a Point to a Line?

Imagine you're standing in a field, and there's a long, straight fence nearby. The shortest path from where you're standing to the fence is called the distance from a point to a line. It's like finding the quickest way to reach the fence!

How to Calculate the Distance from a Point to a Line

Calculating this distance is like solving a fun puzzle. We use a special formula that helps us find the shortest path from our point to the line. It's similar to measuring the length of a ladder leaning against the fence at a right angle.

Formula

The magic formula for finding the distance (d) from a point (x₀, y₀) to a line Ax + By + C = 0 is:

\[ d = \frac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}} \]

Where:

  • \(A\), \(B\), and \(C\) are the numbers that define our line
  • \(x_0\) and \(y_0\) are the coordinates of our point
  • \(|\cdot|\) means we take the absolute value (always positive)
  • \(\sqrt{}\) is the square root symbol

Calculation Steps

  1. Write down the equation of the line (Ax + By + C = 0)
  2. Note the coordinates of your point (x₀, y₀)
  3. Plug these numbers into the formula
  4. Calculate the top part of the fraction (inside the ||)
  5. Calculate the bottom part (under the square root)
  6. Divide the top by the bottom to get your answer!

Example and Visual Representation

Let's find the distance from the point (2, 1) to the line 3x - 4y + 5 = 0:

  • A = 3, B = -4, C = 5
  • x₀ = 2, y₀ = 1
  • Plugging into our formula: \(d = \frac{|3(2) + (-4)(1) + 5|}{\sqrt{3^2 + (-4)^2}}\)
  • Simplifying: \(d = \frac{|6 - 4 + 5|}{\sqrt{9 + 16}} = \frac{7}{5} = 1.4\)

Here's what this looks like:

x y 3x - 4y + 5 = 0 (2,1) d ≈ 1.4 d = |3(2) + (-4)(1) + 5| / √(3² + (-4)²) d = |6 - 4 + 5| / √(9 + 16) d = 7 / 5 = 1.4

In this picture, you can see the line (blue), the point (red dot), and the shortest distance between them (green dotted line). It's like the point is reaching out to touch the line in the quickest way possible!