[Math] Find the point on the line $x + 4y − 7 = 0$ which is closest to the point $(-2, -2)$

calculus

Find the point on the line
$$x + 4y − 7 = 0$$
which is closest to the point $(-2, -2)$

First I used the distance formula and found I need to minimize
$$(x+2)^2 + \Big(\frac{7}{4}-\frac{x}{4}+2\Big)^2$$
Taking the derivative gave me
$$(2x+4)-\frac{7}{8}+\frac{x}{8}-1$$
Simplifying gave me $x=-1$

Is this right?

Best Answer

People are giving you calculus answers where you have to minimize a distance function, but because this is a straight line, such machinery is not needed.

Suppose you have a point $P$ and a line $l$ not passing through $P$. Draw a line $l'$ perpendicular to $l$ and passing through $P$, and label the intersection of $l$ and $l'$ as $Q$. Then, if $Q'$ is any other point on the line $l$, you can use properties of triangles to show $PQ<PQ'$. But this is the same as saying that $Q$ is the closest point to $P$ on $l$. So we have the ancient theorem that to find the point on a straight line that is closest to a given point, drop a perpendicular.

In particular, your line $l$ in slope-intercept form is $$y=-\frac{1}{4} x + \frac{7}{4}$$ and has slope $-\frac{1}{4}$. The perpendicular $l'$ will have slope $4$ and we want it to pass though $P=(-2,-2)$. Thus $l'$ has the equation $$(y+2)=4(x+2).$$ Solving the system consisting of the two displayed equations will find the intersection of $l$ and $l'$, your point $Q$. That point will be closest to the given point while still lying on the given line.

It is also quite easy to find the point on a given circle that is closest to a given point not on the circle. But for more complicated curves, you will need to formulate a distance function and minimize it, and that will require calculus.