[Math] 2D line passes through two points, what is the perpendicular distance from point P

vectors

Suppose a 2D line passes through two points $P_0(10, 15)$ and $P_1(200, 20)$

What is the perpendicular distance from point $P(-500, 48)$ to the line?

Following this formula this is as far as I got before I got lost.

$dx = 10-200,\quad dy = 15-20$

$d = \sqrt{-190\cdot-190 + -5\cdot-5}$

That is as far as I got.

can someone correct me or give the correct formula I need for this problem?

Best Answer

There are a few ways to solve this problem.

Method 1.

  1. Write an equation (in the form $y=mx+b$) for the line passing through the given points $P_0$ and $P_1$.
  2. Write an equation for the line passing through the given point $P$, and perpendicular to the line you found in Step 1. (Use the fact that the slopes of perpendicular lines are negative reciprocals.)
  3. Find the intersection of the two lines. (Do this by solving the system of two equations you wrote down in steps 1 and 2.)
  4. Now use the distance formula to find out how far point $P$ is from the intersection you found in step 3.

Method 2.

  1. Write an equation (in the form $f(x)=mx+b$) for the line passing through the given points $P_0$ and $P_1$.

  2. Using the equation from 1, the coordinates for any point on the given line can be written in the form $(x, f(x))$.

  3. Use the distance formula to write a formula for the distance between the given point $P$ and an arbitrary point $(x, f(x))$ on the line. This formula will be a function of $x$.

  4. Find the minimum value of the function from 7. There are a few different ways to do this, too:

    • First, recognize that the distance will be minimized if and only if the $\text{distance}^2$ is minimized. That allows you to essentially ignore the square root in the distance formula (as long as you remember to put it back at the end).
    • Underneath the square root symbol is an expression that is quadratic in $x$. If you know how to find the vertex of a parabola from its formula, you can use that to find the minimum of $\text{distance}^2$. Then take the square root of that to find the minimum distance.
    • Alternatively if you know Calculus you can set the derivative of $\text{distance}^2$ equal to 0, solve for $x$, and then compute the distance.
Related Question