Minimizing the distance from a point to a graph
In this figure, you are given the graph of a function and a black point not on the graph of . You must find the point(s) on the graph of that are closest to the given point.
Drag the blue point on the graph around, and you'll see that the distance from it to your given point changes (indicated by the length of the dashed red segment). Call this distance . You want the -values that minimize .
Finally, observe the graph of , and see how this relates to the graph of and the given black point. You might first think to solve this type of minimization problem by solving , however, here's a trick to make your calculations easier: if you minimize the square of the distance you can avoid calculations with square roots.