What point on the line $y=2x+4$ is closest to the origin?

5.5k Views Asked by At

What point on the line $y=2x+4$ is closest to the origin in $\mathbb{R}^2$? What is the distance from this point to the origin?

I know the point closest to the origin is perpendicular to the origin, however I am not sure how to find the specific point. I just know its $(x, 2x+4)$ and the distance is just the norm of $(x, 2x+4)$.

5

There are 5 best solutions below

0
On

Hint:

The gradient of a perpendicular to a line of gradient $m$ has gradient $-1/m$. So you can find the equation of the perpendicular. Then find where they intersect by solving these two equations simultaneously.

1
On

From a very geometric point of view, the point on the line $\ell$ defined by $y = 2x + 4$ that is closest to the origin is the point of intersection of $\ell$ and a line perpendicular to $\ell$ through the origin. Let's call this perpendicular line $\ell_{\perp}$, just for specificity. This line will have slope $-\frac{1}{2}$, and passes through the point $(0,0)$, so using the point-slope equation for a line, we have that $\ell_{\perp}$ is given by $$ y - 0 = -\frac{1}{2} (x - 0) \iff y = -\frac{1}{2} x. $$ The point that we are interested in is then the intersection of $\ell$ and $\ell_{\perp}$, which is the unique solution to the system $$ \begin{cases} y = 2x+4 \\ y = -\frac{1}{2}x. \end{cases}$$ Since this is tagged , we might solve this using the techniques of an elementary linear algebra class as follows: the system above can be rewritten as $$ \begin{cases} -2x + y = 4 \\ \frac{1}{2}x + y = 0,\\ \end{cases} $$ which corresponds to the augmented matrix $$\left(\begin{array}{rr|r} -2 & 1 & 4 \\ \frac{1}{2} & 1 & 0 \end{array}\right).$$

Via one possible sequence of row reductions, this becomes \begin{align} \left(\begin{array}{rr|r} -2 & 1 & 4 \\ \frac{1}{2} & 1 & 0 \end{array}\right) \overset{R_2' = R_2 + \frac{1}{4}R_1}{\longrightarrow}& \left(\begin{array}{rr|r} -2 & 1 & 4 \\ 0 & \frac{5}{4} & 1 \end{array}\right)\\ \overset{R_1' = R_1 + \frac{4}{5}R_1}{\longrightarrow}& \left(\begin{array}{rr|r} -2 & 0 & \frac{16}{5} \\ 0 & \frac{5}{4} & 1 \end{array}\right)\\ \overset{R_1' = -\frac{1}{2}R_1}{\longrightarrow}& \left(\begin{array}{rr|r} 1 & 0 & -\frac{8}{5} \\ 0 & \frac{5}{4} & 1 \end{array}\right)\\ \overset{R_2' = \frac{4}{5}R_2}{\longrightarrow}& \left(\begin{array}{rr|r} 1 & 0 & -\frac{8}{5} \\ 0 & 1 & \frac{4}{5} \end{array}\right).\end{align} Therefore the point of intersection is $$ (x,y) = \left( -\frac{8}{5}, \frac{4}{5} \right).$$

To answer the last part of the question, the distance from that point to the origin is obtained via the Pythagorean Theorem (which is how we typically define distances in the plane). Notice that this point is on the hypotenuse of a right triangle with one leg along the $x$-axis and the other leg parallel to the $y$-axis:

enter image description here

Since the legs measure $\frac{8}{5}$ and $\frac{4}{5}$ units, respectively, we have that the length of the hypotenuse (which is the distance to the origin) is given by $$ \sqrt{ \left( \frac{8}{5} \right)^2 + \left(\frac{4}{5}\right)^2 } = \sqrt{\frac{64+16}{25}} = \frac{\sqrt{80}}{5} = \frac{4\sqrt{5}}{5}. $$ More generally, this gives a general formula for the distance between two points in $\mathbb{R}^2$, namely $$ d( (x_1,y_1), (x_2,y_2) ) = \sqrt{(x_1-x_2)^2 + (y_1-y_2)^2}, $$ which is the "usual" Euclidean metric on $\mathbb{R}^2$.

0
On

I think the easiest (and probably best) answer is provided by John Doe, but nonetheless, here is a different approach: Given a circle with center in Origin and radius $r$. The equation looks like $x^2+y^2=r^2$. When we intersect this circle with your line, we get the quadratic equation $x^2+(2x+4)^2=r^2$ which simplifies to $5x^2+16x+16-r^2=0$. Then there is this little neat thing called Discriminant, $b^2-4ac$ which you want to be equal to zero as you one only ONE solution; that is: The line is tangent to the circle. Plugging in your $a,b,c$ values ($a=5$, $b=16$,$c=16-r^2$), you find $r=\frac{4}{\sqrt{5}}$, which answers the latter part of your question. But since the equation of the circle is now known, finding the "contact" point isn't hard either.

0
On

In parametric form the line is $P_0+t\vec v$

$$y=2x+4\implies (0,4)+t(1,2)$$

the generic vector from the origin is $$\vec {OP}(x,y)$$

the minimum distance is attained when $\vec {OP}$ is perpendicular to $\vec v$, that is

$$\vec {OP}\cdot \vec v=0\implies x+2y=0 \implies x=-2y$$

plug into the line equation we obtain

$$y=-4y+4\implies y=\frac45 \quad x=-\frac85$$

therefore $$\vec {OP}\left(-\frac85,\frac45\right) \implies d=|\vec {OP}|=\frac{4\sqrt5}{5}$$

0
On

An equation's maximum or minimum value can be found upon its first & second derivatives.

So given the points $(0,0)$ and $(x,2x+4)$. Calculate the distance between them which turns out to be $(0-x)^2 + (0-2x-4)^2$ = ${5x^2 + 16 + 16x}$

Differentiate this equation with respect to x & equating it to $0$ gives us,
$10x + 16 = 0$

Therefore,

$x=\frac{-8}{5}$ & putting this value in $y = 2x + 4$, we get, $y = \frac{4}{5}$

Since the second derivative is $10$ which is $>0$, it is confirmed that the point we have obtained is the point for the minimum value of the equation.