# Confusion over a proof that gradient is perpendicular to the level set

To prove that the vector $\nabla{f}(x_0)$ is orthogonal to the tangent vector to "an arbitrary smooth curve" passing through $x_0$ on the level set determined by $f(x)=f(x_0)$ the following proof is outlined in Chong and Zak :

It takes a special curve $\gamma$ lying in the level set and passing through $x_0$ and parameterized by a continuously differentiable function $g:\Bbb R \to \Bbb R^n$ such that $g(t_0) =x_0$ and $Dg(t_0)=v \neq 0$, so that $v$ is a tangent vector to $\gamma$ at $x_0$. Then it proves that $\nabla{f}(x_0) ^T v =0$. This proof is not correct. It does not consider any arbitrary smooth curve. The condition that $v$ is tangent to $\gamma$ at $x_0$ may not be true always. Am I correct ?

The curve must satisfy $\gamma(0) = x_0$, $f(\gamma(t)) = f(x_0)$ for $t \in [0,\delta)$ and $\gamma'(0) = v$. Then $\langle \nabla f(x_0), v \rangle = 0$ from the chain rule.

Unless $\nabla f(x_0) = 0$, it cannot be true for arbitrary $v$.

If $v \bot \nabla f(x_0)$, and $\nabla f(x_0) \neq 0$, then we can use the implicit function theorem to construct a suitable curve.

If $v = 0$, it is trivial, just let $\gamma(t) = x_0$.

If $v \neq 0$, consider the function $\phi(\alpha,\beta) = f(\alpha v + \beta \nabla f(x_0)+x_0) - f(x_0)$. Note that $\frac{\partial \phi(0,0)}{\partial \beta} = \| \nabla f(x_0)\|^2 \neq 0$, and use the implicit function theorem with $\phi(\alpha,\beta) = 0$ to find a differentiable $\xi$ such that $\phi(\alpha, \xi(\alpha)) = 0$, $\xi(0) = 0$, and $\frac{\partial \xi(0)}{\partial \alpha}= - \frac{\frac{\partial \phi(0,0)}{\partial \alpha}}{\frac{\partial \phi(0,0)}{\partial \beta}} = 0$.

Then let $\gamma(t) = t v + \xi(t) \nabla f(x_0)+ x_0$. Note that $\gamma(0) = x_0$, $f(\gamma(t)) = f(x_0)$, and $\gamma'(0) = v$.

• The inputs $f$ takes is quite confusing, isnt $v$ a vector?? – Vishesh Oct 14 '13 at 6:22
• I meant while defining $\phi(\alpha,\beta)$. – Vishesh Oct 14 '13 at 6:24
• Yes, $v$ is a vector, $\alpha, \beta$ are scalars. – copper.hat Oct 14 '13 at 6:37
• But $x_0$ is a point, right??I am still confused.Sorry about this. So $f$ takes both vector and points?? – Vishesh Oct 14 '13 at 7:21
• Draw a picture. I am just using the notation you used in the question. $f$ is defined on $\mathbb{R}^n$. we have $v,x_0, \nabla f(x_0) \in \mathbb{R}^n$, $\alpha,\beta \in \mathbb{R}$, so $\alpha v + \beta \nabla f(x_0)+x_0 \in \mathbb{R}^n$. – copper.hat Oct 14 '13 at 7:26