Show vector (p-q) is orthogonal to the curve at q

Let $f:\mathbb R \to \mathbb R^n$ be a differentiable mapping with $f'(t) \neq 0$ for all $t$ in $\mathbb R$. Let $p$ be a fixed point not on the image curve of $f$. If $q = f(t_0)$ is the point of the curve closest to $p$, that is, $|p-q | \leq |p-f(t)|$ for all $t$ in $\mathbb R$, show that vector $(p-q)$ is orthogonal to the curve at $q$.

Hint: Differentiate the function $M(t) = |p-f(t)|^2$

This one was supposed to be the easiest problem on the problem set, but for some reason I cannot come up with an answer... I did the rest of the problems... Any help is much appreciated.

Compute the derivative of $$M(t)=\|p-f(t)\|^2=(p-f(t),p-f(t))$$ and you find $$M'(t)=-(f'(t),p-f(t))-(p-f(t),f'(t))=-2(p-f(t),f'(t)).$$

Since $M$ is minimum at $t_0$, $M'(t_0)=0$ so $$(p-f(t_0),f'(t_0))=(p-q,f'(t_0))=0.$$

Since $f'(t_0)$ is nonzero, it gives the direction of the tangent to the curve at $q=f(t_0)$. This completes the proof.

• From $M(t)=(p-f(t),p-f(t))$ how did you got $M'(t)=-(f'(t),p-f(t))-(f'(t),p-f(t))$? @Julien. Maybe it is super late but could you describe it? Mar 24, 2021 at 16:22
• @falamiw Differentiating using the chain rule gives the desired result. $$\varphi'(t)=-2(p-f(t))f'(t)$$ Apr 28, 2021 at 9:01
• I know the chain rule and how you get $$-2(p-f(t))f'(t)$$ but Julien write it as a $$M'(t)=-(f'(t),p-f(t))-(p-f(t),f'(t))=-2(p-f(t),f'(t))$$ Which isn't clear to me. Could you explain it @benmcgloin Apr 28, 2021 at 9:34
• Writing ${\lvert p-f(t)\rvert}^2=(p-f(t))(p-f(t))$ and then differentiating using the product rule gives: $$(-f'(t))(p-f(t))-(p-f(t))(f'(t))=-2(p-f(t))(f'(t))$$ In his case the commas imply vector multiplication. Apr 28, 2021 at 9:39

Hint: M(t), the distance between p and f(t), has a minima at $t_0$. So $M'(t_0)=?$

• M'(t0) = -2(p-q)f'(t0), and since f'(t0) not = 0 that means p-q must since its a critical point ? that's what i came up with but i'm not sure how that shows orthogonality.
– Neo
Feb 21, 2013 at 6:25
• f'(t0) and p-q are vectors, and so are either orthogonal, or one of them is zero. Feb 21, 2013 at 6:27
• OH MY GOD, i'm so embarrassed, thank you thank you. First math course in 4 years so... <3
– Neo
Feb 21, 2013 at 6:28