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

220 Views Asked by At

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?

3

There are 3 best solutions below

5
On 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$).

4
On

Guide:

  • Let the acute angle between the blue line and the negative $x$-axis be $\theta$. Since the slope is $-\frac1k$. Can you compute $\tan \theta$?

  • The length of the purple line is $\sin \theta$.

$$\tan \theta = \frac{\sin\theta}{\sqrt{1-\sin^2\theta}}$$

0
On

You have a line $$\bbox{ y(x) = - \frac{x}{k} }$$ We'll assume $0 \ne k \in \mathbb{R}$; i.e. $k$ may be any nonzero real.

The distance squared from point $(-1, 0)$ to $(x, y(x))$ is $(x-1)^2 + (y(x))^2$. As a function of $x$, $$\bbox{ L_2(x) = (x - 1)^2 + \bigr( y(x) \bigr)^2 = \frac{k^2 + 1}{k^2} x^2 + 2 x + 1 }$$ Since this is continuous and differentiable, it reaches an extrema when its derivative, $$\bbox{ \frac{d L_2(x)}{d x} = \frac{2 k^2 + 2}{k^2} x + 2 }$$ is zero: $$\bbox{ \frac{2 k^2 + 2}{k^2} x + 2 = 0 } \quad \iff \quad \bbox{ x = - \frac{k^2}{k^2 + 1} }$$ Substituting that back to the distance squared, and taking a square root, we find that the minimum distance is $$\bbox{ L_{min} = \sqrt{L_2\left(-\frac{k^2}{k^2 + 1}\right)} }$$ where the expression in the square root is $L_2(x)$ when $x = -k^2 / (k^2 + 1)$.

That simplifies to $$\bbox{ L_{min} = \frac{1}{\sqrt{k^2 + 1}} }$$

We can make this cover all $k \in \mathbb{R}$, by noting that when $k = 0$, is passes via the point $(-1, 0)$, so then the distance is zero: $$\bbox[#fffff7]{ \text{Minimum distance} = \begin{cases} 0, & k = 0 \\ \displaystyle \frac{1}{\sqrt{k^2 + 1}}, & k \ne 0 \end{cases} }$$