Given only the slope, find the shortest distance from a line to a point on the x-axis

algebra-precalculusgeometrygraphing-functionsslope

enter image description here

I have the following amusing question.

Suppose that the red dot is the point $x = -1$

The blue line is the line crossing the origin with slope $-1/k, k > 0$

I wish to find the length of the purple line, which is the shortest distance from the blue line to the red dot.

Can this be done or do I need additional information?

Best Answer

Using the perpendicular distance formula: $d = \frac{ax_1 + by_1 + c}{\sqrt{a^2+b^2}}$ with $x_1 = -1, y_1 = 0$ (the coordinates of the given point) and $a = 1, b = k, c = 0$ (by writing the equation of the line in general form). This gives $d = \frac{1}{\sqrt{1+k^2}}$.

Note that this even works for $k < 0$ (but obviously not for $k = 0$).

Related Question